A single-frame gray-scale pulse coding phase unwrapping method

CN122708690BActive Publication Date: 2026-10-27ANHUI AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611222846.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-27
Estimated Expiration
2046-08-13

AI Technical Summary

Technical Problem

其中,空间二值编码法受限于灰度级与空间分段数,难以兼顾编码容量与解码效率;空间灰度编码法虽能够增加编码容量,但易受物体表面反射率、外界环境光照及系统随机噪声的干扰;空间相位编码法虽具有较强的抗干扰能力,但至少需要三幅辅助编码图案

Benefits of technology

[0060]本发明仅需一幅额外的灰度脉冲编码图像,通过结合灰度脉冲编码图像的灰度信息和位置信息,便可确定截断相位对应的条纹级次,实现快速、准确、鲁棒的相位展开。与传统时间相位展开法需要投射多幅额外编码图案相比,本发明大幅减少了所需编码图案的数量,显著提升了三维测量速度,适用于高速在线测量场景。与传统空间灰度编码法相比,本发明通过引入相位级次与灰度级次的二维编码策略,利用连通域合并与掩膜提取等操作,有效抵抗物体表面反射率差异和环境光照干扰,具有更强的鲁棒性和更高的编码容量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122708690B_ABST
    Figure CN122708690B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of structured light three-dimensional measurement, and discloses a single-frame gray pulse coding phase unwrapping method, comprising the following steps: step S1: a structured light three-dimensional measurement system is built, and the system comprises a projector and a camera; step S2: the projector is triggered to project a gray pulse coding pattern and a phase shift stripe pattern to an object to be measured respectively; step S3: a three-step phase shift algorithm is used to extract the background intensity, modulation intensity and truncated phase of the phase shift stripe image; step S4: two mask images are generated according to the value range of the truncated phase; and step S5: according to the gray level value and the phase level value corresponding to each gray pulse mask, the corresponding stripe level value is calculated. The present application only needs one additional gray pulse coding image, and by combining the gray information and position information of the gray pulse coding image, the stripe level corresponding to the truncated phase can be determined, and fast, accurate and robust phase unwrapping is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of structured light three-dimensional measurement technology, and in particular to a single-frame grayscale pulse-coded phase unwrapping method. Background Technology

[0002] Phase-shifting profilometry is a key technology in structured light 3D measurement systems, widely used in industrial inspection, reverse engineering, and biomedicine, offering advantages such as non-contact operation, high precision, high speed, and ease of implementation. This technology projects phase-shifted fringes onto the surface of the object under test using a projector, and simultaneously acquires images of the deformed fringes modulated by the object's surface topography using a camera. The phase information in the deformed fringes image is then demodulated to reconstruct the 3D topography of the object.

[0003] Existing phase-shifting profilometry typically employs three-step or multi-step phase-shifting algorithms to calculate the truncated phase (also known as the wrapped phase or entangled phase) with periodic jumps, and then recovers the continuous absolute phase using phase unwrapping methods. Existing phase unwrapping methods can be broadly classified into two categories: spatial phase unwrapping and temporal phase unwrapping. Spatial phase unwrapping performs pixel-by-pixel phase unwrapping by detecting phase jumps between adjacent pixels, making it suitable for objects with continuous, smooth surfaces; however, it is prone to error accumulation and phase propagation errors when measuring objects with highly abrupt changes, complex edges, or spatially isolated regions. Temporal phase unwrapping determines the fringe order corresponding to the truncated phase by additionally projecting patterns of different frequencies, wavelengths, Gray codes, and phase codes. While it can adapt to the measurement of complex or discontinuous objects, projecting and acquiring additional coded patterns reduces the speed of 3D measurement and is not suitable for high-speed online measurement scenarios.

[0004] Scholars have also proposed various spatial coding methods to reduce the number of coding patterns. Among them, spatial binary coding is limited by gray levels and the number of spatial segments, making it difficult to balance coding capacity and decoding efficiency; spatial gray-scale coding can increase coding capacity, but it is easily affected by the reflectivity of object surfaces, ambient lighting, and random noise in the system; spatial phase coding has strong anti-interference capabilities, but it requires at least three auxiliary coding patterns.

[0005] Therefore, how to reduce the number of required coding patterns while ensuring the accuracy of phase unfolding, and balance the accuracy and speed of 3D measurement, remains a key technical problem that needs to be solved in the field of structured light vision. Summary of the Invention

