A 3D Reconstruction Method and System Based on Line-Shift Coding Patterns

By combining a line shift coding pattern-based method with Gray code patterns for 3D reconstruction, the problems of efficiency and accuracy in 3D reconstruction of highly reflective or high dynamic range objects are solved, achieving efficient and accurate 3D reconstruction results.

CN119437086BActive Publication Date: 2026-03-13SHENZHEN UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency and low accuracy when dealing with 3D reconstruction of highly reflective or high dynamic range objects. In particular, multi-exposure technology and line laser scanning technology are difficult to balance efficiency and accuracy.

Method used

A method based on line shift coding patterns is adopted. By designing multiple coding patterns and combining them with Gray code patterns, the object is projected and acquired, a phase shift fringe pattern is synthesized, phase calculation and unfolding are performed, and the three-dimensional shape of the object is reconstructed using the principle of three-dimensional reconstruction.

Benefits of technology

It achieves high reconstruction accuracy and robustness in high dynamic range scenes, improves the efficiency and accuracy of 3D reconstruction, and increases the frame rate by nearly 10 times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437086B_ABST
    Figure CN119437086B_ABST
Patent Text Reader

Abstract

This invention discloses a 3D reconstruction method and system based on line-shift coded patterns. The method includes: designing multiple coded patterns from an original fringe pattern using a line-shift method; projecting and acquiring multiple coded patterns and a preset Gray code pattern onto the object under test to obtain multiple fringe projection images and multiple Gray code projection images; synthesizing M phase-shifted fringe patterns from the acquired multiple fringe projection images; performing phase calculation on the M phase-shifted fringe images to obtain a folded phase image; combining the folded phase image with the multiple Gray code projection images to perform phase unfolding to obtain an unfolded phase image; and reconstructing the object under test using 3D reconstruction principles. This invention achieves high reconstruction accuracy and robustness by first synthesizing multiple coded patterns and then performing phase calculation on the M phase-shifted fringe images, thereby utilizing phase to perform 3D reconstruction of the object under test. It also demonstrates good application performance in high dynamic range scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine vision, image processing, and 3D reconstruction technology, and in particular to a 3D reconstruction method and system based on line shift coding patterns. Background Technology

[0002] Fringe projection technology has been widely used in various fields such as industrial component inspection, reverse engineering, quality control, and cultural relic digitization due to its advantages of non-contact detection, fast response, high precision, and the ability to achieve full-field measurement. However, this technology is mainly suitable for 3D reconstruction of diffuse reflective object surfaces. When dealing with highly reflective objects or objects with high dynamic range (which easily lead to overexposure of camera data), its reconstruction effect is significantly affected, thus limiting the further development of this technology.

[0003] Machine vision technology is also widely used in the industrial field, playing a crucial role in workpiece gripping, sorting, palletizing, quality inspection, assembly, and workpiece tracking. In the field of automated optical inspection (AOI), the application of 3D inspection is gradually expanding. However, it is worth noting that the high dynamic range and high reflectivity of PCB circuits and metal workpieces significantly affect the 3D reconstruction quality of fringe projection technology.

[0004] To address this challenge, multi-exposure techniques or line laser scanning techniques are commonly used. Multi-exposure techniques, which project multiple sets of fringe patterns for high dynamic range synthesis, can improve reconstruction results but significantly reduce time efficiency. This is because the N-step phase-shifting image projected by conventional fringe projection profilometry is typically an 8-bit grayscale image, and the projection speed can generally only reach a maximum of 360 frames per second, thus affecting overall efficiency.

[0005] On the other hand, line laser scanning technology utilizes spatial information by directly extracting the center of lines. While it can achieve 3D reconstruction to some extent, its accuracy is relatively low. Furthermore, this technology reconstructs one or more lines, requiring the assistance of motion mechanisms to obtain complete point cloud data. Therefore, line laser scanning technology also struggles to achieve a balance between efficiency and accuracy. Summary of the Invention

[0006] This invention provides a three-dimensional reconstruction method and system based on line shift coding patterns, aiming to solve the problems of low efficiency and low accuracy caused by existing multi-exposure technology or line laser scanning technology.

