A folding phase-assisted binary-coded fast phase-unwrapping method
By obtaining the positive and negative values of the folded phase to acquire a binarized image and performing connected component calculations, and combining the reverse binarized image to obtain the fringe order, the problems of high phase unwrapping cost and noise interference in the prior art are solved, and a fast and robust phase unwrapping effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2023-01-18
- Publication Date
- 2026-05-19
AI Technical Summary
Existing phase unrolling methods are costly, inefficient, and susceptible to environmental noise interference, leading to inaccurate solutions for edge point fringe order.
By obtaining the folded phase in the sinusoidal fringe pattern, a binarized image is obtained based on the positive and negative signs of the folded phase, and connected component calculation is performed. The fringe order is obtained by combining the inverse binarized image. Finally, the phase is unfolded by combining the folded phase, and the least squares method and full-1 convolution kernel filtering are used to improve robustness.
It achieves fast and robust phase unfolding, effectively suppresses the influence of environmental noise and phase anomalies, ensures accurate alignment of fringe order with folded phase, and improves the accuracy and efficiency of phase unfolding.
Smart Images

Figure CN116055739B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical three-dimensional imaging technology, and in particular to a folded phase-assisted binary encoding fast phase unwrapping method. Background Technology
[0002] Three-dimensional imaging technology is an important means of recording and analyzing the real world, and it is one of the key research areas in computational imaging and geometric measurement. Optical three-dimensional imaging technology has advantages such as non-contact, speed, and high precision, and has broad application prospects in both everyday consumer and industrial professional inspection fields.
[0003] Phase-encoded structured light 3D imaging technology projects an coded medium onto the measured physical surface, increasing the geometric constraints on the measured object points in space. This allows for effective recovery of 3D information even in areas difficult to reconstruct with binocular stereo vision, such as those with weak textures or high reflectivity. Phase unwrapping unfolds the phase folded in [-π, π] in space, ensuring the uniqueness of the phase at each measured point, thus establishing a mapping relationship between the 3D point cloud and phase information. Current phase unwrapping methods mainly include temporal phase unwrapping and spatial phase unwrapping. Temporal phase unwrapping projects a coded pattern onto the folded phase to uniquely determine the fringe order in the folded phase. This mainly includes multi-frequency methods, multi-wavelength methods, and Gray code methods. These methods can independently determine the phase of pixels, effectively avoiding the propagation and interference of phase errors, and generally offer high accuracy. However, the speed is limited by the need for additional coded images. Spatial phase unwrapping methods analyze the phase values between adjacent pixels in space and adjust these values based on the characteristics of phase continuity to obtain a continuous phase. This method does not require the projection of additional images.
[0004] Gray code-assisted phase unwrapping uses binary codes to independently encode the phase at each point, requiring a large number of coding patterns and limiting the fringe period. Binary coding, on the other hand, only needs to project a single binary image aligned with the period to achieve fringe order encoding, and the sinusoidal fringe period is not limited. However, its binarization process is easily affected by ambient light, and the fringe period and the fringe order encoding period are prone to misalignment, leading to inaccurate fringe order determination at edge points. Summary of the Invention
[0005] The purpose of this invention is to propose a fast phase unwrapping method for binary encoding with folded phase assistance, so as to solve the problems of high cost, low efficiency and time consumption in existing phase unwrapping methods.
[0006] To achieve the above objectives, this application provides the following solution:
[0007] A folded phase-assisted binary encoding fast phase unrolling method, characterized by comprising:
[0008] Obtain the folded phase in the sine fringe pattern;
[0009] Based on the sign of the folded phase, a binarized image is obtained, and based on the binarized image, an inverse binarized image is obtained;
[0010] Connected component calculations are performed on the binarized image and the inverse binarized image respectively to obtain the first connected component code and the second connected component code;
[0011] The stripe level is obtained by using the first connected component encoding and the second connected component encoding;
[0012] The stripe order is combined with the folded phase to obtain the unfolded phase.
[0013] Optionally, the least squares method is used in the process of obtaining the folded phase.
[0014] Optionally, the folded phase is:
[0015]
[0016] Where P(x,y) is the set of folded phases, I i (x,y) represents the light intensity distribution of pixel (x,y) in the i-th stripe pattern, δ i (x,y) represents the phase shift of pixel (x,y) in the i-th fringe pattern, and N represents the number of grating fringe patterns.
[0017] Optionally, obtaining the binarized image includes:
[0018] Determine the sign of the folded phase, and assign values according to the determination results to obtain the binarized image.
[0019] Optionally, the binarized image is:
[0020]
[0021] Among them, I left (x,y) is the set of binarized images, and P(x,y) is the set of folded phases.
[0022] Optionally, before performing connected component calculation on the binarized image and the inverse binarized image, the following steps are included: filtering the binarized image and the inverse binarized image using a full-1 convolution kernel and a connected component threshold.
[0023] Optionally, obtaining the stripe order includes:
[0024] The first connected component code and the second connected component code are added together to obtain the stripe level.
[0025] Optionally, the stripe order is:
[0026] K(x,y)=K left (x,y)+K right (x,y),
[0027] Where K(x,y) is the set of stripe orders, K left (x,y) is the connected component encoding of the binary image, K right (x,y) is the connected component encoding of the inverse binarized image.
[0028] Optionally, the method for unfolding the phase is as follows:
[0029] UP(x,y)=P(x,y)+2πK(x,y),
[0030] Where UP(x,y) is the set of expanded phases, P(x,y) is the set of folded phases, and K(x,y) is the set of fringe orders.
[0031] The beneficial effects of this invention are as follows:
[0032] Rapid phase unfolding is achieved through folded phase assistance, and it exhibits strong noise resistance, including robustness against the effects of phase anomalies, Gaussian noise, and defocusing.
[0033] This invention uses the sign of the folded phase as the criterion for binarization, achieving strict alignment between the folded phase and the fringe order pattern. At the same time, the phase-based binarization process can effectively avoid interference from environmental noise and has strong robustness. This invention does not require additional projection of the fringe order coding pattern and has the advantages of being fast and robust. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of this application, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the fast phase unpacking method for binary encoding with folded phase assistance according to an embodiment of the present invention.
[0036] Figure 2This is a schematic diagram of the phase unpacking process of the folded phase-assisted binary coding fast phase unpacking method according to an embodiment of the present invention. In this diagram, (a) is the binarized distribution corresponding to a row of the folded phase; (b) is the connected component coding distribution generated by the bwlabel function based on the binary distribution in (a); (c) is the reverse binarized distribution corresponding to a row of the folded phase; (d) is the connected component coding distribution generated by the bwlabel function based on the binary distribution in (c); and (e) is the stripe level distribution obtained by adding the connected component codes in (b) and (d).
[0037] Figure 3 This is a schematic diagram of a row of folded phase values with phase anomalies in the folded phase-assisted binary encoding fast phase unpacking method according to an embodiment of the present invention.
[0038] Figure 4 This is a schematic diagram of the fringe order solution in the folded phase-assisted binary encoding fast phase unrolling method according to an embodiment of this application;
[0039] Figure 5 This is a schematic diagram of phase unpacking in the folded phase-assisted binary encoding fast phase unpacking method according to an embodiment of this application;
[0040] Figure 6 This is a sine fringe pattern in the folded phase-assisted binary encoding fast phase unrolling method of this application embodiment;
[0041] Figure 7 This is a schematic diagram of a row of folded phases in the binary encoding fast phase unrolling method with folded phase assistance in the embodiments of this application;
[0042] Figure 8 This is a binary image obtained based on phase judgment in the fast phase unrolling method of folded phase-assisted binary encoding in the embodiments of this application;
[0043] Figure 9 This is the inverse binary image constructed in the folded phase-assisted binary encoding fast phase unrolling method of this application embodiment;
[0044] Figure 10 This is a stripe order diagram with many noise points in the folded phase-assisted binary coding fast phase unpacking method of this application embodiment;
[0045] Figure 11 This is the corrected fringe order diagram in the folded phase-assisted binary encoding fast phase unrolling method of this application embodiment;
[0046] Figure 12 This is the final phase unfolded diagram in the folded phase-assisted binary encoding fast phase unfolding method according to the embodiments of this application; Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] This invention proposes a folded phase-assisted binary coding fast phase unrolling method, which mainly includes:
[0050] Obtain the folded phase in the sine fringe pattern;
[0051] Based on the sign of the folded phase, obtain the binarized image; based on the binarized image, obtain the inverse binarized image.
[0052] Connected component calculations are performed on the binarized image and the inverse binarized image respectively to obtain the first connected component code and the second connected component code;
[0053] The stripe level is obtained by encoding the first and second connected components.
[0054] By combining the fringe order with the folded phase, the unfolded phase is obtained.
[0055] Furthermore, the least squares method is used in the process of obtaining the folded phase.
[0056] Furthermore, obtaining the binarized image includes:
[0057] Determine the sign of the folded phase, assign values according to the determination results, and obtain a binarized image.
[0058] Furthermore, before performing connected component calculation on the binarized and inverse binarized images, the following steps are taken: filtering the binarized and inverse binarized images using a full-1 convolution kernel and a connected component threshold.
[0059] Furthermore, obtaining stripe grades includes:
[0060] The first connected component code and the second connected component code are added together to obtain the stripe level.
[0061] like Figure 1 As shown in the figure, the folded phase-assisted binary coding fast phase unrolling method proposed in this embodiment specifically includes the following steps:
[0062] The folded phase is obtained from the captured sinusoidal fringe pattern using the least squares method, as shown in equation (1):
[0063]
[0064] In the formula, P(x,y) is the set of folded phases, I i (x,y) represents the light intensity distribution of pixel (x,y) in the i-th stripe pattern, δ i (x,y) represents the phase shift of pixel (x,y) in the i-th fringe pattern, and N is the number of grating fringe patterns. The binarized image is obtained based on the sign of the folded phase, as shown in equation (2):
[0065]
[0066] In the formula, I left (x,y) is the set of binarized images, and P(x,y) is the set of folded phases.
[0067] Because phase binarization is used, it has good noise resistance. The inverse binarized image can be obtained by reversing the black and white values of the binarized image, as shown in equation (3):
[0068]
[0069] To eliminate the influence of local phase anomalies on connected component calculation, a full-1 convolution kernel and a connected component threshold are used to filter the binarized image. The connected component encoding of the two constructed binarized images is implemented using the built-in Matlab connected component encoding function bwlabel, as shown in equation (4):
[0070]
[0071] The stripe order K can be obtained by adding the connected component codes of the two images, as shown in equation (5):
[0072] K(x,y)=K left (x,y)+K right (x,y)(5),
[0073] In the formula, K(x,y) is the set of the stripe orders, K left (x,y) is the connected component encoding of the binarized image, K right (x,y) is the connected component encoding of the inverse binarized image.
[0074] Finally, by combining the fringe order and the folded phase, the unfolded phase can be obtained, as shown in equation (6):
[0075] UP(x,y)=P(x,y)+2πK(x,y)(6),
[0076] In the formula, UP(x,y) is the set of the unfolded phases, P(x,y) is the set of the folded phases, and K(x,y) is the set of the fringe orders.
[0077] Figure 2 The phase unfolding process in this embodiment is illustrated in the figures for ease of description, showing the unfolding of a single row of phases. Figures (a) and (c) show the correspondence between the folded phases and the period of the binary image, Figures (b) and (d) show the connected component sorting and numbering of the binary image, and Figure (e) shows the result of adding the corresponding positions in Figures (b) and (d), achieving accurate phase unfolding.
[0078] like Figure 3 As shown, the simulation addresses phase errors caused by ambient light, resulting in anomalous phase points. This proposed solution effectively suppresses the impact of these anomalous points on the fringe order, such as... Figure 4 , Figure 5 As shown.
[0079] The phase unrolling of a two-dimensional calibration plate is used as an implementation case study. The specific implementation is as follows:
[0080] 1) Collect three sinusoidal fringe patterns, with a phase shift of 2 / 3π between them;
[0081] 2) Convert the above fringe pattern to grayscale and perform folding phase calculation based on equation (1);
[0082] 3) Based on the folded phase matrix, a binarized image is obtained using the positive or negative sign of the folded phase as the criterion;
[0083] 4) Invert the binarized image to obtain the inverted binarized image;
[0084] 5) Based on the built-in bwlabel function in Matlab, sort the connected components of the two constructed binary images respectively;
[0085] 6) By sorting the corresponding positions of the two connected components and adding them together, the stripe order can be obtained;
[0086] 7) Obtain the unfolded phase based on the fringe order diagram and the folded phase diagram;
[0087] Figure 6 A sine bar image. Figure 7 The folding phase of a certain row. Figure 8 This is a binary image obtained based on phase judgment. Figure 9 This is the constructed inverse binary graph; Figure 10 The fringe order exhibits significant noise, caused by fluctuations in the folded phase threshold boundary, which prevents some points from participating in the fringe order calculation. To reduce this noise, local median filtering is employed to correct the fringe order in these regions. Figure 11 This is the corrected stripe order diagram. Figure 12 This is the final phase unfolded diagram.
[0088] This embodiment uses the idea of directly constructing a stripe level binary code image from folded phase to achieve accurate alignment between folded phase and stripe level encoding; it uses the phase value as the threshold for image binarization to improve the robustness of binarization; it constructs a stripe level encoded image using half-period and cleverly applies connected components to solve for the stripe level.
[0089] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made to the technical solutions of this application by those skilled in the art without departing from the spirit of this application shall fall within the protection scope defined by the claims of this application.
Claims
1. A fast phase unwrapping method for binary encoding with folded phase assistance, characterized in that, include: Obtain the folded phase in the sine fringe pattern; Based on the sign of the folded phase, a binarized image is obtained, and based on the binarized image, an inverse binarized image is obtained. Connected component calculations are performed on the binarized image and the inverse binarized image respectively to obtain the first connected component code and the second connected component code; The stripe level is obtained by using the first connected component encoding and the second connected component encoding; The stripe order is combined with the folded phase to obtain the unfolded phase.
2. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, The least squares method is used to obtain the folded phase.
3. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, The folded phase is: Where P(x,y) is the set of folded phases, I i (x,y) represents the light intensity distribution of pixel (x,y) in the i-th stripe pattern, δ i (x,y) represents the phase shift of pixel (x,y) in the i-th fringe pattern, and N represents the number of grating fringe patterns.
4. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, Obtaining the binarized image includes: Determine the sign of the folded phase, and assign values according to the determination results to obtain the binarized image.
5. A folded phase-assisted binary coding fast phase unwrapping method according to claim 1 or 4, characterized in that, The binarized image is: Among them, I left (x,y) is the set of binarized images, and P(x,y) is the set of folded phases.
6. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, Before performing connected component calculation on the binarized image and the inverse binarized image, the following steps are taken: filtering the binarized image and the inverse binarized image using a full-1 convolution kernel and a connected component threshold.
7. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, Obtaining the stripe order includes: The first connected component code and the second connected component code are added together to obtain the stripe level.
8. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, The stripe order is: K(x,y)=K left (x,y)+K right (x,y), Where K(x,y) is the set of stripe orders, K left (x,y) is the connected component encoding of the binary image, K right (x,y) is the connected component encoding of the inverse binarized image.
9. The method for fast phase unwrapping of binary codes with folded phase assistance according to claim 1, characterized in that, The method for expanding the phase is as follows: UP(x,y)=P(x,y)+2πK(x,y), Where UP(x,y) is the set of expanded phases, P(x,y) is the set of folded phases, and K(x,y) is the set of fringe orders.