A number theory based grating phase unwrapping method

CN116681823BActive Publication Date: 2026-09-04DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310598665.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2026-09-04
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

传统的基于数论解包算法,相位展开过程中会出现一定的条纹阶次解算错误或无法解算等情况

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116681823B_ABST
    Figure CN116681823B_ABST
Patent Text Reader

Abstract

The application belongs to the field of optical three-dimensional reconstruction, and provides a grating phase unwrapping method based on number theory, in particular to a method for obtaining grating orders of coordinate points based on number theory, which can be used for solving the absolute phase of the coordinate points, and further obtaining three-dimensional reconstruction information of an object surface. The phase unwrapping can be performed through the optimized look-up table, so that the calculation error can be reduced, the reconstruction accuracy can be improved, and the robustness of the algorithm can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of optical 3D reconstruction; more specifically, it relates to a method for obtaining the grating order of coordinate points based on number theory; it can be used to solve the absolute phase of coordinate points, and then obtain 3D reconstruction information of the object surface; this invention can be used for 3D surface reconstruction of objects in the optical field. Background Technology

[0002] In recent years, with the development of technology and the increase in social demand, three-dimensional object reconstruction technology has been widely used. Structured light three-dimensional surface reconstruction technology has the advantages of high precision, strong robustness, and low cost, and has become one of the important research directions in measurement technology. It is widely used in industrial design, non-destructive testing, biomedical engineering and other fields.

[0003] In the field of structured light reconstruction technology, phase-shift profilometry is the most widely used technique. This method involves pre-setting grating fringes with different periods, then projecting them onto the surface of the object under test. An industrial camera is used to acquire a series of images of the grating fringes modulated by the object, and then the phase information of the object's surface is solved. Finally, the three-dimensional reconstruction of the object's surface is performed using the phase information.

[0004] Phase unpacking is a crucial research area in phase-shift profilometry, with its core objective being the acquisition of the fringe order at coordinate points. Current unpacking techniques include Gray code-based phase expansion, multi-frequency heterodyne phase expansion, and number theory-based phase expansion. Traditional number theory-based unpacking algorithms, however, may encounter errors or even fail to calculate the fringe order during the phase expansion process.

[0005] To address the aforementioned problems, this invention proposes a number theory-based lookup table construction method. Using this lookup table for phase unpacking reduces calculation errors and improves reconstruction accuracy. Furthermore, the optimized lookup table incorporates an error correction mechanism, enhancing the algorithm's robustness. In the specific operation, the grating order of a coordinate point is obtained by looking up the table using its known period and enclosed phase value; then, the absolute phase of that point is calculated using the grating order; finally, 3D reconstruction is performed. Summary of the Invention

[0006] The main research content of this invention is a grating phase unrolling method based on number theory. This method can improve the hit probability of finding the fringe order to a certain extent; at the same time, it enhances the robustness of the algorithm; and thus, improves the accuracy of 3D surface reconstruction of objects.

[0007] In view of this, the present invention provides a grating order phase expansion method based on number theory, the steps of which are as follows:

[0008] 1) Set the relevant parameters of the projected grating stripes: stripe pixel width W, stripe pixel height H, average gray level of the stripes A, gray level modulation of the stripes B, and number of stripe frames N;

[0009] 2) Based on the parameters set in step 1), calculate the phase shift δ for different frame numbers. h :

[0010]

[0011] Among them, k=0,1,2,…,N-1, h=k+1; δ h This represents the phase shift of the h-th frame;

[0012] Set the number of fringe periods T, traverse the pixels, and calculate the wrapping phase of the grating fringe pixels under period T:

[0013]

[0014] in, The phase size is represented by the grating point with period T and x-coordinate, where x = 1, 2, 3, ..., W;

[0015] Using the light intensity distribution formula, calculate the light intensity distribution of the grating points and generate N frames of grating fringe patterns with a certain phase shift:

[0016]

[0017] Where A is the average gray level of the stripes, and B is the gray level modulation of the stripes;

[0018] 3) Project the generated N frames of grating fringe patterns onto the surface of the object to be tested, and capture images of the grating fringe patterns modulated by the object to be tested using a camera;