[0007] In a first aspect, embodiments of the present invention provide a three-dimensional reconstruction method based on a line-shift coding pattern, comprising:

[0008] Multiple coded patterns are designed from the original stripe pattern by line shifting. The multiple coded patterns and the preset Gray code pattern are then used to project and collect data onto the object under test, resulting in multiple stripe projection images and multiple Gray code projection images.

[0009] M phase-shifted fringe patterns are synthesized from the collected multiple fringe projection patterns, where M is an integer greater than or equal to 3;

[0010] Phase calculation is performed on the M phase-shifted fringe patterns to obtain a folded phase pattern;

[0011] The folded phase map is combined with the multiple Gray code projection maps to perform phase unfolding, resulting in an unfolded phase map. The object under test is then reconstructed using the principle of three-dimensional reconstruction.

[0012] Optionally, the step of designing multiple coded patterns from the original stripe pattern by line shifting includes:

[0013] The original stripe pattern is moved sequentially in the same direction at 1-pixel intervals to generate N coded patterns. In the original stripe pattern, the interval between two adjacent bright lines is N-1 pixels, and a bright line occupies 1 pixel in the column direction. N is greater than 1.

[0014] Optionally, for the multiple coded patterns, the j-th coded pattern is represented by the following formula:

[0015]

[0016] Where j = 1, 2, ..., N, u and v are the x and y coordinates of the pixel, respectively, N is the number of steps of line movement, and % represents the modulo operation.

[0017] Optionally, the step of synthesizing M phase-shifted fringe patterns based on the generated multiple fringe projection patterns includes:

[0018] M-amplitude phase-shifted fringe patterns are synthesized using the following formula:

[0019]

[0020] Where N is the number of fringe projection patterns, I j Represents the j-th fringe projection pattern, j = 1, 2, ..., N; I ci Let be the i-th phase-shifted fringe pattern synthesized, i = 1, 2, ..., M.

[0021] Optionally, phase calculation is performed on the M phase-shifted fringe patterns to obtain a folded phase pattern, including:

[0022] Phase calculation is performed using the M-step phase shift calculation formula to obtain a folded phase diagram. The M-step phase shift calculation formula is as follows:

[0023] in, Indicates the folded phase, δ i This indicates the phase shift corresponding to each phase shift fringe pattern.

[0024] Optionally, the step of combining the folded phase map with the multiple Gray code projection maps to perform phase unrolling to obtain the unrolled phase map includes:

[0025] The Gray code projection image is binarized, and the Gray code of each pixel is read.

[0026] Convert the Gray code to a decimal value and determine the order of each pixel.

[0027] By combining the folded phase diagram and the level after Gray code decoding, a phase unfolding operation is performed to obtain the unfolded phase diagram.

[0028] Optionally, binarizing the Gray code pattern includes:

[0029] The completely black pattern and the completely white pattern are respectively projected onto the object under test as a completely black projection image and a completely white projection image;

[0030] Based on the acquired full-black projection image and full-white projection image, the threshold I for each pixel is calculated according to the following formula. threshold :

[0031]

[0032] Among them, I w I represents the grayscale value corresponding to a completely black projection image. b This represents the grayscale value corresponding to a completely white projection image;

[0033] The grayscale value of each pixel is compared with the threshold, and pixels with a value greater than the threshold are set to 1, while pixels with a value less than the threshold are set to 0.

[0034] Optionally, the reconstruction using the principle of three-dimensional reconstruction includes:

[0035] Three-dimensional reconstruction is performed using phase depth mapping to reconstruct the three-dimensional shape of the object under test.

[0036] Optionally, the step of using phase depth mapping to perform 3D reconstruction to reconstruct the 3D shape of the object includes:

[0037] Perform 3D reconstruction using the following formula:

[0038]

[0039] Where h is the height of pixel (x, y), and C1 and C2 are the equation coefficients of pixel (x, y) obtained beforehand through calibration. It is the difference between the unfolded phase of the pixel (x, y) and the unfolded phase of the reference plane.