[0006] To address the technical problems mentioned in the background section, this invention provides a single-frame grayscale pulse coding phase unwrapping method.

[0007] This invention is achieved using the following technical solution: a single-frame grayscale pulse coding phase unwrapping method, comprising the following steps:

[0008] Step S1: Set up a structured light 3D measurement system, which includes a projector and a camera;

[0009] Step S2: Trigger the projector to project the grayscale pulse-coded pattern and the phase-shifted fringe pattern onto the object under test, and simultaneously trigger the camera to acquire the grayscale pulse-coded image and the phase-shifted fringe image that have been distorted after being modulated by the object under test;

[0010] Step S3: Use the three-step phase-shifting algorithm to extract the background intensity, modulation intensity and truncation phase of the phase-shifted fringe image, use the background intensity and modulation intensity to correct the grayscale pulse-coded image, obtain the corrected grayscale pulse-coded image, and recover the grayscale level image based on the corrected grayscale pulse-coded image.

[0011] Step S4: Generate two mask images based on the range of truncated phase values, merge the connected components that intersect in the two mask images, and segment out each stripe period; extract each gray-level pulse mask from the corrected gray-level pulse coded image, calculate the average phase value corresponding to each gray-level pulse mask, and determine the gray level value and phase level value corresponding to each gray-level pulse mask.

[0012] Step S5: Calculate the corresponding fringe level value based on the gray level value and phase level value of each gray pulse mask, fuse the fringe level values ​​of each fringe period to obtain a fringe level image, and use the fringe level image to perform phase unrolling on the truncated phase to recover the absolute phase of the object under test.

[0013] Furthermore, in step S1, the camera and projector are synchronously triggered through an external hardware circuit; the object to be measured is placed within the common field of view of the projector and the camera, and the three together form a triangulation structure.

[0014] Furthermore, in step S2, the camera captures a phase-shifted fringe image. Represented as:

[0015]

[0016]

[0017]

[0018] In the formula, Represents the camera's pixel coordinates. Indicates background intensity. Indicates modulation intensity. Indicates phase cutoff;

[0019] In step S2, the camera captures a grayscale pulse-coded image. Represented as:

[0020]

[0021] In the formula This represents the floor function. Indicates the stripe order. Indicates the maximum number of gray levels that can be encoded. This indicates the maximum coded phase order. Indicates the encoded phase. This indicates the half-pulse width.

[0022] Furthermore, the encoded phase Represented as:

[0023]

[0024] In the formula This represents the modulo function, with the first input parameter being the dividend and the second input parameter being the divisor.

[0025] Furthermore, in step S3, the background intensity Modulation intensity With truncated phase The formula for calculation is:

[0026]

[0027]

[0028]

[0029] In the formula This represents the arctangent function in the four quadrants, and the calculated cutoff phase. The value range can be converted to ;

[0030] In step S3, the corrected grayscale pulse-coded image The formula for calculation is:

[0031]

[0032] Gray level image The formula for calculation is:

[0033]

[0034] In the formula, This represents the rounding function. This indicates the maximum number of gray levels that can be encoded.

[0035] Furthermore, in step S4, the two mask images Represented as:

[0036]

[0037]

[0038] Furthermore, in step S4, a single grayscale pulse mask... Represented as:

[0039] (13)

[0040] (14)

[0041] In the formula, This represents all grayscale pulse masks. Indicates the stripe period. This represents an image with grayscale levels.

[0042] Furthermore, in step S4, the grayscale pulse mask... Corresponding average phase value The formula for calculation is:

[0043] (15)

[0044] In the formula This represents the summation operator;

[0045] gray level sub-value The formula for calculation is:

[0046]

[0047] Phase level order The formula for calculation is:

[0048]

[0049] In the formula, This represents the rounding function. This represents the floor function, where N represents the maximum encodeable phase order; the corresponding phase order image. Represented as:

[0050]

[0051] Furthermore, in step S5, the stripe level sub-value The formula for calculation is:

[0052]

[0053] Striped level image Represented as:

[0054]

[0055] absolute phase Represented as:

[0056]

[0057] In the formula, This indicates the maximum coded phase order. Indicates the stripe period.

[0058] Furthermore, the single-frame grayscale pulse coding phase unwrapping method proposed in this invention also includes step S6: calibrating the structured light three-dimensional measurement system, solving for the internal and external parameters of the projector and camera, converting the absolute phase pixel by pixel into three-dimensional world coordinates, and reconstructing the three-dimensional point cloud of the object under test.