[0019] Calculate the phase information encapsulated in the grating fringe image modulated by the object under test:

[0020]

[0021] The acquired package phase is transformed to make it strictly monotonic within the period:

[0022]

[0023] in, For the original package phase, The converted wrap phase;

[0024] 4) Normalize the package phase value calculated in step 3):

[0025]

[0026] in, For the original package phase, The normalized wrap-around phase;

[0027] Establish the fringe order η(u,v), and the normalized wrap phase. The formula relating the fringe period T to the camera coordinate values ​​ε(u,v) is as follows:

[0028]

[0029] Where i is the period number, T i η represents the period of the stripes. i (u,v) represents the fringe order. This represents the normalized wrapper phase value;

[0030] 5) Since the camera coordinate value of each pixel is only related to its position in space and not to the grating stripes projected onto the object surface; according to formula (7), the coordinate calculation formula for pixels in the camera coordinate system corresponding to different periods is established:

[0031]

[0032] Rearranging the terms, we get:

[0033]

[0034] make

[0035] 6) From formula (7), we know that when ε>ε max At that time, ε max The least common multiple of the period values, different periods T i The solution for the wrapped phase value will result in a loop, causing ambiguity in the calculated camera coordinate values, making it impossible to solve; therefore, the fringe order η i and period T i The following conditions must be met:

[0036]

[0037] 7) Let the period be T i The maximum value of the corresponding fringe order is Max(η). i To ensure its uniqueness in the lookup table; Max(η) under any period i The value is numerically equal to the least common multiple of all periods minus 1; let the maximum pixel be Max(n), which is numerically equal to the least common multiple of all periods minus 1;

[0038] 8) Set the initial fringe number (a number composed of fringe orders from different periods). Under the raster projection of each period, traverse all pixel coordinates. When the fringe order η in one period... i When a change occurs, the new stripe number is recorded. This process continues until the last pixel coordinate point n is reached, at which point all stripe number values ​​can be obtained. The obtained stripe number values ​​are then used to calculate the index value a using formula (10). i b i c i The stripe numbers are mapped to different index values ​​to create three lookup tables;

[0039] 9) Establish the mapping relationship between package phase and lookup table:

[0040]

[0041] Wherein: T i Indicates different periods; This represents the normalized wrapper phase value;

[0042] 10) Calculate the different index values ​​A i B i C i The value is then used to consult the three lookup tables established in step 8), and the stripe number is obtained according to the following decision-making mechanism:

[0043] If the three lookup table indexes are successful, and two or more lookup tables obtain the same stripe number value, then phase expansion is performed according to the same stripe number; if the three stripe number values ​​of the index are different, then it is determined that the stripe number of that point failed to be obtained, and its phase value cannot be expanded.

[0044] If the two lookup tables are successfully indexed and the obtained stripe number values ​​are the same, then the phase is expanded according to that stripe number; if the two lookup tables obtain different stripe number values, then it is determined that the stripe number of that point has failed to be obtained, and its phase value cannot be expanded.

[0045] If only one lookup table index is successful, then phase expansion is performed according to the stripe number;

[0046] If no lookup table index is found, it is determined that the stripe number of that point has failed to be obtained, and its phase value cannot be expanded.

[0047] 11) Using the stripe number values ​​obtained from the decision-making mechanism in step 10), calculate the coordinate values ​​ε(u,v) of the pixel in the camera coordinate system:

[0048]

[0049] 12) Based on the coordinates ε(u,v) calculated in step 11), obtain the three-dimensional surface position information of the object and perform reconstruction.

[0050] This invention proposes a number theory-based lookup table construction method. Using this lookup table for phase unpacking can reduce calculation errors and improve reconstruction accuracy. At the same time, the optimized lookup table adds an error correction mechanism, which enhances the robustness of the algorithm. Attached Figure Description

[0051] Figure 1 This is a flowchart of generating grating fringes and wrapping phase unwrapping.

[0052] Figure 2 It is a computer-generated raster stripe effect.

[0053] Figure 3 This is a schematic diagram of the structured light reconstruction system.

[0054] Figure 4 This is a diagram showing the simulation results of the object's enveloping phase.