[0040] Secondly, embodiments of the present invention provide a three-dimensional reconstruction system based on line-shift coding patterns, comprising:

[0041] A coding pattern generation unit is used to design multiple coding patterns from the original stripe pattern by line shifting, and to project and collect the multiple coding patterns and a preset Gray code pattern onto the object to be tested to obtain multiple stripe projection images and multiple Gray code projection images respectively.

[0042] A phase-shift fringe pattern generation unit is used to synthesize M phase-shift fringe patterns based on the acquired multiple fringe projection patterns, where M is an integer greater than or equal to 3;

[0043] A folded phase map generation unit is used to perform phase calculation on the M-amplitude phase shift fringe pattern to obtain a folded phase map.

[0044] The three-dimensional reconstruction unit is used to combine the folded phase map with the multiple Gray code projection maps to perform phase unfolding, obtain the unfolded phase map, and reconstruct the object under test using the three-dimensional reconstruction principle.

[0045] This invention discloses a 3D reconstruction method and system based on line-shift coded patterns. The method includes: designing multiple coded patterns from an original fringe pattern using a line-shift method; projecting and acquiring multiple coded patterns and a preset Gray code pattern onto a test object to obtain multiple fringe projection images and multiple Gray code projection images; synthesizing M phase-shifted fringe patterns from the generated multiple fringe projection images; performing phase calculation on the M phase-shifted fringe images to obtain a folded phase image; combining the folded phase image with the multiple Gray code projection images to perform phase unfolding to obtain an unfolded phase image; and reconstructing the test object using 3D reconstruction principles. This invention achieves high reconstruction accuracy and robustness by first synthesizing multiple coded patterns and then performing phase calculation on the M phase-shifted fringe images, thereby utilizing phase to perform 3D reconstruction of the test object. It also demonstrates good application performance in high dynamic range scenarios. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 A flowchart illustrating a three-dimensional reconstruction method based on line shift coding patterns provided in an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the first pre-designed coded pattern provided in an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of a synthesized phase-shifted fringe pattern provided in an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of a folded phase map calculated according to an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of seven Gray code images provided in an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of a sub-process of a three-dimensional reconstruction method based on line shift coding pattern provided in an embodiment of the present invention;

[0053] Figure 7 A schematic diagram of the unfolded phase diagram provided in an embodiment of the present invention;

[0054] Figure 8 This is a schematic diagram of another sub-process of a three-dimensional reconstruction method based on line shift coding patterns provided in an embodiment of the present invention;

[0055] Figure 9 A schematic block diagram of a three-dimensional reconstruction system based on line shift coding pattern provided in an embodiment of the present invention;

[0056] Figure 10 This is a schematic block diagram of a subunit of a three-dimensional reconstruction system based on line shift coding patterns, provided as an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0059] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0060] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0061] Please see Figure 1 , Figure 1 This invention provides a flowchart illustrating a three-dimensional reconstruction method based on line-shift coding patterns, comprising steps S101 to S104:

[0062] S101. Multiple coded patterns are designed from the original stripe pattern by line shifting, and the multiple coded patterns and the preset Gray code pattern are projected onto the object to be tested and collected to obtain multiple stripe projection patterns and multiple Gray code projection patterns respectively.

[0063] In this embodiment, the line shifting method is a method for generating different coded patterns by changing the position, direction, or phase of the stripes. The stripes can move along a certain direction (such as horizontal or vertical) or change their phase (i.e., the starting position of the stripes).

[0064] By using a line-shifting method, multiple patterns with different encoded information can be designed. When these patterns are projected onto the object under test, they will produce different deformations due to the differences in the shape of the object's surface. In other words, by projecting multiple designed encoded patterns onto the object under test in sequence, each pattern will produce a specific deformation due to the shape of the object's surface.

[0065] Gray code is a coding method used to determine the location of pixels, helping to distinguish different regions or pixels. Multiple stripe projections are captured using a camera or other imaging device and projected onto an object. These images contain shape information about the object's surface. Similarly, multiple Gray code projections are captured and used to determine the absolute position of each pixel.

[0066] In one embodiment, step S101, which involves designing multiple coded patterns from the original stripe pattern using a line shifting method, includes step S201:

[0067] S201. Move the original stripe pattern sequentially in the same direction at 1-pixel intervals to generate N coded patterns. In the original stripe pattern, the interval between two adjacent bright lines is N-1 pixels, and a bright line occupies 1 pixel in the column direction. N is greater than 1.

[0068] In a specific embodiment, taking a 20-step line shift as an example, the line spacing of each encoded pattern is 19 pixels (the period is 20 pixels). The first encoded pattern (i.e., the original stripe pattern) is as follows: Figure 2 As shown, the first column of pixels in the image is set to 1, and each bright line occupies 1 pixel in the column direction, up to 20 coded patterns. Subsequent coded patterns are created by shifting each bright line one pixel to the right. It should be noted that the number of pixels occupied by the bright line and the number of pixels shifted to the right can be adjusted according to the actual situation.

[0069] Furthermore, in one embodiment, for the plurality of coded patterns, the j-th coded pattern is represented by the following formula:

[0070]

[0071] Where j = 1, 2, ..., N, u and v are the x and y coordinates of the pixel, respectively, N is the number of steps of line movement, and % represents the modulo operation.

[0072] S102. Based on the collected multiple fringe projection images, synthesize M phase-shifted fringe images, where M is an integer greater than or equal to 3;

[0073] In this embodiment, the synthesis of phase-shifted fringe patterns is performed. Based on the multiple fringe projection images obtained in step S101 above, these fringe projection images are usually sine or cosine waves, and the phase difference between each pattern is known. By projecting them onto the surface of the object to be measured through a projector, a series of images containing the height information of the surface of the object to be measured can be obtained. These images (i.e., multiple fringe projection images) are then synthesized into M phase-shifted fringes, and each phase-shifted fringe pattern represents the fringes on the surface of the object at different phases.

[0074] It should be explained that the phase-shifting method requires at least three steps to perform phase calculation because there are three unknowns in the phase calculation equations, thus requiring three equations. Therefore, at least three phase-shifted fringe patterns are needed for phase calculation, hence M is an integer greater than or equal to 3. The specific phase calculation process is described in the following embodiments and will not be detailed here.

[0075] In one embodiment, step S102 includes step S301:

[0076] S301. Use the following formula to synthesize an M-amplitude phase-shifted fringe pattern:

[0077]

[0078] Where N is the number of fringe projection patterns, I j Represents the j-th fringe projection pattern, j = 1, 2, ..., N; I ci The i-th phase-shifted fringe pattern is synthesized, where i = 1, 2, ..., M;

[0079] In this embodiment, taking the synthesis of M=20-step phase-shift fringe patterns as an example, the above formula is used for synthesis, resulting in a total of M phase-shift fringe patterns, as shown below. Figure 3 The image shown is a composite phase-shifted fringe pattern.

[0080] S103. Perform phase calculation on the M-amplitude phase-shifted fringe pattern to obtain a folded phase pattern;

[0081] In this embodiment, the goal of phase resolution is to extract the phase information of the surface of the object under test from the acquired M phase-shifted fringe patterns. This phase information reflects the phase change caused by the reflection of light on the object's surface and is directly related to the shape of the object's surface. Phase resolution mainly uses multiple fringe patterns with different phase shifts to calculate the phase value of each pixel. These phase values ​​form a phase map, where the phase value of each pixel represents the height or shape change of that point relative to a reference plane.

[0082] In one embodiment, step S103 includes step S401:

[0083] S401. Phase calculation is performed using the M-step phase shift calculation formula to obtain a folded phase diagram, wherein the M-step phase shift calculation formula is as follows:

[0084] in, Indicates the folded phase value, δ i This indicates the phase shift corresponding to each phase shift fringe pattern.

[0085] In this embodiment, as Figure 4 The image shows a folded phase diagram obtained from the solution. It should be noted that, since the above equation is an arctangent operation, the calculated phase is truncated between [-π, π]. Therefore, the phase obtained from the above equation is called the folded phase.