[0059] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0060] This invention requires only one additional grayscale pulse-coded image. By combining the grayscale and positional information of the grayscale pulse-coded image, the fringe order corresponding to the truncated phase can be determined, achieving fast, accurate, and robust phase unwrapping. Compared to traditional time-phase unwrapping methods that require projecting multiple additional coded patterns, this invention significantly reduces the number of required coded patterns, substantially improving the speed of 3D measurement and making it suitable for high-speed online measurement scenarios. Compared to traditional spatial grayscale coding methods, this invention introduces a two-dimensional coding strategy of phase order and grayscale order, utilizing operations such as connected component merging and mask extraction to effectively resist differences in surface reflectivity and ambient lighting interference, exhibiting stronger robustness and higher coding capacity. Attached Figure Description

[0061] Figure 1 The phase-shifted fringe image, truncated phase image, and grayscale pulse-coded image provided in the embodiments of the present invention; wherein, Figure 1 (a) of Figure 1 (b) of Figure 1 (c) is the phase-shifted fringe image. Figure 1 Part (d) is a truncated phase image. Figure 1 Part (e) is a grayscale pulse-coded image.

[0062] Figure 2 Cross-sectional curves of truncated phase images and grayscale pulse-coded images provided in embodiments of the present invention.

[0063] Figure 3 The embodiments of the present invention provide a grayscale pulse mask union, a grayscale level image, a phase level image, a stripe level image, and an absolute phase image; wherein, Figure 3 Part (a) is the union of grayscale pulse masks. Figure 3 Part (b) is a grayscale image. Figure 3 Part (c) is the phase order image. Figure 3 Part (d) is a stripe order image. Figure 3 Part (e) is the absolute phase image.

[0064] Figure 4 This is a flowchart of the single-frame grayscale pulse coding phase expansion method proposed in this invention. Detailed Implementation

[0065] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0066] In this embodiment, the purpose of the present invention is to provide a single-frame grayscale pulse-coded phase unwrapping method. This method requires only one additional grayscale pulse-coded image. By combining the grayscale information and position information of the grayscale pulse-coded image, the stripe order corresponding to the truncated phase can be determined, achieving fast, accurate, and robust phase unwrapping. Figures 1 to 3 As shown, the method specifically includes the following steps.

[0067] I. System Setup

[0068] Step S1: Build a structured light 3D measurement system.

[0069] In this embodiment, the core hardware of the system includes a projector and a camera. It should be noted that, in terms of control logic, the camera and projector are synchronously triggered via external hardware circuitry to effectively suppress motion blur and avoid data misalignment. In terms of spatial layout, the object under test is placed within the common field of view of the projector and camera, and the three together form a stable triangulation structure.

[0070] II. Pattern Projection and Image Acquisition

[0071] Step S2: Trigger the projector to project the grayscale pulse-coded pattern and the phase-shifted fringe pattern onto the object under test, and simultaneously trigger the camera to acquire the grayscale pulse-coded image and the phase-shifted fringe image that have been distorted after being modulated by the object under test.

[0072] In this embodiment, the phase-shifted fringe image captured by the camera This can be represented by formulas (1) to (3);

[0073] (1)

[0074] (2)

[0075] (3)

[0076] In the formula, Represents the camera's pixel coordinates. Indicates background intensity. Indicates modulation intensity. This indicates a truncated phase.

[0077] Figure 1 Part (a) to Figure 1 Part (c) shows three phase-shifted fringe images captured using a camera.

[0078] It is worth mentioning that the grayscale pulse-coded images captured by the camera This can be expressed as formula (4);

[0079] (4)

[0080] In the formula This represents the floor function. Indicates the stripe order. Indicates the maximum number of gray levels that can be encoded. This indicates the maximum coded phase order. Indicates the encoded phase. This indicates the half-pulse width.

[0081] Furthermore, this encoded phase This can be expressed as formula (5);

[0082] (5)

[0083] In the formula This represents the modulo function, with the first input parameter being the dividend and the second input parameter being the divisor.

[0084] Figure 1 Part (e) shows the corresponding grayscale pulse-coded image. Figure 2 The cross-sectional curves of truncated phase images and grayscale pulse-coded images are shown, intuitively illustrating the encoding rules of grayscale levels and phase levels in grayscale pulse-coded images.

[0085] III. Phase Extraction and Image Correction

