Three-dimensional measurement method, data processing device, electronic device, and storage medium
By using a 3D measurement device consisting of a binocular camera and a laser emitter, combined with nonmaximum suppression and grayscale centroid extraction methods, the problems of insufficient data and computational complexity in existing 3D measurement technologies are solved, achieving high-precision and robust 3D measurement.
Patent Information
- Application Number
- CN202210678393.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-06-16
AI Technical Summary
In existing 3D measurement technologies, single-frame technology has limited data, resulting in poor reliability of measurement results, while multi-frame technology involves complex calculations and data redundancy, extending measurement time.
A three-dimensional measurement device consisting of a binocular camera and a laser emitter is used to perform three-dimensional measurement of the object under test by multiple laser lines. The position information of the center of the light stripe is obtained by combining nonmaximum suppression and gray-scale centroid extraction methods, and three-dimensional reconstruction is performed using camera parameters.
It improves the accuracy and robustness of 3D measurement, maintains high precision in the presence of local noise and reflections, and simplifies the calculation process.
Smart Images

Figure CN115218814B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional measurement technology, and in particular to a three-dimensional measurement method, a data processing device, an electronic device, and a storage medium. Background Technology
[0002] Three-dimensional measurement is the process of using three-dimensional instruments to scan and construct the surface morphology of an object to obtain the object's three-dimensional data.
[0003] In related technologies, active stereo vision technology can be divided into single-frame and multi-frame technologies from the perspective of the projection system. Single-frame technology uses a line laser to project laser beams onto the object's surface. The laser beams are reflected by the surface and captured by a camera, and information about the object's surface is obtained through the image formed by the reflected laser beams. Multi-frame technology projects multiple coded images onto the object's surface, thereby encoding each column of the acquired surface image to obtain surface information. However, in these methods, single-frame technology obtains less data, leading to poorer reliability of the measurement results; multi-frame technology is computationally complex, and data redundancy can easily prolong measurement time. Summary of the Invention
[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a three-dimensional measurement method, a data processing device, an electronic device, and a storage medium, which can improve the accuracy of three-dimensional measurement.
[0005] According to a first aspect of the present invention, a three-dimensional measurement method is applied to a three-dimensional measurement device, the three-dimensional measurement device including a binocular camera and a laser emitter, the laser emitter being used to emit multiple lines of laser light, the three-dimensional measurement method comprising:
[0006] The measurement image of the object under test is acquired by the binocular camera; wherein the measurement image is a surface image of the object under test under the illumination of multiple lines of laser light;
[0007] The first position information of the center of the laser beam for each line is obtained based on the measured image;
[0008] Obtain the parameter information of the binocular camera;
[0009] The object to be measured is subjected to three-dimensional measurement based on the first location information and the parameter information.
[0010] The three-dimensional measurement method according to embodiments of the present invention has at least the following beneficial effects: A three-dimensional measurement device consisting of two area array cameras (i.e., binocular cameras, including a first camera and a second camera) and a laser emitter enables three-dimensional measurement of the object under test using multiple line lasers. Furthermore, the three-dimensional measurement method provided in this application does not utilize morphological methods based on the measurement images when processing them. Therefore, compared to methods in related technologies, the three-dimensional measurement method provided in this application still exhibits better robustness even when the measurement images contain local noise and reflections, thereby improving the accuracy of the three-dimensional measurement of the object under test.
[0011] According to some embodiments of the present invention, the measurement image comprises multiple rows of pixels;
[0012] The step of obtaining the first position information of the center of each laser line based on the measured image includes:
[0013] Non-maximum suppression processing is performed on each of the pixel rows to obtain multiple seed pixels;
[0014] The first position information is obtained by extracting the grayscale centroid from multiple seed pixels.
[0015] According to some embodiments of the present invention, before performing non-maximum suppression processing on each of the pixel rows, the step of obtaining the first position information of the center of the laser stripe of each line laser based on the measurement image further includes:
[0016] The measured image is then filtered.
[0017] According to some embodiments of the present invention, obtaining the parameter information of the binocular camera includes:
[0018] Obtain the second and third position information of feature points on a preset calibration board; wherein, the second position information is used to characterize the position information of the feature points in the world coordinate system, and the third position information is used to characterize the position information of the feature points in the pixel coordinate system;
[0019] The homography matrix is obtained based on the second position information and the third position information;
[0020] The parameter information is obtained based on the homography matrix.
[0021] According to some embodiments of the present invention, the binocular camera includes a first camera and a second camera;
[0022] The step of performing three-dimensional measurement on the object to be measured based on the first position information and the parameter information includes:
[0023] The first position information is projected onto the first camera coordinate system of the first camera to obtain the calibration position information;
[0024] Based on the calibration position information, the optical center information of the first camera, and the parameter information, determine the coordinate information of the back projection point of each light stripe in the second camera coordinate system of the second camera;
[0025] Based on the coordinate information of multiple back-projection points, determine the target position information corresponding to the first position information in the second camera coordinate system;
[0026] The three-dimensional measurement of the object to be measured is performed based on the first location information and the target location information.
[0027] According to a second aspect of the present invention, a data processing apparatus is applied to a three-dimensional measuring device, the three-dimensional measuring device including a binocular camera and a laser emitter, the laser emitter being used to emit multiple lines of laser light, the data processing apparatus comprising:
[0028] The first module is used to acquire a measurement image of the object under test based on the binocular camera; wherein, the measurement image is a surface image of the object under test under the illumination of multiple lines of laser light;
[0029] The second module is used to obtain the first position information of the center of the laser stripe of each line laser based on the measurement image;
[0030] The third module is used to obtain parameter information of the binocular camera;
[0031] The fourth module is used to perform three-dimensional measurement on the object to be measured based on the first position information and the parameter information.
[0032] An electronic device according to a third aspect embodiment of the present invention includes:
[0033] At least one processor;
[0034] At least one memory for storing at least one program;
[0035] When the at least one program is executed by the at least one processor, the at least one processor implements the three-dimensional measurement method as described in any of the first aspects.
[0036] A computer-readable storage medium according to a third aspect of the present invention stores processor-executable instructions, which, when executed by a processor, are used to implement the three-dimensional measurement method as described in any of the second aspects.
[0037] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:
[0039] Figure 1 This is a flowchart illustrating a three-dimensional measurement method according to an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of the structure of a three-dimensional measuring device according to an embodiment of the present invention;
[0041] Figure 3 This is another flowchart illustrating the three-dimensional measurement method according to an embodiment of the present invention;
[0042] Figure 4 This is another flowchart illustrating the three-dimensional measurement method according to an embodiment of the present invention;
[0043] Figure 5 This is another flowchart illustrating the three-dimensional measurement method according to an embodiment of the present invention;
[0044] Figure 6 This is a schematic diagram illustrating the relationship between the back projection point and the light plane in an embodiment of the present invention;
[0045] Figure 7 This is a block diagram of a data processing device according to an embodiment of the present invention. Detailed Implementation
[0046] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0047] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0048] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0049] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0050] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0051] First, let's analyze some of the terms used in this application:
[0052] The world coordinate system represents the three-dimensional coordinates of an object in the real world.
[0053] The camera coordinate system is a coordinate system with the camera's optical center as the origin, and the optical axis coincides with the z-axis.
[0054] The image coordinate system represents the coordinate system of the image captured by the camera. The origin of the image coordinate system is the intersection of the camera's optical axis and the imaging plane, which is the center point of the image.
[0055] The pixel coordinate system, since the basic unit of an image is the pixel, represents the pixel position of a point on the image within the image storage matrix. The origin of the pixel coordinate system is the top-left corner of the image.
[0056] The units for the world coordinate system, camera coordinate system, and image coordinate system are all millimeters, while the unit for the pixel coordinate system is pixels.
[0057] Reference Figure 1 This application provides a three-dimensional measurement method applied to a three-dimensional measurement device. The three-dimensional measurement device includes a binocular camera and a laser emitter, wherein the laser emitter is used to emit multiple lines of laser light. The three-dimensional measurement method includes, but is not limited to, steps S110 to S140.
[0058] S110. Acquire a measurement image of the object to be measured using a binocular camera; wherein, the measurement image is a surface image of the object to be measured under multi-line laser illumination;
[0059] Understandably, referring to Figure 2 The three-dimensional measurement device includes a binocular camera for acquiring images of the object under test, a laser emitter for emitting multiple line lasers, and a data processing device for loading the three-dimensional measurement method provided in this application embodiment. The data processing device is communicatively connected to the binocular camera. When multiple line lasers are emitted onto the surface of the object under test via the laser emitter, the binocular camera can acquire a measurement image of the object under test through the reflection of the multiple line lasers. The binocular camera includes a first camera and a second camera; therefore, the measurement images include a first measurement image and a second measurement image. The first measurement image is generated by the first camera, and the second image is generated by the second camera. It is understood that the number of line lasers can be adaptively set according to actual measurement accuracy requirements, and this application embodiment does not specifically limit this. The image planes of the first camera and the second camera are coplanar, their optical axes are parallel, their principal distances are the same, and their image rows are aligned.
[0060] S120. Obtain the first position information of the center of the laser stripe for each line based on the measurement image;
[0061] It is understood that when a line laser is projected onto the surface of the object to be measured, a light stripe with a certain pixel width is formed at the interface between the line laser and the surface of the object. Therefore, multiple line lasers will form multiple light stripes on the surface of the object. The center of each light stripe is determined based on the first measurement image or the second measurement image, and the first position information of the center is determined. This first position information refers to the position of the light stripe center in the pixel coordinate system. It is understood that methods for extracting the light stripe center include extreme value methods, gray-level centroid methods, curve fitting methods, Steger algorithms based on the Hessian matrix, etc., and this embodiment does not specifically limit the specific methods used.
[0062] S130, Obtain parameter information from the binocular camera;
[0063] It is understood that obtaining the parameter information of the first and second cameras involves obtaining the intrinsic parameter matrix of the first camera, the intrinsic parameter matrix of the second camera, and the extrinsic parameter matrix between the first and second cameras. The intrinsic parameter matrix is related to the camera's own characteristics, such as its focal length and pixel size; the extrinsic parameter matrix is related to the camera's characteristics in the world coordinate system, such as its position and rotation direction. It is understood that the parameter information of the binocular cameras can be obtained using camera calibration methods, including traditional camera calibration methods, active vision camera calibration methods, and camera self-calibration methods. Traditional camera calibration methods include the Tsai two-step method and the Zhang calibration method; active vision camera calibration methods include methods where the active system controls the camera to perform specific movements; and camera self-calibration methods include hierarchical step-by-step calibration methods and methods based on the Kruppa method. This application does not specifically limit the camera calibration method used in its embodiments.
[0064] S140. Perform three-dimensional measurement on the object under test based on the first position information and parameter information.
[0065] It is understood that the first position information is used to characterize the position information of the center of the light stripe in the first or second measurement image in the pixel coordinate system. Therefore, for ease of explanation, in the embodiments of this application and the following embodiments, the first position information is taken as the position information of the center of a certain light stripe in the first measurement image in the pixel coordinate system. Specifically, the target position information of the corresponding position of the first position information in the second measurement image is obtained according to the first position information and parameter information, and then the three-dimensional measurement of the object to be measured can be realized by using the reprojection method.
[0066] It is understood that the reprojection method refers to converting the disparity map into distance using triangulation to output a depth map of the object under test. Specifically, the first position information and the target position information are used to calculate the difference, and the disparity map can be output based on the difference. It is understood that the specific implementation process of the reprojection method can be found in related technologies, and will not be described in detail in this application's embodiments.
[0067] The three-dimensional measurement method provided in this application embodiment utilizes a three-dimensional measurement device composed of two area array cameras (i.e., binocular cameras, including a first camera and a second camera) and a laser emitter to achieve three-dimensional measurement of the object under test using multiple line lasers. Furthermore, the three-dimensional measurement method provided in this application embodiment does not employ morphological methods based on the measurement images when processing them. Therefore, compared to methods in related technologies, the three-dimensional measurement method provided in this application embodiment still exhibits better robustness even when the measurement images contain local noise and reflections, thereby improving the accuracy of the three-dimensional measurement of the object under test.
[0068] Reference Figure 3The measured image includes multiple pixel rows, and step S120 includes, but is not limited to, sub-steps S310 to S320.
[0069] S310. Perform non-maximum suppression processing on each pixel row to obtain multiple seed pixels;
[0070] It is understood that the first measurement image comprises multiple pixel rows, and a 1*(2n+1) filter kernel is used to perform non-maximum suppression processing on each pixel row to locate the extreme points of each light stripe. Non-maximum suppression (NMS) is used to suppress elements that are not maxima, thereby performing a local maximum search. For example, assuming the laser emitter emits i lines of laser light, after NMS processing, the pixel point with the local maximum value of each line of laser light is used as the seed pixel point. It is understood that the specific value of the half-window size n of the filter kernel can be adaptively selected according to actual needs, and this embodiment does not specifically limit this.
[0071] S320. Extract the grayscale centroid based on multiple seed pixels to obtain the first position information.
[0072] Understandably, in each pixel row of the first test image, a 1*(2m+1) centroid window is expanded with each seed pixel as the window center to obtain the sub-pixel level window center. This sub-pixel level window center is taken as the light stripe center, and the position information of this sub-pixel level window center in the pixel coordinate system is taken as the first position information. Specifically, taking the gray-scale centroid method for extracting the light stripe center as an example, assume that the coordinates of each pixel in the cross section of a certain light stripe in the i-th row of the pixel coordinate system are (x... i ,y i ), where x i =i,y j =j, representing the coordinates of the pixel in the i-th row and j-th column, where the grayscale value of the pixel is g(x). i ,y i Therefore, the center coordinates (x, y) of the cross section of the light stripe can be calculated according to the following formula (1). c ,y c (i.e., first position information).
[0073]
[0074] Understandably, when performing non-maximum suppression on each pixel row, the center coordinates of a region are first determined. When the window is expanded, the coordinates of other pixels in the window are determined based on the center coordinates of that region and the window length, thus obtaining the coordinates of each pixel in the first measured image.
[0075] In some embodiments, before step S310, step S120 further includes a sub-step: filtering the measurement image.
[0076] It is understood that, in order to reduce the impact of noise in the first measurement image on the subsequent extraction of the first position information, a filtering preprocessing is performed on the first measurement image before performing non-maximum suppression processing on each pixel row in the first measurement image. This filtering preprocessing includes median filtering and Gaussian filtering. It is understood that, depending on the actual extraction requirements, other filtering preprocessing methods can also be selected, and this application embodiment does not specifically limit them.
[0077] Reference Figure 4 In some embodiments, step S130 includes, but is not limited to, sub-steps S410 to S430.
[0078] S410. Obtain the second position information and the third position information of the feature points on the preset calibration board; wherein, the second position information is used to characterize the position information of the feature points in the world coordinate system, and the third position information is used to characterize the position information of the feature points in the pixel coordinate system.
[0079] S420. Obtain the homography matrix based on the second and third position information;
[0080] S430. Obtain parameter information based on the homography matrix.
[0081] It is understood that this application embodiment uses Zhang's calibration method (i.e., Zhang Zhengyou calibration method) for camera calibration to obtain the intrinsic parameter matrix of the first camera, the intrinsic parameter matrix of the second camera, and the extrinsic parameter matrix between the first and second cameras. Specifically, a checkerboard-style calibration board is pre-set, and the second position information of any feature point on the calibration board in the world coordinate system and the third position information of the feature point in the pixel coordinate system are obtained. At least four feature points are set on the calibration board to calculate the homography matrix based on the second and third position information of these four feature points. Homography is used to characterize the projection mapping from one plane to another, so the homography matrix is used to characterize the mapping relationship from the image plane to the world plane. It is understood that the homography matrix is a combination of the intrinsic parameter matrix and the extrinsic parameter matrix, so it is also necessary to solve the intrinsic parameter matrix according to the constraint conditions, and then calculate the extrinsic parameter matrix based on the intrinsic parameter matrix to obtain the parameter information of the stereo camera. It is understood that the specific calculation methods for the intrinsic parameter matrix and the extrinsic parameter matrix can be found in the calculation process of Zhang's calibration method in related technologies, and this application will not provide specific details on this.
[0082] Reference Figure 5 In some embodiments, step S140 includes, but is not limited to, sub-steps S510 to S540.
[0083] S510. Project the first position information onto the first camera coordinate system of the first camera to obtain the calibration position information;
[0084] Understandably, referring to Figure 6 The first position information obtained according to the above steps is projected onto the first camera coordinate system to obtain point a1. The position information of point a1 in the first camera coordinate system is used as the calibration position information.
[0085] S520. Based on the calibration position information, the optical center information of the first camera, and the parameter information, determine the coordinate information of the back projection point of each light stripe in the second camera coordinate system of the second camera.
[0086] Understandably, a connecting ray is constructed based on the optical center O1 and point a1 of the first camera, and the intersection points of this ray with all light planes are obtained. These intersection points are then transformed into the second camera coordinate system using an extrinsic parameter matrix to determine their backprojection points in the second test image. For example, assuming there are three light planes, three backprojection points b1, b2, and b3 will be formed in the second test image.
[0087] Specifically, the position information of the back-projection point can be calculated as follows: Assuming that the light plane corresponding to the first position information is located in the first camera coordinate system, the light plane equation is Ax+By+Cz+D=0, then the coordinates of the point corresponding to the first position information in the first camera coordinate system are (x1, y1, z1) (i.e., the coordinates of point a1). According to the perspective projection principle of pinhole imaging, the relationship between point a1 and the spatial point can be obtained (as shown in equation (2) below), where s1 is a constant factor, and (u1, v1) are the coordinates of the projection point in the pixel coordinate system when the first position information is projected onto the first camera coordinate system.
[0088]
[0089] Then, by combining equation (2) and the equation of the light plane, we can obtain the following equation (3).
[0090]
[0091] Assuming the coordinates of the projection point obtained by projecting the first position information onto the second camera coordinate system are (u2, v2), according to the perspective principle of pinhole imaging and the external parameter matrix RT, we can obtain the following equation (4). Wherein, s2 is a constant factor.
[0092]
[0093] Combining equations (3) and (4), we obtain equation (5) as follows. Where s3 is a constant factor.
[0094]
[0095] The coordinates of the back-projection point b1 can be obtained by using equation (5) and the known parameters (including the intrinsic parameter matrix of the first camera, the intrinsic parameter matrix of the second camera, the coordinates of the projection points (u1, v1), (u2, v2), the extrinsic parameter matrix, and the equation of the light plane). Similarly, the coordinates of the back-projection points b2 and b3 can be calculated using the same method.
[0096] S530. Determine the target position information corresponding to the first position information in the second camera coordinate system based on the coordinate information of multiple back projection points;
[0097] It is understandable that by acquiring row information of multiple back-projection points in the second test image, traversing the center points of that row information in the second test image, and taking the center point closest to the projection point as the target point ar, the position information of the target point ar is the target position information. It is also understandable that the center point in the second test image is the projection point of the grayscale centroid obtained according to the above method in the second camera coordinate system.
[0098] S540. Perform three-dimensional measurement on the object to be measured based on the first position information and the target position information.
[0099] It is understandable that the three-dimensional measurement of the object under test can be achieved by using spatial triangulation, the intrinsic parameter matrix of the first camera, the intrinsic parameter matrix of the second camera, and the first position information and target position information obtained according to the above method.
[0100] Reference Figure 7 This application also provides a data processing device applied to a three-dimensional measurement device. The three-dimensional measurement device includes a binocular camera and a laser emitter. The laser emitter emits multiple laser lines. The data processing device includes:
[0101] The first module 710 is used to acquire a measurement image of the object under test using a binocular camera; wherein, the measurement image is a surface image of the object under test under multi-line laser illumination;
[0102] The second module 720 is used to obtain the first position information of the center of the laser stripe of each line laser based on the measurement image;
[0103] The third module 730 is used to acquire parameter information from the stereo camera;
[0104] The fourth module 740 is used to perform three-dimensional measurement of the object under test based on the first position information and parameter information.
[0105] It is evident that the contents of the above-described three-dimensional measurement method embodiments are all applicable to the embodiments of this data processing device. The specific functions implemented by the embodiments of this data processing device are the same as those of the above-described three-dimensional measurement method embodiments, and the beneficial effects achieved are also the same as those achieved by the above-described three-dimensional measurement method embodiments.
[0106] This application also provides an electronic device, comprising: at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions that are executed by the at least one processor to cause the at least one processor to perform the three-dimensional measurement method as described in any of the above embodiments.
[0107] This application provides a computer-readable storage medium storing computer-executable instructions for performing the three-dimensional measurement method described in any of the above embodiments.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0110] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application. Furthermore, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other.
Claims
1. A method of three-dimensional measurement, applied to a three-dimensional measurement device, the three-dimensional measurement device comprising a binocular camera, a laser emitter for emitting a plurality of line lasers, characterized in that, The three-dimensional measurement method comprises: According to the binocular camera, a measurement image of an object to be measured is acquired; wherein the measurement image is a surface image of the object to be measured under irradiation of a plurality of line lasers, the measurement image comprises a first measurement image and a second measurement image, and the measurement image comprises a plurality of pixel rows; According to the measurement image, first position information of a light strip center of each line laser is acquired, comprising: performing non-maximum suppression processing on each of the pixel rows to obtain a plurality of seed pixel points, and performing gray gravity extraction on the plurality of seed pixel points to obtain the first position information, wherein the first position information represents position information of the light strip center in a pixel coordinate system in the first measurement image or the second measurement image, and the seed pixel point is a pixel point corresponding to a local maximum value of each line laser; Parameter information of the binocular camera is acquired, comprising: Second position information and third position information of feature points on a preset calibration board are acquired; wherein the second position information represents position information of the feature points in a world coordinate system, and the third position information represents position information of the feature points in a pixel coordinate system; A homography matrix is obtained according to the second position information and the third position information; The parameter information is obtained according to the homography matrix; Three-dimensional measurement of the object to be measured is performed according to the first position information and the parameter information.
2. The three-dimensional measurement method according to claim 1, characterized in that, Before the non-maximum suppression processing is performed on each of the pixel rows, the first position information of the light strip center of each line laser is acquired according to the measurement image, further comprising: The measurement image is filtered.
3. The three-dimensional measurement method according to claim 1, characterized by, The binocular camera comprises a first camera and a second camera; The three-dimensional measurement of the object to be measured according to the first position information and the parameter information comprises: The first position information is projected into a first camera coordinate system of the first camera to obtain calibration position information; According to the calibration position information, optical center information of the first camera, and the parameter information, coordinate information of a back projection point of each light strip in a second camera coordinate system of the second camera is determined; According to the coordinate information of the plurality of back projection points, target position information corresponding to the first position information in the second camera coordinate system is determined; The three-dimensional measurement of the object to be measured is performed according to the first position information and the target position information.
4. A data processing device applied to a three-dimensional measuring device, the three-dimensional measuring device comprising a binocular camera, a laser emitter for emitting a plurality of line lasers, characterized in that, The data processing device comprises: A first module is configured to acquire a measurement image of an object to be measured according to a binocular camera; wherein the measurement image is a surface image of the object to be measured under irradiation of a plurality of line lasers, the measurement image comprises a first measurement image and a second measurement image, and the measurement image comprises a plurality of pixel rows; The second module is configured to acquire first position information of the light strip center of each line laser according to the measurement image, and includes: performing non-maximum suppression processing on each of the pixel rows to obtain a plurality of seed pixel points, and performing gray gravity extraction according to the plurality of seed pixel points to obtain the first position information, wherein the first position information represents position information of the light strip center in a pixel coordinate system in the first measurement image or the second measurement image, and the seed pixel points are pixel points corresponding to local maximum values of each line laser. The third module is configured to acquire parameter information of the binocular camera, and includes: acquiring second position information and third position information of feature points on a preset calibration board, wherein the second position information is used to represent position information of the feature points in a world coordinate system, and the third position information is used to represent position information of the feature points in a pixel coordinate system. A homography matrix is obtained according to the second position information and the third position information. The parameter information is obtained according to the homography matrix. The fourth module is configured to perform three-dimensional measurement on the object to be measured according to the first position information and the parameter information.
5. An electronic device, characterized by The three-dimensional measurement method includes: at least one processor; at least one memory configured to store at least one program; when the at least one program is executed by the at least one processor, the at least one processor is caused to implement the three-dimensional measurement method according to any one of claims 1 to 3.
6. A computer readable storage medium having stored processor-executable instructions embodied therein, characterized in that, The processor-executable instructions, when executed by the processor, are used to implement the three-dimensional measurement method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Binocular stereo vision three-dimensional measurement method based on line structured light scanning
CN107907048A
System and method for measuring parallel multi-line laser based on homography matrix
CN109186491A