[0086] S104. The folded phase map is combined with the multiple Gray code projection maps to perform phase unfolding, resulting in an unfolded phase map. The object to be tested is then reconstructed using the principle of three-dimensional reconstruction.

[0087] In this embodiment, the purpose of phase unwrapping (or phase de-wrapping) is to eliminate the folding phenomenon of phase values ​​in the folded phase diagram and obtain a continuous phase diagram. This is because during phase measurement, due to the periodicity of phase values ​​(usually integer multiples of 2π), the phase values ​​in the folded phase diagram may suddenly jump in certain regions.

[0088] In structured light 3D vision, Gray code, due to the fact that adjacent code values ​​differ by only one bit, resulting in at most one bit error, possesses advantages such as strong anti-interference capability, simple encoding, and large range. It is often used as an auxiliary encoding method for phase unrolling. Simply put, Gray code coarsely divides the entire horizontal pixel range into multiple sub-regions (regions representing levels), and then uses phase-shifting techniques to further subdivide these sub-regions into individual pixel units. Phase unrolling is performed by combining the folded phase map with the corresponding Gray code projection map (multiple Gray code projection maps). The Gray code projection map provides additional spatial information, helping to determine the correct order of phase values ​​during continuous changes. By comparing the folded phase map and the Gray code projection map, jump points in phase values ​​can be identified, and phase values ​​can be corrected accordingly, thus obtaining a continuous phase map.

[0089] In a specific embodiment, taking seven Gray code projection images as an example, the second to seventh Gray code images can divide the horizontal pixels into 64 pixel intervals (n is the number of Gray code bits, i.e., the number of intervals). The first Gray code image is added mainly to prevent boundary-level errors, also known as complementary Gray code. Figure 5 Each pixel in the image is encoded using Gray code, and each image represents a specific bit of the Gray code. Figure 5 Images 2-7 in the image set yield a set of encoded values. Taking a pixel as an example, black represents 0 and white represents 1. If the encoding of this pixel is 000001, it means that the pixel's color in the first 5 images is black, representing 0, and in the 6th image it is white, representing 1. Then, the encoding 000001 is converted to the decimal value 1, which means that the order of this pixel is 1. To prevent errors in order expansion from the boundary between π and -π, the first Gray code image is added, and the second to 7 Gray code images are recalculated to obtain another set of encoded values. By combining the two, the final expanded order of this pixel is obtained as k. Then, the expanded phase of this pixel is: Where k is the order, This is the folded phase value obtained in the previous text.

[0090] In one embodiment, such as Figure 6 As shown, in step S104, the step of combining the folded phase map with the multiple Gray code projection maps to perform phase unwrapping to obtain the unwrapped phase map includes steps S501 to S503:

[0091] S501. Perform a binarization operation on the Gray code projection image and read the Gray code encoding of each pixel.

[0092] S502. Convert the Gray code to a decimal value and calculate the order of each pixel.

[0093] S503. Combining the folded phase diagram and the level after Gray code decoding, perform a phase unfolding operation to obtain the unfolded phase diagram.

[0094] In this embodiment, to obtain a better 3D reconstruction result, the Gray code projection image acquired by the camera can be accurately binarized, that is, the grayscale image can be converted into a binary image, so that the Gray code code of each pixel can be read and the camera image can be correctly decoded. After completing the binarization operation of the Gray code projection image, the Gray code code is converted into a decimal value, and the final order of each pixel is calculated using complementary Gray code. Adding the value of the folded phase completes the phase unrolling operation. In summary, the phase shift method described above calculates the principal value of the phase, and the Gray code decoded value (Gray code value converted to decimal value) serves as the order of the phase unrolling. Figure 7 The image shown is an unfolded phase diagram obtained by combining the above folded phase diagram with multiple Gray code projection diagrams.

[0095] In one embodiment, such as Figure 8 As shown, step S501 includes steps S601 to S603:

[0096] S601. Collect the all-black pattern and the all-white pattern and project them onto the object under test as an all-black projection image and an all-white projection image, respectively.

[0097] S602. Based on the acquired full-black projection image and full-white projection image, calculate the threshold I for each pixel using the following formula. threshold :

[0098]