[0086] Step S3: Extract the acquired phase-shifted fringe image using a three-step phase-shifting algorithm. Background intensity Modulation intensity With truncated phase The calculation formula is as follows.

[0087] In this embodiment, the calculation formulas for extracting the above parameters using the three-step phase shift algorithm are shown in formulas (6) to (8).

[0088] (6)

[0089] (7)

[0090] (8)

[0091] In the formula, This represents the arctangent function in the four quadrants, and the calculated cutoff phase. The value range can be converted to .

[0092] Figure 1 Part (d) shows the truncated phase image extracted using the three-step phase shift algorithm.

[0093] Subsequently, the acquired grayscale pulse-coded image is corrected using background intensity and modulation intensity to obtain the corrected grayscale pulse-coded image, and then the grayscale level image is recovered.

[0094] Furthermore, the corrected grayscale pulse-coded image The calculation formula is shown in formula (9).

[0095] (9)

[0096] Furthermore, the encoded grayscale image The calculation formula is shown in formula (10), where, This represents the rounding function.

[0097] (10)

[0098] IV. Stripe Periodic Segmentation and Encoded Information Extraction

[0099] Step S4: Based on the truncated phase The range of values ​​is used to generate two mask images, and the connected components that intersect in the two mask images are merged to segment each stripe period; each gray-level pulse mask is extracted from the corrected gray-level pulse coded image, the average phase value corresponding to each gray-level pulse mask is calculated, and the gray level value and phase level value corresponding to each gray-level pulse mask are determined.

[0100] In this embodiment, based on the truncated phase The range of values ​​generates two mask images. The corresponding mathematical expressions are shown in Formula 11 and Formula 12.

[0101] (11)

[0102] (12)

[0103] For the two mask images respectively Perform connected component labeling and extract the two mask images one by one. All connected components are identified, and it is determined whether any of these components intersect. Intersecting components are then merged and marked as belonging to the same fringe period, thus sequentially segmenting each fringe period. .

[0104] In this embodiment, a single grayscale pulse mask The mathematical expressions for are shown in formulas (13) and (14), where This represents all grayscale pulse masks.

[0105] (13)

[0106] (14)

[0107] Furthermore, grayscale pulse mask Corresponding average phase value The calculation formula is shown in formula (15).

[0108] (15)

[0109] In the formula, This represents the summation operator. The above formula can be used to perform summation on grayscale pulse masks. Cut-off phase within the region Calculate the average value and the corresponding average phase value. .

[0110] Furthermore, grayscale pulse mask Corresponding gray level values With phase level order The calculation formulas are shown in formulas (16) and (17).

[0111] (16)

[0112] (17)

[0113] In the formula, This represents the rounding function. This represents the floor function. Further, the corresponding phase order image... It can be expressed as formula (18).

[0114] (18)

[0115] Figure 3 Part (a) to Figure 3 Part (c) shows all the grayscale pulse masks, grayscale level images, and phase level images.

[0116] V. Determination of Fringe Order and Absolute Phase Recovery

[0117] Step S5: Combine the gray level values ​​corresponding to each gray-level pulse mask. and phase order value The corresponding fringe order value is calculated, which is the fringe order value of each fringe period. The fringe order values ​​of each fringe period are fused to obtain a fringe order image. Then, the fringe order image is used to perform phase unrolling on the truncated phase, so as to recover the absolute phase of the object under test.

[0118] In this embodiment, grayscale pulse mask Corresponding stripe level value The calculation formula is shown in formula (19).

[0119] (19)

[0120] Truncation phase Corresponding stripe order image It can be expressed as formula (20).

[0121] (20)

[0122] Absolute phase of the object under test It can be expressed as formula (21).

[0123] (twenty one)

[0124] Figure 3 Part (d) shows the obtained stripe order image. Figure 3 Part (e) shows the recovered absolute phase image of the object under test.

[0125] VI. Three-dimensional reconstruction

[0126] Step S6: Calibrate the structured light 3D measurement system, solve for the internal and external parameters of the projector and camera, convert the absolute phase of the object under test into 3D world coordinates pixel by pixel, and reconstruct the 3D point cloud of the object under test, thereby achieving fast and accurate 3D measurement.

[0127] In summary, the single-frame grayscale pulse-coded phase unwrapping method provided by this invention, through the organic combination of the above steps S1 to S6, can achieve fast, accurate, and robust phase unwrapping with only one additional grayscale pulse-coded image, effectively balancing the accuracy and speed of three-dimensional measurement.

