Three-dimensional measurement method and equipment based on binocular stereo vision
Through the three-dimensional measurement method based on binocular stereo vision, the shortcomings of the existing technology in detail capture and high-precision measurement are solved, and high-precision detection of microscopic cracks on the surface of the object is achieved, thereby improving the accuracy of the three-dimensional measurement.
Patent Information
- Application Number
- CN202110649493.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-06-10
AI Technical Summary
The existing structured light measurement methods have shortcomings in detail capture and high-precision measurement, and cannot effectively analyze and detect microscopic cracks on the surface of an object, and have low absolute measurement accuracy.
Using a three-dimensional measurement method based on binocular stereo vision, the light source direction and position of binocular structured light is calibrated, the sub-pixel correspondence relationship between left and right cameras is determined, the gradient value and pixel gray value of the image captured by the camera are obtained, and the interpolation and The rotation transformation matrix is determined and the object to be tested is finally reconstructed in three-dimensionally.
It realizes high-precision detection of microscopic cracks on the surface of an object, improves the accuracy and detail capture capabilities of three-dimensional measurements, and is suitable for high-precision measurement occasions.
Smart Images

Figure CN113538680B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of three-dimensional object detection, and in particular to a three-dimensional measurement method and device based on binocular stereoscopic vision. Background Art
[0002] Currently, optical vision technology is widely used in reverse modeling, cultural relic restoration and 3D detection projects. However, due to the weak ability of structured light measurement method to capture details, it is unable to analyze and detect micro cracks on the surface of objects, and due to the low absolute measurement accuracy, it is not competent for high-precision measurement occasions. Therefore, the development of a 3D measurement method and equipment based on binocular stereoscopic vision can effectively overcome the defects in the above-mentioned related technologies, which has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0003] In view of the above problems existing in the prior art, an embodiment of the present invention provides a three-dimensional measurement method and device based on binocular stereoscopic vision.
[0004] In a first aspect, an embodiment of the present invention provides a three-dimensional measurement method based on binocular stereoscopic vision, including: calibrating the light source direction and position of the binocular structured light, projecting a grating through a projector to trigger a camera to take pictures, collecting grating coded images, decoding the grating coded images, and determining the sub-pixel correspondence between left and right cameras; controlling the light sources to light up in sequence, triggering the left camera and the right camera to collect images under different light sources, obtaining a first gradient value and a first pixel grayscale value of the image taken by the left camera, and obtaining a second gradient value and a second pixel grayscale value of the image taken by the right camera; interpolating the second gradient value of the right camera to obtain a third gradient value, and determining the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras; and reconstructing the object to be measured in three dimensions according to the third gradient value or the first gradient value.
[0005] Based on the content of the above method embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the step of obtaining the first gradient value and the first pixel gray value of the image captured by the left camera includes:
[0006]
[0007] in, is the first pixel grayscale value of the i-th pixel in the image taken by the left camera; ρ is the albedo; L1 is the matrix composed of the light source in the direction of the left camera; N1 is the first gradient value of the i-th pixel; T is the transposed matrix label.
[0008] Based on the content of the above method embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the second gradient value and the second pixel gray value of the image taken by the right camera are obtained, including:
[0009]
[0010] in, is the second pixel grayscale value of the i-th pixel point in the image taken by the right camera; L2 is the matrix composed of the light source in the direction of the right camera; N2 is the second gradient value of the i-th pixel point.
[0011] Based on the content of the above method embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the second gradient value of the right camera is interpolated to obtain a third gradient value, including:
[0012]
[0013]
[0014]
[0015]
[0016]
[0017] Among them, Q 11 , Q 12 , Q 21 and Q 22 are all original gradient values; (x, y) are the coordinate points corresponding to the grayscale value of the second pixel; is the integer symbol; R1 and R2 are intermediate variables; (x1, y1) is the point Q 11 The coordinates of point Q; (x1, y2) is the coordinates of point Q 12 The coordinates of point Q; (x2, y1) is the coordinates of point Q 21 The coordinates of point Q; (x2, y2) is the coordinates of point Q 22 The coordinates of ; f is the interpolation function; P is the interpolation point.
[0018] Based on the content of the above method embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value are determined according to the sub-pixel correspondence between the left and right cameras, including:
[0019]
[0020] Among them, R is the rotation transformation matrix between the left and right cameras, which is determined by the sub-pixel correspondence between the left and right cameras; is the third gradient value.
[0021] Based on the contents of the above method embodiments, a three-dimensional measurement method based on binocular stereoscopic vision is provided in an embodiment of the present invention, wherein three-dimensional reconstruction of the object to be measured is performed according to the third gradient value or the first gradient value, including: integrating the third gradient or the first gradient to obtain three-dimensional point cloud data of the surface of the object to be measured; and differentiating the third gradient or the first gradient to obtain surface curvature data of the object to be measured.
[0022] In a second aspect, an embodiment of the present invention provides a three-dimensional measurement system based on binocular stereoscopic vision, comprising: a projector, used to project a grating to trigger left and right cameras to capture images; a left camera and a right camera, both used to capture image data; a first light source, a second light source, a third light source and a fourth light source, all used for lighting; a controller, used to implement the three-dimensional measurement method based on binocular stereoscopic vision as described in any embodiment of the first aspect.
[0023] In a third aspect, an embodiment of the present invention provides a three-dimensional measurement device based on binocular stereoscopic vision, including: a first main module, used to calibrate the light source direction and position of the binocular structured light, a projector projects a grating to trigger a camera to take pictures, collects grating encoded images, decodes grating encoded images, and determines the sub-pixel correspondence between left and right cameras; a second main module, used to control the light sources to light up in sequence, trigger the left camera and the right camera to collect images under different light sources, obtain the first gradient value and the first pixel grayscale value of the image taken by the left camera, and obtain the second gradient value and the second pixel grayscale value of the image taken by the right camera; a third main module, used to interpolate the second gradient value of the right camera to obtain a third gradient value, and determine the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras; a fourth main module, used to perform three-dimensional reconstruction of the object to be measured according to the third gradient value or the first gradient value.
[0024] In a fourth aspect, an embodiment of the present invention provides an electronic device, including:
[0025] at least one processor; and
[0026] at least one memory in communication with the processor, wherein:
[0027] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the three-dimensional measurement method based on binocular stereoscopic vision provided by any one of the various implementations of the first aspect.
[0028] In a fifth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute a three-dimensional measurement method based on binocular stereoscopic vision provided by any one of the various implementation methods of the first aspect.
[0029] The three-dimensional measurement method and device based on binocular stereoscopic vision provided by the embodiment of the present invention determine the sub-pixel correspondence between the left and right cameras, and determine the rotation transformation matrix between the left and right cameras, as well as the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras. Finally, according to the third gradient value or the first gradient value, the three-dimensional reconstruction of the object to be measured is performed, and the surface micro cracks of the object to be measured can be detected, and the accuracy of the detection result is relatively high. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 A flow chart of a three-dimensional measurement method based on binocular stereoscopic vision provided by an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of the structure of a three-dimensional measurement device based on binocular stereoscopic vision provided by an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention;
[0034] Figure 4 A schematic diagram of the structure of a three-dimensional measurement system based on binocular stereo vision provided by an embodiment of the present invention;
[0035] Figure 5 A schematic diagram of the principle of interpolating point gradients provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0037] The embodiment of the present invention provides a three-dimensional measurement method based on binocular stereo vision, see Figure 1 The method includes: calibrating the light source direction and position of the binocular structured light, projecting a grating through a projector to trigger a camera to take a picture, collecting a grating coded image, decoding the grating coded image, and determining the sub-pixel correspondence between the left and right cameras; controlling the light sources to light up in sequence, triggering the left camera and the right camera to collect images illuminated by different light sources, obtaining a first gradient value and a first pixel grayscale value of the image captured by the left camera, and obtaining a second gradient value and a second pixel grayscale value of the image captured by the right camera; interpolating the second gradient value of the right camera to obtain a third gradient value, and determining the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras; and performing three-dimensional reconstruction on the object to be measured according to the third gradient value or the first gradient value.
[0038] Based on the content of the above method embodiment, as an optional embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, wherein the step of obtaining the first gradient value and the first pixel gray value of the image captured by the left camera includes:
[0039]
[0040] in, is the first pixel grayscale value of the i-th pixel in the image taken by the left camera; ρ is the albedo; L1 is the matrix composed of the light source in the direction of the left camera; N1 is the first gradient value of the i-th pixel; T is the transposed matrix label.
[0041] Based on the content of the above method embodiment, as an optional embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, wherein the second gradient value and the second pixel gray value of the image captured by the right camera are obtained, includes:
[0042]
[0043] in, is the second pixel grayscale value of the i-th pixel point in the image taken by the right camera; L2 is the matrix composed of the light source in the direction of the right camera; N2 is the second gradient value of the i-th pixel point.
[0044] Based on the content of the above method embodiment, as an optional embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the second gradient value of the right camera is interpolated to obtain a third gradient value, including:
[0045]
[0046]
[0047]
[0048] Among them, Q 11 , Q 12 , Q 21 and Q 22 are all original gradient values; (x, y) are the coordinate points corresponding to the grayscale value of the second pixel; is the integer symbol; R1 and R2 are intermediate variables; (x1, y1) is the point Q 11 The coordinates of point Q; (x1, y2) is the coordinates of point Q 12 The coordinates of point Q; (x2, y1) is the coordinates of point Q 21 The coordinates of point Q; (x2, y2) is the coordinates of point Q 22 The coordinates of ; f is the interpolation function; P is the interpolation point.
[0049] For details, please refer to Figure 5 , click Q 11 , Q 12 , Q 21 and Q 22 is the original gradient value, point P is the interpolation point of the inserted gradient value, and its coordinates are also (x, y), point Q 11 With Q 21 Point R1 is used as the intermediate variable of transition, and point Q 12 With Q 22 Point R2 is used as the intermediate variable in the transition. The interpolation process of point P can be realized by substituting the coordinates of each point into equations (3) to (5).
[0050] Based on the content of the above method embodiment, as an optional embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the determination of the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras includes:
[0051]
[0052] Among them, R is the rotation transformation matrix between the left and right cameras, which is determined by the sub-pixel correspondence between the left and right cameras; is the third gradient value.
[0053] Based on the content of the above method embodiment, as an optional embodiment, the three-dimensional measurement method based on binocular stereoscopic vision provided in the embodiment of the present invention, the three-dimensional reconstruction of the object to be measured according to the third gradient value or the first gradient value, includes: integrating the third gradient or the first gradient to obtain the three-dimensional point cloud data of the surface of the object to be measured; differentiating the third gradient or the first gradient to obtain the surface curvature data of the object to be measured. It should be noted that the difference and integration of the third gradient or the first gradient both adopt the existing difference and integration means, which will not be repeated here.
[0054] The three-dimensional measurement method based on binocular stereoscopic vision provided by the embodiment of the present invention determines the sub-pixel correspondence between the left and right cameras, determines the rotation transformation matrix between the left and right cameras, and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras, and finally reconstructs the object to be measured in three dimensions according to the third gradient value or the first gradient value. The surface micro cracks of the object to be measured can be detected, and the detection result has high accuracy.
[0055] The embodiment of the present invention provides a three-dimensional measurement system based on binocular stereo vision, see Figure 4 , the system includes: a projector for projecting a grating to trigger the left and right cameras to collect images; a left camera and a right camera, both for collecting image data; a first light source, a second light source, a third light source and a fourth light source, all for lighting; a controller for implementing a three-dimensional measurement method based on binocular stereoscopic vision as described in any of the above method embodiments. Specifically, first, the projector projects a grating to trigger the camera to collect images; then the controller controls the light sources to light up in sequence, triggering the camera to collect images under different light sources; finally, the collected image data is used to perform three-dimensional reconstruction of the object to be measured.
[0056] A three-dimensional measurement system based on binocular stereoscopic vision provided by an embodiment of the present invention can stably and reliably realize the measurement of the three-dimensional morphology, gradient and curvature of the surfaces of various translucent, black and opaque objects; by collecting multimodal data such as three-dimensional point clouds, gradients and curvatures, it provides sufficient and comprehensive data for defect detection, and performs excellently in the measurement of highly consistent defects and backgrounds.
[0057] The implementation basis of each embodiment of the present invention is to implement programmed processing through a device with a processor function. Therefore, in engineering practice, the technical solutions and functions of each embodiment of the present invention can be encapsulated into various modules. Based on this reality, on the basis of the above embodiments, the embodiment of the present invention provides a three-dimensional measurement device based on binocular stereoscopic vision, which is used to execute the three-dimensional measurement method based on binocular stereoscopic vision in the above method embodiment. Figure 2 The device includes: a first main module, which is used to calibrate the light source direction and position of the binocular structured light, project a grating on the projector to trigger the camera to take pictures, collect grating coded images, decode the grating coded images, and determine the sub-pixel correspondence between the left and right cameras; a second main module, which is used to control the light sources to light up in sequence, trigger the left camera and the right camera to collect images under different light sources, obtain the first gradient value and the first pixel gray value of the image taken by the left camera, and obtain the second gradient value and the second pixel gray value of the image taken by the right camera; a third main module, which is used to interpolate the second gradient value of the right camera to obtain a third gradient value, and determine the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras; a fourth main module, which is used to perform three-dimensional reconstruction of the object to be measured according to the third gradient value or the first gradient value.
[0058] The three-dimensional measurement device based on binocular stereo vision provided by the embodiment of the present invention adopts Figure 2 Several modules in the method determine the sub-pixel correspondence between the left and right cameras, determine the rotation transformation matrix between the left and right cameras, and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras, and finally perform three-dimensional reconstruction of the object to be tested according to the third gradient value or the first gradient value. The surface micro cracks of the object to be tested can be detected, and the accuracy of the detection result is high.
[0059] It should be noted that the device in the device embodiment provided by the present invention can be used to implement the method in the above method embodiment as well as the method in other method embodiments provided by the present invention. The only difference is that the corresponding functional modules are set, and the principle is basically the same as the principle of the above device embodiment provided by the present invention. As long as the technical personnel in the field refer to the specific technical solutions in other method embodiments on the basis of the above device embodiment, obtain the corresponding technical means and the technical solutions composed of these technical means by combining technical features, the device in the above device embodiment can be improved on the premise of ensuring the practicality of the technical solution, thereby obtaining the corresponding device class embodiment, which is used to implement the methods in other method class embodiments. For example:
[0060] Based on the content of the above device embodiment, as an optional embodiment, the three-dimensional measurement device based on binocular stereoscopic vision provided in the embodiment of the present invention further includes: a first submodule, which is used to implement the acquisition of the first gradient value and the first pixel grayscale value of the image captured by the left camera, including:
[0061]
[0062] in, is the first pixel grayscale value of the i-th pixel in the image taken by the left camera; ρ is the albedo; L1 is the matrix composed of the light source in the direction of the left camera; N1 is the first gradient value of the i-th pixel; T is the transposed matrix label.
[0063] Based on the content of the above device embodiment, as an optional embodiment, the three-dimensional measurement device based on binocular stereoscopic vision provided in the embodiment of the present invention further includes: a second submodule, which is used to implement and obtain the second gradient value and the second pixel grayscale value of the image taken by the right camera, including:
[0064]
[0065] in, is the second pixel grayscale value of the i-th pixel point in the image taken by the right camera; L2 is the matrix composed of the light source in the direction of the right camera; N2 is the second gradient value of the i-th pixel point.
[0066] Based on the content of the above device embodiment, as an optional embodiment, the three-dimensional measurement device based on binocular stereoscopic vision provided in the embodiment of the present invention further includes: a third submodule, which is used to implement the interpolation of the second gradient value of the right camera to obtain a third gradient value, including:
[0067]
[0068]
[0069]
[0070]
[0071]
[0072] Among them, Q 11 , Q 12 , Q 21 and Q 22 are all original gradient values; (x, y) are the coordinate points corresponding to the grayscale value of the second pixel; is the integer symbol; R1 and R2 are intermediate variables; (x1, y1) is the point Q 11 The coordinates of point Q; (x1, y2) is the coordinates of point Q 12 The coordinates of point Q; (x2, y1) is the coordinates of point Q 21 The coordinates of point Q; (x2, y2) is the coordinates of point Q 22 The coordinates of ; f is the interpolation function; P is the interpolation point.
[0073] Based on the content of the above device embodiment, as an optional embodiment, the three-dimensional measurement device based on binocular stereoscopic vision provided in the embodiment of the present invention further includes: a fourth submodule, which is used to implement the determination of the rotation transformation matrix between the left and right cameras and the relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras, including:
[0074]
[0075] Among them, R is the rotation transformation matrix between the left and right cameras, which is determined by the sub-pixel correspondence between the left and right cameras; is the third gradient value.
[0076] Based on the contents of the above-mentioned device embodiments, as an optional embodiment, the three-dimensional measurement device based on binocular stereoscopic vision provided in the embodiments of the present invention further includes: a fifth submodule, used to realize the three-dimensional reconstruction of the object to be measured according to the third gradient value or the first gradient value, including: integrating the third gradient or the first gradient to obtain three-dimensional point cloud data of the surface of the object to be measured; differentiating the third gradient or the first gradient to obtain surface curvature data of the object to be measured.
[0077] The method of the embodiment of the present invention is implemented by relying on electronic devices, so it is necessary to introduce the relevant electronic devices. Based on this purpose, the embodiment of the present invention provides an electronic device, such as Figure 3As shown, the electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus, wherein at least one processor, the communication interface, and at least one memory communicate with each other through the communication bus. At least one processor can call the logic instructions in at least one memory to execute all or part of the steps of the method provided by the aforementioned various method embodiments.
[0078] In addition, the logic instructions in the at least one memory mentioned above can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each method embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0079] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0081] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. Based on this understanding, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and sometimes in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0082] In this patent, the terms "include", "comprises" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional measurement method based on binocular stereoscopic vision, characterized in that: include: The direction and position of the binocular structured light source are calibrated, the projector projects a grating to trigger the camera to take pictures, collects the grating coded image, decodes the grating coded image, and determines the sub-pixel correspondence between the left and right cameras; the light sources are controlled to light up in sequence, triggering the left camera and the right camera to collect images under different light sources, obtaining the first gradient value and the first pixel grayscale value of the image taken by the left camera, and obtaining the second gradient value and the second pixel grayscale value of the image taken by the right camera; The second gradient value of the right camera is interpolated to obtain a third gradient value, including: in, , , and All are original gradient values; is the coordinate point corresponding to the gray value of the second pixel; is the integer symbol; and All are intermediate variables; For point The coordinates of For point The coordinates of For point The coordinates of For point The coordinates of; f is the interpolation function; P is the interpolation point; is the second gradient value of the i-th pixel; Determining a rotation transformation matrix between the left and right cameras and a relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras includes: in, is the first gradient value of the i-th pixel; R is the rotation transformation matrix between the left and right cameras, which is determined by the sub-pixel correspondence between the left and right cameras; is the third gradient value; According to the third gradient value or the first gradient value, three-dimensional reconstruction is performed on the object to be measured, including: integrating the third gradient value or the first gradient value to obtain three-dimensional point cloud data of the surface of the object to be measured; and differentiating the third gradient value or the first gradient value to obtain curvature data of the surface of the object to be measured.
2. The three-dimensional measurement method based on binocular stereoscopic vision according to claim 1, characterized in that: The step of obtaining a first gradient value and a first pixel grayscale value of an image captured by a left camera includes: in, is the first pixel grayscale value of the i-th pixel of the image taken by the left camera; is the albedo; is the matrix composed of the light source in the left camera direction; is the first gradient value of the i-th pixel; T is the transposed matrix label.
3. The three-dimensional measurement method based on binocular stereoscopic vision according to claim 2, characterized in that: The step of obtaining a second gradient value and a second pixel grayscale value of the image captured by the right camera includes: in, is the second pixel grayscale value of the i-th pixel of the image taken by the right camera; is the matrix composed of the light source in the right camera direction; is the second gradient value of the i-th pixel.
4. A three-dimensional measurement system based on binocular stereoscopic vision, characterized in that: include: A projector is used to project a grating to trigger the left and right cameras to collect images; the left camera and the right camera are both used to collect image data; the first light source, the second light source, the third light source and the fourth light source are all used for lighting; and a controller is used to implement the three-dimensional measurement method based on binocular stereoscopic vision as described in any one of claims 1 to 3.
5. A three-dimensional measurement device based on binocular stereoscopic vision, characterized in that: include: The first main module is used to calibrate the light source direction and position of the binocular structured light, project a grating to trigger the camera to take pictures, collect the grating coded image, decode the grating coded image, and determine the sub-pixel correspondence between the left and right cameras; The second main module is used to control the light sources to light up in sequence, trigger the left camera and the right camera to collect images under different light sources, obtain the first gradient value and the first pixel gray value of the image taken by the left camera, and obtain the second gradient value and the second pixel gray value of the image taken by the right camera; The third main module is used to interpolate the second gradient value of the right camera to obtain a third gradient value, including: in, , , and All are original gradient values; is the coordinate point corresponding to the gray value of the second pixel; is the integer symbol; and All are intermediate variables; For point The coordinates of For point The coordinates of For point The coordinates of For point The coordinates of; f is the interpolation function; P is the interpolation point; is the second gradient value of the i-th pixel; Determining a rotation transformation matrix between the left and right cameras and a relationship between the third gradient value and the first gradient value according to the sub-pixel correspondence between the left and right cameras includes: in, is the first gradient value of the i-th pixel; R is the rotation transformation matrix between the left and right cameras, which is determined by the sub-pixel correspondence between the left and right cameras; is the third gradient value; The fourth main module is used to perform three-dimensional reconstruction of the object to be measured according to the third gradient value or the first gradient value, including: integrating the third gradient value or the first gradient value to obtain three-dimensional point cloud data of the surface of the object to be measured; differentiating the third gradient value or the first gradient value to obtain curvature data of the surface of the object to be measured.
6. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 3.
7. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method of any one of claims 1 to 3.
Citation Information
Patent Citations
Movement interference field calibration method and system based on time heterodyne projection
CN104463863A
Object three-dimension model construction method based on image processing
CN107240149A