[0099] Among them, I w I represents the grayscale value corresponding to a completely black projection image. b This represents the grayscale value corresponding to a completely white projection image;

[0100] S603. Compare the grayscale value of each pixel with the threshold, and set pixels with values ​​greater than the threshold to 1 and pixels with values ​​less than the threshold to 0.

[0101] There are many common binarization operations. In this embodiment, two additional images (a completely black image and a completely white image) are projected, and then the threshold for each pixel is calculated by acquiring the pattern images under these two projections. The formula in step S602 determines the threshold by calculating the average grayscale value of the corresponding pixels in the completely black and completely white projection images. For each pixel in the image, its grayscale value is compared with the calculated threshold. If the grayscale value of the pixel is greater than the threshold, it is set to 1 (usually representing a foreground or target object); if it is less than the threshold, it is set to 0 (usually representing a background or non-target object).

[0102] It should be noted that the result of this process is a binary image containing only two pixel values ​​(0 and 1) to represent the features or shape of the surface of the object being measured.

[0103] In one embodiment, step S104, which involves reconstructing using the principle of three-dimensional reconstruction, includes step S701:

[0104] S701. Using phase depth mapping, perform three-dimensional reconstruction to reconstruct the three-dimensional shape of the object under test.

[0105] In this embodiment, after obtaining the unfolded phase information according to the method in step S103 above, reconstruction can be performed using the principle of three-dimensional reconstruction. Specifically, three-dimensional reconstruction can be performed using phase-depth mapping.

[0106] Furthermore, in one embodiment, step S701 includes step S801:

[0107] S801. Perform 3D reconstruction according to the following formula:

[0108]

[0109] Where h is the height of pixel (x, y), and C1 and C2 are the equation coefficients of pixel (x, y) obtained beforehand through calibration. It is the difference between the unfolded phase of the pixel (x, y) and the unfolded phase of the reference plane.

[0110] In this embodiment, the height information of the object under test can be obtained by first calculating the equation coefficients using the calibrated pixels and then calculating the phase difference. Finally, the three-dimensional shape of the object under test can be reconstructed. In the above formula, calibrating and calculating the equation coefficients is equivalent to establishing the phase-depth mapping relationship. Subsequently, only the phase information needs to be obtained, and then combined with the phase-depth mapping relationship, the three-dimensional shape of the object can be quickly reconstructed.

[0111] In a specific embodiment, the calibration method is as follows: A plane is selected as a reference plane, and the unfolded phase of the reference plane is calculated by projecting fringes. Then, a calibration plane is placed 5mm in front of the reference plane (this distance is variable and set according to specific circumstances). Fringes are then projected again to calculate the unfolded phase under this condition. The calibration plane is then moved forward another 5mm, and this process is repeated multiple times (if moved 10 times, it is finally placed 50mm in front of the reference plane). The difference between the unfolded phase and the reference plane is calculated for each instance. In other words, ten sets of h and... Substituting the data into the formula of step S801, the simultaneous equations can be solved to obtain C1 and C2, thus establishing the phase-depth mapping relationship. To reconstruct the object under test, simply place the object on the reference plane, calculate its unfolded phase, then calculate the difference between the unfolded phase of the object and the reference plane, and finally, combine the previously calculated phase-depth mapping relationship to obtain the height information of the object, ultimately reconstructing its three-dimensional shape.

[0112] In one embodiment, the resolution of the projection onto the object under test is 1280x720 pixels, and the projection speed can reach more than 4000 frames per second, which increases the frame rate of 3D scanning by nearly 10 times and significantly improves time efficiency.

[0113] like Figure 9 As shown, this embodiment of the invention also provides a three-dimensional reconstruction system 900 based on line shift coding patterns, including a coding pattern generation unit 901, a phase shift fringe pattern generation unit 902, a folded phase pattern generation unit 903, and a three-dimensional reconstruction unit 904.

[0114] The encoding pattern generation unit 901 is used to design multiple encoding patterns from the original stripe pattern by line shifting, and to project and collect the multiple encoding patterns and the preset Gray code pattern onto the object to be tested to obtain multiple stripe projection images and multiple Gray code projection images respectively.

