Height calibration method, device and equipment of 3D laser line scanning camera and medium
By highly calibrating the 3D laser line scan camera, using high-precision linear stepper motors and calibration lookup tables, the problem of different upper and lower magnifications and left and right distortions in 3D laser line scan camera imaging has been solved, achieving more accurate image data. and higher measurement accuracy.
Patent Information
- Application Number
- CN202411871791.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In the prior art, 3D laser line scanning camera imaging has problems such as different up and down magnification and distortion on the left and right, and traditional calibration solutions cannot effectively solve these problems.
By adjusting the preset calibration platform equipment so that the laser plane, lens plane, and sensor plane intersect in a line, a high-precision linear stepper motor and a calibration lookup table are used to obtain the light stripe center image, extract the light stripe center coordinates, and construct Specify the image, call the height setting rules and linear interpolation algorithm, determine the calibration parameter results, and build the calibration lookup table.
It effectively overcomes the inability of traditional calibration solutions to solve the problems of imaging distortion and different magnifications of 3D laser line scan cameras, achieves more accurate and distortion-free image data, and improves measurement accuracy.
Smart Images

Figure CN119313746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, computer equipment and storage medium for calibrating the height of a 3D laser line scan camera. Background Art
[0002] A Sham camera is a camera that can increase the depth of field. It uses Sham's law, that is, the imaging plane, lens plane, and object plane intersect on a line. A camera that satisfies this imaging method is called a Sham camera. A 3D laser line scan camera is a camera that satisfies Sham's law. It uses a laser to emit red or blue light to an object. The photosensitive CMOS images the laser on the surface of the object, but does not image other positions on the surface of the object.
[0003] In the prior art, the traditional calibration scheme for the complex problem of 3D laser line scan camera imaging with different magnifications up and down and distortion on the left and right is to calculate the internal and external parameters. This processing method makes it difficult to calculate the correct height in the edge area of the image because Sham's law imaging has large distortion and magnification differences. The distortion and magnification are very obvious in the edge area and show no obvious pattern. In order to reduce the distortion and magnification, there are strict requirements on the camera lens design, but it cannot effectively solve the problem of 3D laser line scan camera imaging with different magnifications up and down and distortion on the left and right. Summary of the invention
[0004] The main purpose of the present invention is to provide a 3D laser line scan camera height calibration method, device, computer equipment and storage medium, aiming to solve the technical problem in the prior art that the traditional calibration scheme using the calculation of internal and external parameters cannot effectively solve the 3D laser line scan camera imaging with different upper and lower magnifications and left and right distortion.
[0005] To achieve the above object, the present invention provides a method for calibrating the height of a 3D laser line scan camera, the method comprising: Adjust the preset calibration platform equipment so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; Place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; Controlling a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, acquiring a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scan camera, and extracting the target light stripe center coordinates of each of the target light stripe center images; Constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain height data of each target light streak center; Based on the target light stripe center coordinates and the height data, a preset linear interpolation algorithm is called to determine a calibration parameter result corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes a plurality; A calibration lookup table is constructed based on the newly acquired light fringe centers and the calibration parameter results.
[0006] Optionally, constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain the height data of each target light streak center, includes: Determining a specific light fringe center corresponding to an image center of the designated image; Setting the height of the center of the specific light stripe to 0; Obtaining the step length of the stepping motor and using the step length as a height parameter; Based on the height parameter, the height of the target light stripe center in the designated image is set using the height setting rule to obtain the height data of each target light stripe center.
[0007] Optionally, the determining a calibration parameter result corresponding to the newly acquired light stripe center by calling a preset linear interpolation algorithm based on the target light stripe center coordinates and the height data includes: Acquire the falling position information of the newly acquired light stripe center; Based on the falling position information, find out the designated coordinate data and designated height data of the designated light stripe center adjacent to the newly acquired light stripe center; The designated coordinate data and the designated height data are calculated and processed based on the linear interpolation algorithm to generate the calibration parameter result corresponding to the newly acquired light stripe center.
[0008] Optionally, constructing a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results includes: Establishing an index corresponding to the newly acquired light stripe center based on a preset index establishment rule; Constructing a matching relationship between the index and the calibration parameter result; Based on the matching relationship, a table construction process is performed on the index and the calibration parameter result using a key value method to obtain the calibration lookup table.
[0009] Optionally, after constructing a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results, the method further includes: Acquiring depth of field data to be measured; and, Acquiring visual field data to be measured; Based on the depth of field data to be measured and the field of view data to be measured, optimizing the calibration lookup table to obtain a target calibration lookup table; The target calibration lookup table is stored.
[0010] Optionally, the optimizing process of the calibration lookup table based on the depth of field data to be measured and the field of view data to be measured to obtain a target calibration lookup table includes: Get the preset depth of field mapping data table; Querying the specified number of rows corresponding to the depth of field data to be measured from the depth of field mapping data table; The calibration lookup table is optimized based on the designated number of rows and the field of view data to be measured to obtain the target calibration lookup table.
[0011] Optionally, storing the target calibration lookup table includes: Determining a target storage medium corresponding to the target calibration lookup table; Acquire storage location information corresponding to the target storage medium; Based on the storage location information, the target calibration lookup table is stored in the target storage medium.
[0012] In addition, to achieve the above-mentioned purpose, the present invention also provides a height calibration device for a 3D laser line scan camera, the height calibration device for a 3D laser line scan camera comprising: An adjustment module is used to adjust the preset calibration platform device so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; A first processing module is used to place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; A second processing module is used to control a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, obtain a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scanning camera, and extract the target light stripe center coordinates of each of the target light stripe center images; A setting module, used for constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image, so as to obtain the height data of each target light streak center; A determination module, configured to call a preset linear interpolation algorithm to determine a calibration parameter result corresponding to a newly acquired light stripe center based on the target light stripe center coordinates and the height data; wherein the number of the newly acquired light stripe centers includes a plurality; A construction module is used to construct a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results.
[0013] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution: Adjust the preset calibration platform equipment so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; Place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; Controlling a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, acquiring a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scan camera, and extracting the target light stripe center coordinates of each of the target light stripe center images; Constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain height data of each target light streak center; Based on the target light stripe center coordinates and the height data, a preset linear interpolation algorithm is called to determine a calibration parameter result corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes a plurality; A calibration lookup table is constructed based on the newly acquired light fringe centers and the calibration parameter results.
[0014] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution: Adjust the preset calibration platform equipment so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; Place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; Controlling a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, acquiring a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scan camera, and extracting the target light stripe center coordinates of each of the target light stripe center images; Constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain height data of each target light streak center; Based on the target light stripe center coordinates and the height data, a preset linear interpolation algorithm is called to determine a calibration parameter result corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes a plurality; A calibration lookup table is constructed based on the newly acquired light fringe centers and the calibration parameter results.
[0015] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The present invention provides a method, device, computer equipment and storage medium for height calibration of a 3D laser line scan camera. The method comprises: adjusting a preset calibration platform device so that a laser plane, a lens plane and a sensor plane corresponding to the 3D laser line scan camera intersect on a line; vertically placing a preset calibration plane perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtaining a light stripe center image captured by the 3D laser line scan camera, and extracting the light stripe center coordinates of the light stripe center image; controlling a preset high-precision linear stepper motor to move the calibration plane forward with a fixed step length, obtaining a light stripe center image captured by the 3D laser line scan camera that is consistent with the preset calibration plane, and obtaining a light stripe center image captured by the 3D laser line scan camera that is consistent with the preset calibration plane. Set multiple target light stripe center images corresponding to the number of steps, and extract the target light stripe center coordinates of each target light stripe center image; construct a specified image based on the target light stripe center of each target light stripe center image, and call the preset height setting rule to set the height of the target light stripe center in the specified image to obtain the height data of each target light stripe center; based on the target light stripe center coordinates and the height data, call the preset linear interpolation algorithm to determine the calibration parameter results corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes multiple; construct a calibration lookup table based on the newly acquired light stripe center and the calibration parameter results. Different from the traditional calibration scheme that uses the calculation of internal and external parameters, the present application can effectively overcome the problem that the traditional calibration scheme cannot effectively solve the problem that the 3D laser line scan camera imaging has different up and down magnifications and left and right distortions by combining a high-precision linear stepper motor and a calibration lookup table. The present application takes into account the characteristics of different upper and lower magnifications and left and right distortions in 3D laser line scan camera imaging into a calibration lookup table, so that during the imaging process, the 3D laser line scan camera can correct the original image in real time according to the calibration lookup table, and eliminate or reduce to a minimum the unfavorable factors such as different upper and lower magnifications and left and right distortions through the mapping relationship in the lookup table, thereby obtaining more accurate and distortion-free image data, thereby effectively improving the measurement accuracy of the 3D laser line scan camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 is an exemplary system architecture diagram to which the present application may be applied; Figure 2is a flow chart of a height calibration method for a 3D laser line scan camera provided by an embodiment of the present invention; Figure 3 is a structural schematic diagram of an embodiment of a height calibration device for a 3D laser line scan camera according to the present application; Figure 4 This is a basic structural block diagram of the computer device in this embodiment. DETAILED DESCRIPTION
[0018] The height calibration method of a 3D laser line scan camera provided by an embodiment of the present invention is applied to a height calibration device of a 3D laser line scan camera. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" in the specification and claims of the present application and the above-mentioned drawings and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0019] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0021] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0022] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social online platform software, etc.
[0023] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0024] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0025] It should be noted that the height calibration method of the 3D laser line scan camera provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the height calibration device of the 3D laser line scan camera is generally set in the server / terminal device.
[0026] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0027] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for calibrating the height of a 3D laser line scan camera proposed in the present application. The embodiment of the present application can acquire and process relevant data based on artificial intelligence technology.
[0028] The height calibration method of a 3D laser line scan camera provided by an embodiment of the present invention comprises the following steps: S210, adjusting a preset calibration platform device so that a laser plane, a lens plane, and a sensor plane corresponding to the 3D laser line scan camera intersect on a line.
[0029] In this step, the 3D laser line scan camera is a camera that generates the height information of an object section by taking a picture at a time, and stitches multiple sections together to generate 3D information through continuous movement. The calibration system that converts image pixel coordinates into 3D physical coordinates is an indispensable part of the 3D laser line scan camera and directly affects the measurement accuracy and measurement range of the camera. Camera calibration is a process of converting from the world coordinate system to the camera coordinate system (optical 3D imaging system), and then from the camera coordinate system to the image coordinate system, where the image coordinate system is mainly used to describe the object from the camera coordinates during the imaging process.
[0030] Specifically, the present invention can be applied to the business scenario of calibrating a 3D laser line scan camera, and the execution subject of the present invention can be a calibration platform device with a calibration function for a 3D laser line scan camera. Among them, by adjusting the calibration platform device so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line, the 3D laser line scan camera can meet Sham's law and form a clear image on the host computer.
[0031] S220, vertically placing a preset calibration plane perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtaining a light stripe center image captured by the 3D laser line scan camera, and extracting the light stripe center coordinates of the light stripe center image.
[0032] In this step, the calibration plane may be a smooth calibration plane. In the actual effect, the red color in the light stripe center image indicates the light stripe center. When a light stripe center image is obtained by using a 3D laser line scan camera, the light stripe center coordinates corresponding to the light stripe center can be extracted synchronously.
[0033] S230, controlling a preset high-precision linear stepper motor to move the calibration plane forward at a fixed step length, acquiring a plurality of target light stripe center images corresponding to a preset number of steps captured by the 3D laser line scan camera, and extracting the target light stripe center coordinates of each of the target light stripe center images.
[0034] In this step, due to the different distortions and magnifications in the upper and lower parts and the left and right parts of the 3D laser line scan camera, the traditional algorithm for calculating the internal and external parameters cannot solve the problem of different distortions and magnifications. The calibration of the 3D laser line scan camera using a stepper motor and a lookup table can effectively solve the problem that the traditional algorithm for calculating the internal and external parameters cannot solve the problem of different distortions and magnifications. Among them, there is no specific limitation on the selection of the numerical value of the above-mentioned fixed step length, which can be set according to the actual camera calibration test requirements. In addition, there is no specific limitation on the selection of the numerical value of the above-mentioned number of steps, which can be set according to the actual camera calibration test requirements. Exemplarily, if the number of steps is N, by controlling the stepper motor to move the calibration plane forward with a fixed step length, N target light stripe center images captured by the 3D laser line scan camera can be obtained, and N groups of target light stripe center coordinates corresponding to each of the target light stripe center images can be extracted.
[0035] S240, constructing a designated image based on the target light stripe center of each of the target light stripe center images, and calling a preset height setting rule to set the height of the target light stripe center in the designated image to obtain height data of each of the target light stripe centers.
[0036] In this step, the designated image can be obtained by splicing the target light stripe centers in the N target light stripe center images captured by the 3D laser line scan camera. The specific implementation process of constructing the designated image based on the target light stripe center of each target light stripe center image, calling the preset height setting rule to set the height of the target light stripe center in the designated image, and obtaining the height data of each target light stripe center will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.
[0037] S250, based on the target light stripe center coordinates and the height data, calling a preset linear interpolation algorithm to determine a calibration parameter result corresponding to a newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes multiple.
[0038] In this step, the specific implementation process of calling the preset linear interpolation algorithm based on the target light stripe center coordinates and the height data to determine the calibration parameter results corresponding to the newly acquired light stripe center will be further described in detail in the subsequent specific embodiments of the present application and will not be elaborated on here.
[0039] S260: construct a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results.
[0040] In this step, the specific implementation process of constructing the calibration lookup table based on the newly acquired light stripe center and the calibration parameter result will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0041] In an embodiment of the present invention, a preset calibration platform device is adjusted so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; then the preset calibration plane is vertically placed perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, a light stripe center image captured by the 3D laser line scan camera is obtained, and the light stripe center coordinates of the light stripe center image are extracted; then a preset high-precision linear stepper motor is controlled to move the calibration plane forward with a fixed step length, and multiple target light stripe center images corresponding to a preset number of steps captured by the 3D laser line scan camera are obtained. image, and extract the target light stripe center coordinates of each target light stripe center image; subsequently, a designated image is constructed based on the target light stripe center of each target light stripe center image, and a preset height setting rule is called to set the height of the target light stripe center in the designated image to obtain the height data of each target light stripe center; further based on the target light stripe center coordinates and the height data, a preset linear interpolation algorithm is called to determine the calibration parameter results corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes multiple; finally, a calibration lookup table is constructed based on the newly acquired light stripe center and the calibration parameter results. Different from the traditional calibration scheme that uses the calculation of internal and external parameters, the present application can effectively overcome the problem that the traditional calibration scheme cannot effectively solve the problem that the 3D laser line scan camera imaging has different up and down magnifications and left and right distortions by combining a high-precision linear stepper motor and a calibration lookup table. The present application takes into account the characteristics of different upper and lower magnifications and left and right distortions in 3D laser line scan camera imaging into a calibration lookup table, so that during the imaging process, the 3D laser line scan camera can correct the original image in real time according to the calibration lookup table, and eliminate or reduce to a minimum the unfavorable factors such as different upper and lower magnifications and left and right distortions through the mapping relationship in the lookup table, thereby obtaining more accurate and distortion-free image data, thereby effectively improving the measurement accuracy of the 3D laser line scan camera.
[0042] Optionally, constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain the height data of each target light streak center, includes: Determining a specific light fringe center corresponding to an image center of the designated image; In this step, the specific light stripe center corresponding to the image center of the designated image refers to a light stripe center close to the image center of the designated image.
[0043] The height of the center of the specific light stripe is set to 0.
[0044] The step length of the stepping motor is obtained, and the step length is used as a height parameter.
[0045] In this step, the motor data of the stepper motor can be acquired, and then the step length of the stepper motor can be queried from the acquired motor data.
[0046] Based on the height parameter, the height of the target light stripe center in the designated image is set using the height setting rule to obtain the height data of each target light stripe center.
[0047] In this step, the rule content of the height setting rule specifically includes: after setting the height of the center of the specific light stripe to 0, setting the height above the center of the specific light stripe to h, 2h, ..., k*h, respectively, and setting the height below the center of the specific light stripe to -h, -2h, ..., -j*h, respectively, and specifying the corresponding height values from top to bottom in the image to k*h ..., 2h, h, 0, -h, -2h, ..., -jh.
[0048] In this embodiment, by determining the specific light stripe center corresponding to the image center of the specified image; then setting the height of the specific light stripe center to 0; then obtaining the step length of the stepper motor and using the step length as a height parameter; subsequently, based on the height parameter, using the height setting rule to set the height of the target light stripe center in the specified image, and obtaining the height data of each target light stripe center. In this application, by setting the height of the specific light stripe center corresponding to the image center of the specified image to 0, and obtaining the step length of the stepper motor and using it as a height parameter, the height setting rule can be used to quickly and intelligently set the height of the target light stripe center in the specified image, thereby obtaining the height data of each target light stripe center, effectively improving the processing efficiency of the height setting of the target light stripe center in the specified image, and ensuring the data accuracy of the height data of the obtained target light stripe center.
[0049] Optionally, the determining a calibration parameter result corresponding to the newly acquired light stripe center by calling a preset linear interpolation algorithm based on the target light stripe center coordinates and the height data includes: The falling position information of the newly acquired light stripe center is obtained.
[0050] In this step, the above-mentioned falling position information may refer to the position information where the center of the light stripe newly captured by the 3D laser line scan camera falls in the designated image.
[0051] Based on the falling position information, the designated coordinate data and the designated height data of the designated light stripe center adjacent to the newly acquired light stripe center are found.
[0052] In this step, according to the falling position information of the newly acquired light stripe center, the designated light stripe center adjacent to the newly acquired light stripe center can be determined first, and then the designated coordinate data and designated height data matching the designated light stripe center can be extracted.
[0053] The designated coordinate data and the designated height data are calculated and processed based on the linear interpolation algorithm to generate the calibration parameter result corresponding to the newly acquired light stripe center.
[0054] In this step, the above-mentioned linear interpolation algorithm can specifically adopt a two-point interpolation algorithm, and the specified coordinate data and the specified height data can be calculated and processed by using the two-point interpolation algorithm to obtain a corresponding result, and the obtained result is used as the calibration parameter result corresponding to the newly acquired light stripe center.
[0055] In this embodiment, by obtaining the falling position information of the newly acquired light stripe center; then based on the falling position information, finding out the designated coordinate data and the designated height data of the designated light stripe center adjacent to the newly acquired light stripe center; subsequently calculating and processing the designated coordinate data and the designated height data based on the linear interpolation algorithm, the calibration parameter result corresponding to the newly acquired light stripe center is generated. The present application can realize the rapid and accurate generation of the calibration parameter result corresponding to the newly acquired light stripe center by finding out the designated coordinate data and the designated height data of the designated light stripe center adjacent to the newly acquired light stripe center according to the falling position information of the newly acquired light stripe center obtained, and then calculating and processing the designated coordinate data and the designated height data based on the use of the linear interpolation algorithm, thereby improving the generation efficiency of the calibration parameter result and ensuring the data accuracy of the obtained calibration parameter result.
[0056] Optionally, constructing a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results includes: An index corresponding to the newly acquired light stripe center is established based on a preset index establishment rule.
[0057] In this step, the rule content of the above-mentioned index establishment rule may specifically include: by establishing an index for the data that needs to construct the calibration lookup table, a corresponding index is established for each column, and a column is specifically sorted from top to bottom A1, A2, ..., An. And each row position corresponds to an index. For row positions less than or equal to A2, the corresponding index is 2 (each index represents the current value and the adjacent value read out), for row positions less than or equal to A3, and the corresponding index is 3, for row positions greater than or equal to An, the corresponding index is n. The index from 1 to n represents the storage address of the calibration lookup table, and the index of each column is stored in the FPGA BlockRAM. When the extreme point of a column (one column has only one extreme point) is reached, the extreme point is used as the access address of the BlockRAM, and the corresponding index is output in the next cycle. The index is used as the access address of the calibration lookup table, and the corresponding lookup table data is read out, and then the corresponding result is calculated according to the two-point interpolation algorithm as the corresponding calibration parameter result.
[0058] A matching relationship between the index and the calibration parameter result is established.
[0059] In this step, the above matching relationship refers to a one-to-one correspondence between the index and the calibration parameter result.
[0060] Based on the matching relationship, a table construction process is performed on the index and the calibration parameter result using a key value method to obtain the calibration lookup table.
[0061] In this step, the key value method refers to completing the construction process of the calibration lookup table by using the index as the key in the calibration lookup table and using the calibration parameter result that has a matching relationship with the index as the key value corresponding to the key in the calibration lookup table.
[0062] In this embodiment, an index corresponding to the newly acquired light stripe center is established based on a preset index establishment rule; then a matching relationship between the index and the calibration parameter result is established; and subsequently, based on the matching relationship, a table construction process is performed on the index and the calibration parameter result using a key value method to obtain the calibration lookup table. Based on the use of index rules and key value methods, the present application performs table construction processing on the index and the calibration parameter result with a matching relationship, which can realize the rapid and intelligent construction of a corresponding calibration lookup table, improve the construction efficiency of the calibration lookup table, and ensure the accuracy of the constructed calibration lookup table.
[0063] Optionally, after constructing a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results, the method further includes: Obtain the depth of field data to be measured.
[0064] In this step, when the storage space is not limited, theoretically, the more data in the calibration lookup table, the more indexes corresponding to each column are stored, and the higher the accuracy of the Z-direction calibration of the 3D laser line scan camera. However, when the FPGA model is selected for the 3D laser line scan camera, the upper limit of the number of BlockRams that can be used for the Z-direction calibration of the 3D laser line scan camera is determined, which is not only limited by the maximum number of BlockRams, but also includes the difficulty of layout and wiring during version compilation. The algorithm of the 3D laser line scan camera is generally implemented through high-level FPGA programming, and can be further processed according to the characteristics of the FPGA to improve the measurement accuracy of the 3D laser line scan camera. Specifically, in the case where the depth of field or field of view does not require full frame, the measurement performance can be improved by increasing the data density of the calibration lookup table, that is, dynamically loading the FPGA calibration data according to the actual measurement depth of field range and field of view range. This can greatly improve the data density of the calibration lookup table, thereby improving the measurement accuracy of the 3D laser line scan camera. The depth of field data to be measured refers to the depth of field range data that actually needs to be measured, and the depth of field data to be measured can be determined according to the actual requirements of the depth of field range that needs to be measured.
[0065] Get the visual field data to be measured.
[0066] In this step, the visual field data to be measured refers to the visual field range data that actually needs to be measured, and the visual field data to be measured can be determined according to the actual requirements of the visual field range that needs to be measured.
[0067] Based on the depth of field data to be measured and the field of view data to be measured, the calibration lookup table is optimized to obtain a target calibration lookup table.
[0068] In this step, the calibration lookup table is optimized based on the depth of field data to be measured and the field of view data to be measured to obtain the specific implementation process of the target calibration lookup table. This application will provide further detailed descriptions of this in subsequent specific embodiments and will not be elaborated on here.
[0069] The target calibration lookup table is stored.
[0070] In this step, the specific implementation process of storing the target calibration lookup table will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0071] In this embodiment, the depth of field data to be measured is obtained; and the field of view data to be measured is obtained; then based on the depth of field data to be measured and the field of view data to be measured, the calibration lookup table is optimized to obtain a target calibration lookup table; and the target calibration lookup table is subsequently stored. This application uses the acquired depth of field data to be measured and the field of view data to be measured to optimize the calibration lookup table to obtain a target calibration lookup table, so that in the case where the depth of field or field of view does not require full frame, the calibration lookup table is optimized by using the depth of field data to be measured and the field of view data to be measured to increase the data density of the calibration lookup table, thereby effectively improving the measurement performance and measurement accuracy of the 3D laser line scan camera.
[0072] Optionally, the optimizing process of the calibration lookup table based on the depth of field data to be measured and the field of view data to be measured to obtain a target calibration lookup table includes: Gets the preset depth map data table.
[0073] In this step, the depth of field mapping data table is a data table that is pre-constructed during the actual 3D laser line scan camera measurement accuracy test experiment and records the mapping relationship between the measured depth of field range and the number of rows in the calibration lookup table in accordance with the requirements of improving the measurement accuracy of the 3D laser line scan camera.
[0074] A designated number of rows corresponding to the depth of field data to be measured is queried from the depth of field mapping data table.
[0075] In this step, the depth of field data to be measured can be used to query the depth of field mapping data table to find out the specified depth of field range that matches the depth of field data to be measured from the depth of field mapping data table, and then the number of rows that have a mapping relationship with the specified depth of field range can be extracted from the depth of field mapping data table to obtain the above-mentioned specified number of rows.
[0076] The calibration lookup table is optimized based on the designated number of rows and the field of view data to be measured to obtain the target calibration lookup table.
[0077] In this step, the calibration lookup table is optimized by using the specified number of rows and the specified number of columns corresponding to the field of view data to be measured, so that the data density of the optimized target calibration lookup table can be increased, which is beneficial to improving the measurement performance and measurement accuracy of the 3D laser line scan camera. In the actual experimental process of the measurement accuracy test of the 3D laser line scan camera, based on the need to improve the measurement accuracy of the 3D laser line scan camera, the data mapping relationship between the measured field of view and the number of columns in the calibration lookup table will be pre-constructed and stored. By querying the data mapping relationship later, the number of columns with a mapping relationship with the field of view data to be measured can be obtained and used as the above-mentioned specified number of columns.
[0078] In this embodiment, a preset depth of field mapping data table is obtained; then the specified number of rows corresponding to the depth of field data to be measured is queried from the depth of field mapping data table; and then the calibration lookup table is optimized based on the specified number of rows and the field of view data to be measured to obtain the target calibration lookup table. This application uses the depth of field mapping data table to find out the specified number of rows corresponding to the depth of field data to be measured, and then optimizes the calibration lookup table using the specified number of rows and the field of view data to be measured to obtain the target calibration lookup table, so that when the depth of field or field of view does not require full frame, the calibration lookup table is optimized by using the depth of field data to be measured and the field of view data to be measured to increase the data density of the calibration lookup table, thereby effectively improving the measurement performance and measurement accuracy of the 3D laser line scan camera.
[0079] Optionally, storing the target calibration lookup table includes: A target storage medium corresponding to the target calibration lookup table is determined.
[0080] In this step, there is no specific limitation on the selection of the above-mentioned target storage medium, which can be determined according to the actual business usage requirements. Exemplarily, the target storage medium can be any one of a local database, a cloud server, a network disk, a blockchain, etc. Among them, blockchain is preferably used as the above-mentioned target storage medium. By using blockchain to store and manage the target calibration lookup table, the security and non-tamperability of the target calibration lookup table can be effectively guaranteed.
[0081] Acquire storage location information corresponding to the target storage medium.
[0082] In this step, the storage location information refers to the location of the target storage medium, for example, it may refer to the communication address of the target storage medium.
[0083] Based on the storage location information, the target calibration lookup table is stored in the target storage medium.
[0084] In this step, after obtaining the storage location information corresponding to the target storage medium, a communication connection relationship can be established with the target storage medium according to the storage location information, thereby realizing storing the target calibration lookup table in the target storage medium.
[0085] In this embodiment, the target storage medium corresponding to the target calibration lookup table is determined; then the storage location information corresponding to the target storage medium is obtained; and subsequently, based on the storage location information, the target calibration lookup table is stored in the target storage medium. After optimizing the calibration lookup table to obtain the target calibration lookup table, the present application will also intelligently use the target storage medium corresponding to the target calibration lookup table to store the target calibration lookup table, which can effectively ensure the data security and non-tamperability of the target calibration lookup table, and improve the storage intelligence of the target calibration lookup table.
[0086] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a height calibration device 300 for a 3D laser line scan camera. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0087] An embodiment of the present invention provides a 3D laser line scan camera height calibration device 300, and the 3D laser line scan camera height calibration device 300 includes: An adjustment module 310 is used to adjust a preset calibration platform device so that a laser plane, a lens plane, and a sensor plane corresponding to the 3D laser line scan camera intersect on a line; The first processing module 320 is used to place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; The second processing module 330 is used to control a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, obtain a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scanning camera, and extract the target light stripe center coordinates of each of the target light stripe center images; A setting module 340 is used to construct a designated image based on the target light streak center of each target light streak center image, and call a preset height setting rule to set the height of the target light streak center in the designated image to obtain height data of each target light streak center; A determination module 350 is used to call a preset linear interpolation algorithm to determine a calibration parameter result corresponding to a newly acquired light stripe center based on the target light stripe center coordinates and the height data; wherein the number of the newly acquired light stripe centers includes a plurality; The construction module 360 is used to construct a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results.
[0088] Optionally, the setting module 340 includes: A first determination submodule is used to determine a specific light stripe center corresponding to an image center of the designated image; A first setting submodule, used to set the height of the center of the specific light stripe to 0; A first acquisition submodule is used to acquire the step length of the stepping motor and use the step length as a height parameter; The second setting submodule is used to set the height of the target light stripe center in the specified image based on the height parameter and using the height setting rule to obtain the height data of each target light stripe center.
[0089] Optionally, the determining module 350 includes: A second acquisition submodule is used to acquire the falling position information of the newly acquired light stripe center; A search submodule, configured to search for the designated coordinate data and the designated height data of the designated light stripe center adjacent to the newly acquired light stripe center based on the falling position information; The calculation submodule is used to calculate and process the specified coordinate data and the specified height data based on the linear interpolation algorithm to generate the calibration parameter result corresponding to the newly acquired light stripe center.
[0090] Optionally, the construction module 360 includes: An establishment submodule, used to establish an index corresponding to the newly acquired light stripe center based on a preset index establishment rule; A first construction submodule, used to construct a matching relationship between the index and the calibration parameter result; The second submodule is used to construct a table based on the matching relationship using a key value method to process the index and the calibration parameter result to obtain the calibration lookup table.
[0091] Optionally, the height calibration device 300 of the 3D laser line scan camera further includes: A first acquisition module, used to acquire depth of field data to be measured; A second acquisition module, used to acquire visual field data to be measured; An optimization module, configured to optimize the calibration lookup table based on the depth of field data to be measured and the field of view data to be measured, so as to obtain a target calibration lookup table; A storage module is used to store the target calibration lookup table.
[0092] Optionally, the optimization module includes: The third acquisition submodule is used to acquire a preset depth of field mapping data table; A query submodule, used for querying a specified number of rows corresponding to the depth of field data to be measured from the depth of field mapping data table; The processing submodule is used to optimize the calibration lookup table based on the specified number of rows and the field of view data to be measured to obtain the target calibration lookup table.
[0093] Optionally, the storage module includes: A second determination submodule, used to determine a target storage medium corresponding to the target calibration lookup table; A fourth acquisition submodule, used to acquire storage location information corresponding to the target storage medium; A storage submodule is used to store the target calibration lookup table in the target storage medium based on the storage location information.
[0094] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0095] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0096] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0097] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the height calibration method of the 3D laser line scan camera, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0098] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the height calibration method of the 3D laser line scan camera.
[0099] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0100] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores the application crash processing program, and the application crash processing program can be executed by at least one processor to enable the at least one processor to perform the steps of the height calibration method of the 3D laser line scan camera as described above.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware online platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0102] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0103] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for calibrating the height of a 3D laser line scan camera, characterized in that: include: Adjust the preset calibration platform equipment so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; Place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; Controlling a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, acquiring a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scan camera, and extracting the target light stripe center coordinates of each of the target light stripe center images; Constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain height data of each target light streak center; Based on the target light stripe center coordinates and the height data, a preset linear interpolation algorithm is called to determine a calibration parameter result corresponding to the newly acquired light stripe center; wherein the number of the newly acquired light stripe centers includes a plurality; A calibration lookup table is constructed based on the newly acquired light fringe centers and the calibration parameter results.
2. The method according to claim 1, characterized in that: The step of constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image to obtain the height data of each target light streak center includes: Determining a specific light fringe center corresponding to an image center of the designated image; Setting the height of the center of the specific light stripe to 0; Obtaining the step length of the stepping motor and using the step length as a height parameter; Based on the height parameter, the height of the target light stripe center in the designated image is set using the height setting rule to obtain the height data of each target light stripe center.
3. The method according to claim 1, characterized in that The step of calling a preset linear interpolation algorithm based on the target light stripe center coordinates and the height data to determine a calibration parameter result corresponding to the newly acquired light stripe center includes: Acquire the falling position information of the newly acquired light stripe center; Based on the falling position information, find out the designated coordinate data and designated height data of the designated light stripe center adjacent to the newly acquired light stripe center; The designated coordinate data and the designated height data are calculated and processed based on the linear interpolation algorithm to generate the calibration parameter result corresponding to the newly acquired light stripe center.
4. The method according to claim 1, characterized in that: The constructing a calibration lookup table based on the newly acquired light stripe center and the calibration parameter result includes: Establishing an index corresponding to the newly acquired light stripe center based on a preset index establishment rule; Constructing a matching relationship between the index and the calibration parameter result; Based on the matching relationship, a table construction process is performed on the index and the calibration parameter result using a key value method to obtain the calibration lookup table.
5. The method according to claim 1, characterized in that After constructing the calibration lookup table based on the newly acquired light stripe center and the calibration parameter result, the method further includes: Acquiring depth of field data to be measured; and, Acquiring visual field data to be measured; Based on the depth of field data to be measured and the field of view data to be measured, optimizing the calibration lookup table to obtain a target calibration lookup table; The target calibration lookup table is stored.
6. The method according to claim 5, characterized in that The optimizing process of the calibration lookup table based on the depth of field data to be measured and the field of view data to be measured to obtain a target calibration lookup table includes: Get the preset depth of field mapping data table; Querying the specified number of rows corresponding to the depth of field data to be measured from the depth of field mapping data table; The calibration lookup table is optimized based on the designated number of rows and the field of view data to be measured to obtain the target calibration lookup table.
7. The method according to claim 5, characterized in that The storing of the target calibration lookup table comprises: Determining a target storage medium corresponding to the target calibration lookup table; Acquire storage location information corresponding to the target storage medium; Based on the storage location information, the target calibration lookup table is stored in the target storage medium.
8. A height calibration device for a 3D laser line scan camera, characterized in that: include: An adjustment module is used to adjust the preset calibration platform device so that the laser plane, lens plane, and sensor plane corresponding to the 3D laser line scan camera intersect on a line; A first processing module is used to place a preset calibration plane vertically perpendicular to the laser plane and located at the depth of field of the 3D laser line scan camera, obtain a light stripe center image captured by the 3D laser line scan camera, and extract the light stripe center coordinates of the light stripe center image; A second processing module is used to control a preset high-precision linear stepping motor to move the calibration plane forward with a fixed step length, obtain a plurality of target light stripe center images corresponding to a preset number of steps obtained by the 3D laser line scanning camera, and extract the target light stripe center coordinates of each of the target light stripe center images; A setting module, used for constructing a designated image based on the target light streak center of each target light streak center image, and calling a preset height setting rule to set the height of the target light streak center in the designated image, so as to obtain the height data of each target light streak center; A determination module, configured to call a preset linear interpolation algorithm to determine a calibration parameter result corresponding to a newly acquired light stripe center based on the target light stripe center coordinates and the height data; wherein the number of the newly acquired light stripe centers includes a plurality; A construction module is used to construct a calibration lookup table based on the newly acquired light stripe centers and the calibration parameter results.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the height calibration method of a 3D laser line scan camera as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the height calibration method for a 3D laser line scan camera according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Line laser stripe center line three-dimensional coordinate extraction method, device and system
CN115115604A
Laser line calibration method, device and equipment and storage medium
CN115511980A
Calibration method and device of laser sensor, calibration equipment and computer medium
CN117132665A
Camera calibration method and device based on laser, equipment and medium
CN117523001A