Binocular 3D imaging method and system based on novel speckle feature coding
Through the new speckle feature encoding technology, the randomness and low coupling characteristics are used, combined with the texture information of the measured target, the problem of slow imaging speed and sensitivity to strong light of the structured light binocular three-dimensional imaging system is solved, and the three-dimensional imaging accuracy is improved. Speed, suitable for imaging of multiple cameras and complex surfaces.
Patent Information
- Application Number
- CN202010966172.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-15
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-09-15
AI Technical Summary
The existing structured light binocular three-dimensional imaging system has problems such as slow three-dimensional imaging speed, sensitive to strong light environments, not suitable for use by multiple cameras at the same time, and poor imaging effects on reflective objects and small angles on sides.
Using a binocular three-dimensional imaging method based on the new speckle feature encoding, the random new speckle feature encoding map is generated, and its randomness and low coupling characteristics are used to reduce the dependence on structured light encoding. Combined with the texture information of the measured target, the Parallax search and subpixel interpolation generate depth maps and point cloud maps with high accuracy.
It improves the accuracy and speed of three-dimensional imaging, reduces dependence on strong light environments, is suitable for use by multiple cameras at the same time, and improves the imaging effect of reflective objects and small angled sides.
Smart Images

Figure CN112102335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional measurement technology, and in particular to a binocular three-dimensional imaging method and system based on novel speckle feature coding. Background Art
[0002] The existing structured light binocular 3D imaging system generally performs structured light encoding (feature calibration) on the space or target object by projecting a stripe coding pattern, thereby improving the 3D imaging accuracy of binocular stereo vision. However, the existing structured light binocular 3D imaging system needs to project at least 10 stripe structured light codes to achieve 3D imaging, and the 3D imaging speed is slow. Moreover, the existing structured light binocular 3D imaging system relies too much on the coding information of structured light when performing block matching, and is greatly disturbed in a strong light environment, and is not conducive to the simultaneous use of multiple binocular structured light cameras. At the same time, for the reflective surface of the object and the side with a small angle, incomplete light information will appear, resulting in incomplete 3D imaging and poor 3D imaging effect.
[0003] In view of this, it is necessary to provide a binocular three-dimensional imaging method and system based on novel speckle feature coding that can solve the above-mentioned defects so as to improve the effect and efficiency of three-dimensional imaging. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a binocular three-dimensional imaging method based on novel speckle feature coding to improve the effect and efficiency of three-dimensional imaging.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solution: a binocular three-dimensional imaging method based on novel speckle feature coding, comprising the following steps:
[0006] Step S1, generating a random new speckle feature coding map;
[0007] Step S2, obtaining a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the target to be measured, and using a binocular camera to capture an image of the surface of the target to be measured, to obtain a reference image and a target image respectively;
[0008] Step S3, calculating the similarity value of the pixel points of the reference image relative to the pixel points within the parallax search range of the target image, and obtaining the highest similarity value of the pixel points of the reference image;
[0009] Step S4, obtaining the points of the reference image whose pixel similarity value is highest and higher than a preset threshold as the corresponding points of the reference image pixel in the target image, and calculating the corresponding disparity value of the binocular camera;
[0010] Step S5, obtaining a preliminary disparity map according to the obtained disparity values of the corresponding points of the pixel points of the reference image in the target image within the disparity search range of the target image, checking the connectivity of the preliminary disparity map, eliminating the mismatched points and their corresponding disparity values, and obtaining a corrected disparity map;
[0011] Step S6, performing sub-pixel interpolation on the corrected disparity map to obtain a precision disparity map;
[0012] Step S7: Obtain a corresponding depth map and a 3D reconstructed point cloud map based on the obtained precision disparity map.
[0013] The further technical solution is: the step S1 specifically comprises the following steps:
[0014] Step S11, generating a random binary image;
[0015] Step S12, performing Fourier transform on the random binary image to obtain a corresponding spectrum image;
[0016] Step S13, performing spectrum trimming on the spectrum graph to obtain a corresponding specific spectrum graph;
[0017] Step S14, performing Fourier transform on the specific spectrum diagram to generate a specific spectrum speckle diagram;
[0018] Step S15, repeating steps S11-S14 to generate a plurality of specific spectrum speckle patterns;
[0019] Step S16: All the specific frequency spectrum speckle patterns are synthesized to generate a random new speckle feature coding map.
[0020] A further technical solution is as follows: the number of the specific spectrum speckle patterns in step S15 is nineteen.
[0021] A further technical solution is as follows: the step S2 specifically comprises: controlling the projector to perform defocus projection, so as to obtain a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the target to be measured, and using a binocular camera to capture an image of the surface of the target to be measured, so as to obtain a reference image and a target image respectively.
[0022] Its further technical solution is: the step S4 specifically includes:
[0023] Step S41, determining whether the highest similarity value between the pixel points of the reference image and the pixel points within the disparity search range of the target image is higher than a preset threshold;
[0024] Step S42: If yes, the pixel point with the highest similarity value higher than the preset threshold is used as the corresponding point of the pixel point of the reference image in the target image, and the corresponding disparity value of the binocular camera is calculated.
[0025] In order to solve the above technical problems, the present invention also discloses a binocular three-dimensional imaging system based on novel speckle feature coding, comprising a computer, a projector and a binocular camera, wherein the computer is connected to the projector and the binocular camera respectively, wherein the computer is used to generate a random novel speckle feature coding map; to control the projector to project a grayscale speckle feature coding map corresponding to the random novel speckle feature coding map onto a measured target; and to control the binocular camera to capture an image of the surface of the measured target to obtain a reference image and a target image respectively.
[0026] The beneficial technical effect of the present invention is that: the binocular three-dimensional imaging method based on the novel speckle feature coding of the present invention generates a random novel speckle feature coding map, and utilizes the randomness and low coupling characteristics of the random novel speckle feature coding map, so that the three-dimensional imaging system does not completely rely on the coding information of the structured light, and the texture information of the measured target itself is also used for three-dimensional imaging, so as to improve the accuracy of three-dimensional imaging, and the three-dimensional acquisition speed is improved by projecting the grayscale speckle feature coding map, and the disparity value is refined by sub-pixel interpolation to improve the imaging accuracy. The binocular three-dimensional imaging system based on the novel speckle feature coding of the present invention generates a random novel speckle feature coding map by a computer and controls the projector to project the grayscale speckle feature coding map corresponding to the random novel speckle feature coding map onto the measured target, and uses a binocular camera to collect the image of the surface of the measured target, and obtains the reference image and the target image respectively, so as to utilize the randomness and low coupling characteristics of the random novel speckle feature coding map, so that the three-dimensional imaging system does not completely rely on the coding information of the structured light, and the texture information of the measured target itself is also used for three-dimensional imaging, so as to improve the accuracy of three-dimensional imaging and improve the three-dimensional acquisition speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a structural block diagram of a binocular three-dimensional imaging system based on novel speckle feature coding of the present invention;
[0028] Figure 2 It is a flow chart of a binocular three-dimensional imaging method based on novel speckle feature coding of the present invention;
[0029] Figure 3 It is a sub-flow diagram of step S1 of the binocular three-dimensional imaging method based on novel speckle feature coding of the present invention;
[0030] Figure 4 It is a schematic diagram of a specific process of the binocular three-dimensional imaging method based on the novel speckle feature coding of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to more clearly understand the objectives, technical solutions and advantages of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0032] Reference Figure 1 The binocular three-dimensional imaging system 10 based on the novel speckle feature coding of the present invention comprises a computer 11, a projector 12 and a binocular camera 13, wherein the computer 11 is connected to the projector 12 and the binocular camera 13 respectively, wherein the computer 11 is used to generate a random novel speckle feature coding map; to control the projector 12 to project the grayscale speckle feature coding map corresponding to the random novel speckle feature coding map onto the measured target; and to control the binocular camera 13 to capture the image of the surface of the measured target, and obtain a reference image and a target image respectively. The binocular camera 13 comprises a left camera and a right camera. Preferably, the image captured by the left camera is used as the reference image, and the image captured by the right camera is used as the target image.
[0033] The binocular three-dimensional imaging system 10 based on the novel speckle feature coding of the present invention generates a random novel speckle feature coding map by a computer 11 and controls a projector 12 to project a grayscale speckle feature coding map corresponding to the random novel speckle feature coding map onto a measured target, and uses a left camera and a right camera of a binocular camera 13 to collect images of the surface of the measured target, and obtains a reference image and a target image respectively, so as to utilize the randomness and low coupling characteristics of the random novel speckle feature coding map, so that the three-dimensional imaging system does not completely rely on the coding information of the structured light, and the texture information of the measured target itself is also used for three-dimensional imaging, so as to improve the accuracy of three-dimensional imaging and increase the three-dimensional acquisition speed.
[0034] Reference Figure 2 The binocular three-dimensional imaging method based on novel speckle feature coding of the present invention comprises the following steps:
[0035] Step S1, generating a random new speckle feature coding map.
[0036] Step S2: acquiring a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the target to be measured, and using a binocular camera to capture an image of the surface of the target to be measured, to obtain a reference image and a target image, respectively.
[0037] Preferably, step S2 specifically comprises: controlling the projector to perform defocus projection, so as to obtain a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the measured target, and using a binocular camera to collect an image of the surface of the measured target, and obtaining a reference image and a target image respectively. By controlling the projector to perform defocus projection, a grayscale speckle feature coding map corresponding to the random new speckle feature coding map can be quickly obtained, thereby improving the projection and acquisition speeds, and thus improving the efficiency of three-dimensional imaging.
[0038] Step S3: Calculate the similarity values of the pixels of the reference image relative to the pixels within the disparity search range of the target image, and obtain the highest similarity value of the pixels of the reference image.
[0039] Step S4, obtaining points of the reference image whose pixel similarity value is highest and higher than a preset threshold as corresponding points of the reference image pixel in the target image, and calculating the corresponding disparity value of the binocular camera.
[0040] Step S5, obtaining a preliminary disparity map based on the disparity values of the corresponding points in the target image of all the pixels of the reference image within the disparity search range of the target image, checking the connectivity of the preliminary disparity map, eliminating the mismatched points and their corresponding disparity values, and obtaining a corrected disparity map. The preliminary disparity map refers to a relationship diagram between the spatial coordinates of the corresponding points and the disparity values, the connectivity refers to coherence, and the mismatched points refer to points with poor coherence in the preliminary disparity map.
[0041] Step S6: performing sub-pixel interpolation on the corrected disparity map to obtain a high-precision disparity map.
[0042] Step S7: Obtain a corresponding depth map and a 3D reconstructed point cloud map based on the obtained precision disparity map.
[0043] The binocular 3D imaging method based on novel speckle feature coding generates a random novel speckle feature coding map to utilize the randomness and low coupling characteristics of the random novel speckle feature coding map, so that the 3D imaging system does not completely rely on the coding information of structured light, and the texture information of the measured target itself is also used for 3D imaging to improve the accuracy of 3D imaging. The 3D acquisition speed is increased by projecting the grayscale speckle feature coding map, and the disparity value is refined by using sub-pixel interpolation to improve the imaging accuracy.
[0044] Reference Figure 3 Specifically, in this embodiment, step S1 specifically includes the following steps:
[0045] Step S11, generating a random binary image, wherein the random binary image can be randomly generated according to the image size and the number of pixels preset by the user.
[0046] Step S12: Perform Fourier transform on the random binary image to obtain a corresponding spectrum image.
[0047] Step S13, the spectrum graph is spectrally trimmed to obtain a corresponding specific spectrum graph. The range of the corresponding spectrum is determined by the user's design, so that speckle graphs with different speckle areas can be obtained according to different speckle speckles. The speckle area corresponding to the low-frequency speckle graph is larger, and the speckle area corresponding to the high-frequency speckle graph is smaller.
[0048] Step S14: Perform Fourier transform on the specific spectrum diagram to generate a specific spectrum speckle diagram.
[0049] Step S15, repeating steps S11-S14 to generate a plurality of specific frequency spectrum speckle patterns. Preferably, the number of the specific frequency spectrum speckle patterns is nineteen.
[0050] Step S16: All the specific frequency spectrum speckle patterns are synthesized to generate a random new speckle feature coding map.
[0051] Reference Figure 4 Specifically, in this embodiment, step S4 specifically includes:
[0052] Step S41, determining whether the highest similarity value between the pixel points of the reference image and the pixel points within the disparity search range of the target image is higher than a preset threshold;
[0053] Step S42: If yes, the pixel point with the highest similarity value higher than the preset threshold is used as the corresponding point of the pixel point of the reference image in the target image, and the corresponding disparity value of the binocular camera is calculated.
[0054] The step S41 further includes: if not, re-execute step S3.
[0055] In summary, the binocular three-dimensional imaging method based on the novel speckle feature coding of the present invention generates a random new speckle feature coding map to utilize the randomness and low coupling characteristics of the random new speckle feature coding map, so that the three-dimensional imaging system does not completely rely on the coding information of the structured light, and the texture information of the measured target itself is also used for three-dimensional imaging to improve the accuracy of three-dimensional imaging, and the three-dimensional acquisition speed is improved by projecting the grayscale speckle feature coding map, and the disparity value is refined by sub-pixel interpolation to improve the imaging accuracy. The binocular three-dimensional imaging system based on the novel speckle feature coding of the present invention generates a random new speckle feature coding map by a computer and controls the projector to project the grayscale speckle feature coding map corresponding to the random new speckle feature coding map onto the measured target, so as to utilize the randomness and low coupling characteristics of the random new speckle feature coding map, so that the three-dimensional imaging system does not completely rely on the coding information of the structured light, and the texture information of the measured target itself is also used for three-dimensional imaging to improve the accuracy of three-dimensional imaging and improve the three-dimensional acquisition speed.
[0056] The above description is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Those skilled in the art can make various equivalent changes and improvements based on the above embodiments, and all equivalent changes or modifications made within the scope of the claims should fall within the protection scope of the present invention.
Claims
1. A binocular three-dimensional imaging method based on a novel speckle feature coding, characterized in that: The following steps are involved: Step S1, generating a random new speckle feature coding map; Step S2, obtaining a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the target to be measured, and using a binocular camera to capture an image of the surface of the target to be measured, to obtain a reference image and a target image respectively; Step S3, calculating the similarity value of the pixel points of the reference image relative to the pixel points within the parallax search range of the target image, and obtaining the highest similarity value of the pixel points of the reference image; Step S4, obtaining the points of the reference image whose pixel similarity value is highest and higher than a preset threshold as the corresponding points of the reference image pixel in the target image, and calculating the corresponding disparity value of the binocular camera; Step S5, obtaining a preliminary disparity map according to the obtained disparity values of the corresponding points of the pixel points of the reference image in the target image within the disparity search range of the target image, checking the connectivity of the preliminary disparity map, eliminating the mismatched points and their corresponding disparity values, and obtaining a corrected disparity map; Step S6, performing sub-pixel interpolation on the corrected disparity map to obtain a precision disparity map; Step S7, obtaining a corresponding depth map and a 3D reconstructed point cloud map according to the obtained precision disparity map; The step S1 specifically includes the following steps: Step S11, generating a random binary image; Step S12, performing Fourier transform on the random binary image to obtain a corresponding spectrum image; Step S13, performing spectrum trimming on the spectrum graph to obtain a corresponding specific spectrum graph; Step S14, performing Fourier transform on the specific spectrum diagram to generate a specific spectrum speckle diagram; Step S15, repeating steps S11-S14 to generate a plurality of specific spectrum speckle patterns; Step S16: All the specific frequency spectrum speckle patterns are synthesized to generate a random new speckle feature coding map.
2. The binocular three-dimensional imaging method based on novel speckle feature coding according to claim 1, characterized in that: The number of the specific spectrum speckle patterns in step S15 is nineteen.
3. The binocular three-dimensional imaging method based on novel speckle feature coding according to claim 1, characterized in that: The step S2 specifically includes: controlling the projector to perform defocus projection, so as to obtain a corresponding grayscale speckle feature coding map according to the random new speckle feature coding map, and projecting it onto the target to be measured, and using a binocular camera to collect an image of the surface of the target to be measured, so as to obtain a reference image and a target image respectively.
4. The binocular three-dimensional imaging method based on novel speckle feature coding according to claim 1, characterized in that: The step S4 specifically includes: Step S41, determining whether the highest similarity value between the pixel points of the reference image and the pixel points within the disparity search range of the target image is higher than a preset threshold; Step S42: If yes, the pixel point with the highest similarity value higher than the preset threshold is used as the corresponding point of the pixel point of the reference image in the target image, and the corresponding disparity value of the binocular camera is calculated.
5. A binocular three-dimensional imaging system based on a novel speckle feature coding, characterized in that: The invention comprises a computer, a projector and a binocular camera, wherein the computer is connected to the projector and the binocular camera respectively, wherein the computer is used to generate a random new speckle feature coding map; to control the projector to project a grayscale speckle feature coding map corresponding to the random new speckle feature coding map onto a measured target; to control the binocular camera to collect an image of the surface of the measured target to obtain a reference image and a target image respectively; to calculate a similarity value of a pixel point of the reference image relative to a pixel point within a parallax search range of the target image, and obtain the highest similarity value of the pixel points of the reference image; and to obtain a pixel point of the reference image. The points with the highest similarity value higher than a preset threshold are used as corresponding points of the pixel points of the reference image in the target image, and the disparity value of the corresponding binocular camera is calculated; a preliminary disparity map is prepared according to the obtained disparity values of the corresponding points of the pixel points of the reference image in the target image within the disparity search range of the target image, the connectivity of the preliminary disparity map is checked, the mismatched points and their corresponding disparity values are eliminated, and a corrected disparity map is obtained; sub-pixel interpolation is performed on the corrected disparity map to obtain a precision disparity map; and a corresponding depth map and a point cloud map for three-dimensional reconstruction are obtained by solving the obtained precision disparity map; The step of generating a random novel speckle feature coding map specifically comprises the following steps: Step S11, generating a random binary image; Step S12, performing Fourier transform on the random binary image to obtain a corresponding spectrum image; Step S13, performing spectrum trimming on the spectrum graph to obtain a corresponding specific spectrum graph; Step S14, performing Fourier transform on the specific spectrum diagram to generate a specific spectrum speckle diagram; Step S15, repeating steps S11-S14 to generate a plurality of specific spectrum speckle patterns; Step S16: All the specific frequency spectrum speckle patterns are synthesized to generate a random new speckle feature coding map.