[0115] The phase-shift fringe pattern generation unit 902 is used to synthesize M phase-shift fringe patterns based on the acquired multiple fringe projection patterns, where M is an integer greater than or equal to 3;

[0116] A folded phase map generation unit 903 is used to perform phase calculation on the M-amplitude phase shift fringe pattern to obtain a folded phase map.

[0117] The three-dimensional reconstruction unit 904 is used to combine the folded phase map with the multiple Gray code projection maps to perform phase unfolding, obtain the unfolded phase map, and reconstruct the object under test using the three-dimensional reconstruction principle.

[0118] In one embodiment, such as Figure 10 As shown, the three-dimensional reconstruction unit 904 includes:

[0119] Binarization operation unit 1001 is used to perform binarization operation on the Gray code projection map and read the Gray code encoding of each pixel.

[0120] The conversion unit 1002 is used to convert the Gray code into a decimal value and calculate the order of each pixel.

[0121] The phase expansion unit 1003 is used to combine the folded phase diagram and the level after Gray code decoding to perform a phase expansion operation to obtain an expanded phase diagram.

[0122] The three-dimensional reconstruction system based on line shift coded patterns provided in this invention first synthesizes multiple coded patterns into stripes, and then performs phase calculation on M phase shift fringe patterns, thereby using phase to perform three-dimensional reconstruction of the object under test, achieving high reconstruction accuracy, high robustness, and good application effect in high dynamic range scenarios.

[0123] In the several embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0125] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0126] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A three-dimensional reconstruction method based on line-shift coding patterns, characterized in that, include: Multiple coded patterns are designed from the original stripe pattern by line shifting. The multiple coded patterns and the preset Gray code pattern are then used to project and collect data onto the object under test, resulting in multiple stripe projection images and multiple Gray code projection images. M phase-shifted fringe patterns are synthesized from the collected multiple fringe projection patterns, where M is an integer greater than or equal to 3; Phase calculation is performed on the M phase-shifted fringe patterns to obtain a folded phase pattern; The folded phase map is combined with the multiple Gray code projection maps to perform phase unfolding, resulting in an unfolded phase map. The object under test is then reconstructed using the principle of three-dimensional reconstruction. The method of designing multiple coded patterns from the original stripe pattern by line shifting includes: shifting the original stripe pattern sequentially in the same direction at 1-pixel intervals to generate N coded patterns, wherein the interval between two adjacent bright lines in the original stripe pattern is N-1 pixels, a bright line occupies 1 pixel in the column direction, and N is greater than 1. The step of combining the folded phase map with the multiple Gray code projection maps to perform phase unrolling to obtain an unrolled phase map includes: performing a binarization operation on the Gray code projection map and reading the Gray code encoding of each pixel; converting the Gray code encoding into a decimal value and calculating the order of each pixel; and performing a phase unrolling operation by combining the folded phase map and the decoded Gray code order to obtain an unrolled phase map. For the multiple coded patterns, the j-th coded pattern is represented by the following formula: Where j = 1, 2, ..., N, u and v are the x and y coordinates of the pixel, respectively, N is the number of steps the line moves, and % represents the modulo operation; The step of synthesizing M phase-shifted fringe patterns based on the generated multiple fringe projection patterns includes: synthesizing M phase-shifted fringe patterns using the following formula: Where N is the number of fringe projection patterns, I j Represents the j-th fringe projection pattern, j = 1, 2, ..., N; I ci The i-th phase-shifted fringe pattern is synthesized, where i = 1, 2, ..., M; The step of performing phase calculation on the M-amplitude phase-shifted fringe pattern to obtain a folded phase pattern includes: performing phase calculation using an M-step phase-shift calculation formula to obtain a folded phase pattern, wherein the M-step phase-shift calculation formula is as follows: in, Indicates the folded phase, δ i This indicates the phase shift corresponding to each phase shift fringe pattern.