[0128] 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 variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included 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 single-frame grayscale pulse coding phase unwrapping method, characterized in that, Includes the following steps: Step S1: Build a structured light 3D measurement system, which includes a projector and a camera; Step S2: Trigger the projector to project grayscale pulse-coded patterns and phase-shifted fringe patterns onto the object under test, and simultaneously trigger the camera to acquire grayscale pulse-coded images and phase-shifted fringe images that are distorted after being modulated by the object under test; Step S3: Use the three-step phase-shift algorithm to extract the background intensity, modulation intensity and truncation phase of the phase-shifted stripe image, use the background intensity and modulation intensity to correct the grayscale pulse-coded image, obtain the corrected grayscale pulse-coded image, and recover the grayscale level image based on the corrected grayscale pulse-coded image. Step S4: Generate two mask images according to the range of the truncated phase, merge the connected components that intersect in the two mask images, and segment out each stripe period; Extract each grayscale pulse mask from the corrected grayscale pulse coded image, calculate the average phase value corresponding to each grayscale pulse mask, and determine the grayscale level value and phase level value corresponding to each grayscale pulse mask. Step S5: Calculate the corresponding stripe level value based on the gray level value and phase level value corresponding to each gray pulse mask, fuse the stripe level values ​​of each stripe period to obtain a stripe level image, and use the stripe level image to perform phase unrolling on the truncated phase to recover the absolute phase of the object under test. In step S2, the camera captures a phase-shifted stripe image. Represented as: ; ; ; In the formula, Represents the camera's pixel coordinates. Indicates background intensity. Indicates modulation intensity. Indicates phase cutoff; In step S2, the camera captures a grayscale pulse-coded image. Represented as: ; In the formula, This represents the floor function. Indicates the stripe order. Indicates the maximum number of gray levels that can be encoded. This indicates the maximum coded phase order. Indicates the encoded phase. Indicates the half-pulse width; The encoding phase Represented as: ; In the formula, This represents the modulo function, with the first input parameter being the dividend and the second input parameter being the divisor; In step S3, the background intensity Modulation intensity With truncated phase The formula for calculation is: ; ; ; In the formula, This represents the arctangent function in the four quadrants, and the calculated cutoff phase. The value range can be converted to ; In step S3, the corrected grayscale pulse-coded image The formula for calculation is: ; The grayscale image The formula for calculation is: ; In the formula, This represents the rounding function. This indicates the maximum number of gray levels that can be encoded.

2. The single-frame grayscale pulse coding phase unwrapping method according to claim 1, characterized in that, In step S1, the camera and projector are synchronously triggered through an external hardware circuit; the object to be measured is placed within the common field of view of the projector and the camera, and the three together form a triangulation structure.

3. The single-frame grayscale pulse coding phase unwrapping method according to claim 1, characterized in that, In step S4, the two mask images Represented as: ; 。 4. The single-frame grayscale pulse coding phase unwrapping method according to claim 1, characterized in that, In step S4, a single grayscale pulse mask Represented as: ; ; In the formula, This represents all grayscale pulse masks. Indicates the stripe period. This represents an image with grayscale levels.

5. The single-frame grayscale pulse coding phase unwrapping method according to claim 1, characterized in that, In step S4, the grayscale pulse mask Corresponding average phase value The formula for calculation is: ; In the formula, This represents the summation operator; gray level sub-values The formula for calculation is: ; The phase order value The formula for calculation is: ; In the formula, This represents the rounding function. This represents the floor function, where N represents the maximum encodeable phase order; the corresponding phase order image. Represented as: 。 6. The single-frame grayscale pulse coding phase unwrapping method according to claim 5, characterized in that, In step S5, the stripe level value The formula for calculation is: ; The stripe level image Represented as: ; The absolute phase Represented as: ; In the formula, This indicates the maximum coded phase order. This indicates the stripe period.

7. The single-frame grayscale pulse coding phase unwrapping method according to any one of claims 1-6, characterized in that, It also includes step S6: calibrating the structured light 3D measurement system, solving for the internal and external parameters of the projector and the camera, converting the absolute phase pixel by pixel into 3D world coordinates, and reconstructing the 3D point cloud of the object under test.

Citation Information

Patent Citations

  • Manufacturing a fiber bragg grating and a mask used in the fabrication of a fiber bragg grating

    CA2422460A1

  • Structured light three-dimensional measurement method for encoding fringe level based on phase shift amount

    CN109974626A