[0055] Figure 5 This is a flowchart of lookup table creation and phase unpacking.

[0056] Figure 6 This refers to the decision-making mechanism in the lookup table algorithm. Detailed Implementation

[0057] To more clearly describe the operation steps and technical advantages of this invention, the following will simulate the generation of grating fringes, the unwrapping of the phase wrapping, the establishment of the lookup table, and the specific steps of solving the camera coordinates using the lookup table. The technical steps are fully described in conjunction with the accompanying drawings of this invention, and the specific implementation scheme is as follows:

[0058] 1) Set the parameters of the projected grating stripes: stripe pixel width W, stripe pixel height H, average grayscale of the stripes A, grayscale modulation of the stripes B, and number of stripe frames N.

[0059] 2) Calculate the phase shift at different frame numbers:

[0060]

[0061] Set the fringe periods to T1, T2, and T3. Iterate through the grating points under different periods and calculate their wrapping phase.

[0062]

[0063] Calculate the light intensity distribution of the grating points and generate N frames of gratings with a certain phase shift:

[0064]

[0065] Figure 2 This is a schematic diagram of grating fringes generated by computer simulation.

[0066] 3) Project the generated N frames of grating fringe patterns onto the surface of the object under test, and acquire the grating fringe image modulated by the object under test using a camera. Figure 3 A schematic diagram of its operation.

[0067] Solving the grating fringe images with periods T1, T2, and T3, we obtain the envelope phase information modulated by the object under test.

[0068]

[0069] Taking a fringe frame number N=4 as an example, with a fringe pixel width W=1024 and a fringe pixel height H=1024, and a fringe period T=300 pixels, the simulated wrapping phase result is as follows. Figure 5 As shown.

[0070] The acquired package phase is transformed to obtain a new package phase.

[0071]

[0072] 4) Normalize the calculated wrapping phase values ​​from step 3) to obtain...

[0073]

[0074] 5) Let the maximum values ​​of the stripe orders corresponding to T1, T2, and T3 be m1, m2, and m3, respectively, and the coordinates of the last pixel be n. To ensure the uniqueness of the lookup table, it must satisfy the following relationship:

[0075]

[0076] 6) Under raster projection with periods T1, T2, and T3, traverse from the first pixel and assign a fringe order number of 000. During the traversal, when any of the values ​​η1, η2, and η3 changes, update the corresponding fringe number until the last pixel coordinate point n is reached; thus, all fringe numbers can be obtained.

[0077] 7) Combine the fringe order η(u,v) and the wrapped phase solved in step 4). Establish the relationship equation between the period T and the camera coordinate values ​​ε(u,v):

[0078]

[0079] 8) Let a ij=T j η j (u,v)-T i η i (u,v)

[0080] Taking periods T1=2, T2=3, T3=4 as an example, n=LCM(T1,T2,T3)-1=11. From step 6), obtain the stripe orders η1, η2, η3 corresponding to the pixels, and calculate different index values: a1, a2, b1, b3, c1, c2.

[0081]

[0082]

[0083]

[0084] Map the stripe numbers η1, η2, η3 to the index values ​​a1, a2; b1, b3; c1, c2 respectively, and create the following three lookup tables. The total length of the lookup tables is 8.

[0085]

[0086] 9) From step 4) Calculate the values ​​of A2, A3, B1, B3, C1, and C2, and round them to the nearest integer.

[0087]

[0088]

[0089]

[0090] 9) Using the lookup table established in step 8), based on the index values ​​A2, A3, B1, B3, C1, C2, ... Figure 6 The constructed lookup mechanism is used to obtain the stripe order number, and the corresponding stripe order number η1, η2, η3 is obtained.

[0091] 10) Using η1, η2, and η3 obtained in step 9), calculate the camera coordinate value ε(u,v) of the pixel:

[0092]

Claims