2. The three-dimensional reconstruction method based on line-shift coding patterns according to claim 1, characterized in that, The binarization of the Gray code pattern includes: The completely black pattern and the completely white pattern are respectively projected onto the object under test as a completely black projection image and a completely white projection image; Based on the acquired full-black projection image and full-white projection image, the threshold I for each pixel is calculated according to the following formula. threshold : Among them, I w I represents the grayscale value corresponding to a completely black projection image. b This represents the grayscale value corresponding to a completely white projection image; The grayscale value of each pixel is compared with the threshold, and pixels with a value greater than the threshold are set to 1, while pixels with a value less than the threshold are set to 0.

3. The three-dimensional reconstruction method based on line-shift coding patterns according to claim 1, characterized in that, The reconstruction using the principle of three-dimensional reconstruction includes: Three-dimensional reconstruction is performed using phase depth mapping to reconstruct the three-dimensional shape of the object under test.

4. The three-dimensional reconstruction method based on line-shift coding patterns according to claim 3, characterized in that, The method of using phase depth mapping for 3D reconstruction to reconstruct the 3D shape of an object includes: Perform 3D reconstruction using the following formula: Where h is the height of pixel (x, y), and C1 and C2 are the equation coefficients of pixel (x, y) obtained beforehand through calibration. It is the difference between the unfolded phase of the pixel (x, y) and the unfolded phase of the reference plane.

5. A three-dimensional reconstruction system based on line-shift coding patterns, characterized in that, include: A coding pattern generation unit is used to design multiple coding patterns from the original fringe pattern using a line shifting method. These multiple coding patterns, along with a preset Gray code pattern, are then used to project and acquire images of the object under test, resulting in multiple fringe projection images and multiple Gray code projection images. The j-th coding pattern is represented by the following formula: Where j = 1, 2, ..., N, u and v are the x and y coordinates of the pixel, respectively, N is the number of steps the line moves, and % represents the modulo operation; A phase-shift fringe pattern generation unit is used to synthesize M phase-shift fringe patterns based on the acquired multiple fringe projection patterns, where M is an integer greater than or equal to 3; the synthesis of M phase-shift fringe patterns based on the generated multiple fringe projection patterns includes: synthesizing M phase-shift fringe patterns using the following formula: Where N is the number of fringe projection patterns, I j Represents the j-th fringe projection pattern, j = 1, 2, ..., N; I ci The i-th phase-shifted fringe pattern is synthesized, where i = 1, 2, ..., M; A folded phase map generation unit is used to perform phase calculation on the M-amplitude phase-shifted fringe pattern to obtain a folded phase map. The step of performing phase calculation on the M-amplitude phase-shifted fringe pattern to obtain the folded phase map includes: performing phase calculation using an M-step phase shift calculation formula to obtain the folded phase map, wherein the M-step phase shift calculation formula is as follows: in, Indicates the folded phase, δ i This indicates the phase shift corresponding to each phase shift fringe pattern. The three-dimensional reconstruction unit is used to combine the folded phase map with the multiple Gray code projection maps to perform phase unfolding, obtain the unfolded phase map, and reconstruct the object under test using the three-dimensional reconstruction principle; The generating coded pattern unit is specifically used to move the original stripe pattern sequentially in the same direction at an interval of 1 pixel to generate N coded patterns. In the original stripe pattern, the interval between two adjacent bright lines is N-1 pixels, and a bright line occupies 1 pixel in the column direction. N is greater than 1. The three-dimensional reconstruction unit is specifically used to perform a binarization operation on the Gray code projection map, read the Gray code encoding of each pixel, convert the Gray code encoding into a decimal value, calculate the order of each pixel, and perform a phase unfolding operation by combining the folded phase map and the order after Gray code decoding to obtain the unfolded phase map.

Citation Information

Patent Citations

  • Structured light 3-dimensional measurement device and measurement method thereof

    CN103033147A

  • Planarity measuring method and device

    CN108253909A

  • Rapid three-dimensional measurement method based on sine fringe and multi-gray-level fringe projection

    CN113155056A

  • Phase shift three-dimensional measurement method based on gray scale multiplexing Gray code

    CN115451860A

  • Quaternary Gray code three-dimensional imaging method and device, electronic equipment and storage medium

    CN118729990A