1. A grating phase unrolling method based on number theory, characterized in that, The steps are as follows: 1) Set the relevant parameters of the projected grating stripes: stripe pixel width W, stripe pixel height H, average gray level of the stripes A, gray level modulation of the stripes B, and number of stripe frames N; 2) Based on the parameters set in step 1), calculate the phase shift δ for different frame numbers. h : Among them, k=0,1,2,…,N-1, h=k+1; δ h This represents the phase shift of the h-th frame; Set the number of fringe periods T, traverse the pixels, and calculate the wrapping phase of the grating fringe pixels under period T: in, The phase size is represented by the grating point with period T and x-coordinate, where x = 1, 2, 3, ..., W; Using the light intensity distribution formula, calculate the light intensity distribution of the grating points and generate N frames of grating fringe patterns with a certain phase shift: Where A is the average gray level of the stripes, and B is the gray level modulation of the stripes; 3) Project the generated N frames of grating fringe patterns onto the surface of the object to be tested, and capture images of the grating fringe patterns modulated by the object to be tested using a camera; Calculate the phase information encapsulated in the grating fringe image modulated by the object under test: The acquired package phase is transformed to make it strictly monotonic within the period: in, For the original package phase, The converted wrap phase; 4) Normalize the package phase value calculated in step 3): in, For the original package phase, The normalized wrap-around phase; Establish the fringe order η(u,v), and the normalized wrap phase. The formula relating the fringe period T to the camera coordinate values ​​ε(u,v) is as follows: Where i is the period number, T i η represents the period of the stripes. i (u,v) represents the fringe order. This represents the normalized wrapper phase value; 5) Since the camera coordinate value of each pixel is only related to its position in space and not to the grating stripes projected onto the object surface; according to formula (7), the coordinate calculation formula for pixels in the camera coordinate system corresponding to different periods is established: Rearranging the terms, we get: make 6) From formula (7), we know that when ε>ε max At that time, ε max The least common multiple of the period values, different periods T i The solution for the wrapped phase value will result in a loop, causing ambiguity in the calculated camera coordinate values, making it impossible to solve; therefore, the fringe order η i and period T i The following conditions must be met: 7) Let the period be T i The maximum value of the corresponding fringe order is Max(η). i To ensure its uniqueness in the lookup table; Max(η) under any period i The value is numerically equal to the least common multiple of all periods minus 1; let the maximum pixel be Max(n), which is numerically equal to the least common multiple of all periods minus 1; 8) Numbering of fringe orders in different periods: Set the starting fringe number, and under the raster projection of each period, traverse all pixel coordinates. When the fringe order η in one period... i When a change occurs, the new stripe number is recorded. This process continues until the last pixel coordinate point n is reached, at which point all stripe number values ​​can be obtained. The obtained stripe number values ​​are then used to calculate the index value a using formula (10). i b i c i The stripe numbers are mapped to different index values ​​to create three lookup tables; 9) Establish the mapping relationship between package phase and lookup table: make Wherein: T i Indicates different periods; This represents the normalized wrapper phase value; 10) Calculate the different index values ​​A i B i C i The value is then used to consult the three lookup tables established in step 8), and the stripe number is obtained according to the following decision-making mechanism: If the three lookup table indexes are successful, and two or more lookup tables obtain the same stripe number value, then phase expansion is performed according to the same stripe number; if the three stripe number values ​​of the index are different, then it is determined that the stripe number of that point failed to be obtained, and its phase value cannot be expanded. If the two lookup tables are successfully indexed and the obtained stripe number values ​​are the same, then the phase is expanded according to that stripe number; if the two lookup tables obtain different stripe number values, then it is determined that the stripe number of that point has failed to be obtained, and its phase value cannot be expanded. If only one lookup table index is successful, then phase expansion is performed according to the stripe number; If no lookup table index is found, it is determined that the stripe number of that point has failed to be obtained, and its phase value cannot be expanded. 11) Using the stripe number values ​​obtained from the decision-making mechanism in step 10), calculate the coordinate values ​​ε(u,v) of the pixel in the camera coordinate system: 12) Based on the coordinates ε(u,v) calculated in step 11), obtain the three-dimensional surface position information of the object and perform reconstruction.

Citation Information

Patent Citations

  • Staggered phase unwrapping method capable of avoiding periodic error

    CN116086353A

  • Image point source tracing-based error correction method for phase measurement of object grating image using phase shifting method

    WO2020220707A1