A Phase-Shift Coding Method and System Based on Polarization Dislocation Code Fusion

Through the phase shift encoding method of polarization misalignment code fusion, the accuracy and efficiency problems caused by traditional structured light encoding technology due to high reflectivity during surface measurement of high dynamic range objects are solved, and efficient and accurate three-dimensional reconstruction is achieved.

CN120043468BActive Publication Date: 2025-07-01EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510533245.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-26
Publication Date
2025-07-01
Estimated Expiration
2045-04-26

AI Technical Summary

Technical Problem

When measuring surfaces of high dynamic range objects, traditional structured light encoding technology causes overexposure and distortion of the striped pattern due to high reflectivity, affecting the measurement accuracy, and multiple projected patterns reduce the measurement efficiency.

Method used

The phase shift encoding method of polarization misalignment code fusion is adopted to fuse the phase shift stripe pattern with the misalignment Grey code stripe pattern through the polarization characteristics of the projector to generate the polarization misalignment fusion phase shift stripe pattern. Only four patterns are required to complete the reconstruction of three-dimensional point clouds.

Benefits of technology

It effectively suppresses underexposed or overexposure in the high-reflection area, improves measurement accuracy, and significantly improves the three-dimensional reconstruction efficiency, and can perform stable three-dimensional measurements under ambient light interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120043468B_ABST
    Figure CN120043468B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a phase shift coding method and system for polarization misalignment code fusion. The method includes: obtaining the calibration parameters of a camera and a projector, and fusing a phase shift fringe pattern and a misalignment Gray code fringe pattern together by using the polarization characteristics of the projector to obtain a polarization misalignment fusion phase shift fringe pattern; obtaining the deformed polarization misalignment fusion phase shift fringe pattern after the projector projects the polarization misalignment fusion phase shift fringe pattern onto the surface of an object to be measured, extracting the phase shift fringe and the misalignment Gray code fringe pattern therefrom, calculating the wrapped phase by using the extracted phase shift fringe pattern, and obtaining a binary Gray code pattern by performing threshold processing on the misalignment Gray code fringe pattern; unwrapping the wrapped phase by using the binary Gray code pattern, and performing three-dimensional reconstruction of the object to be measured according to the unwrapped phase and the calibration parameters of the camera and the projector. The method of the present disclosure suppresses the measurement errors caused by underexposure or overexposure phenomena, and improves the measurement accuracy and three-dimensional reconstruction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of fringe projection three-dimensional reconstruction, and particularly to a phase shift coding method and system that fuses polarization offset codes. Background Art

[0002] Structured light three-dimensional measurement technology is one of the core methods of optical three-dimensional imaging and is widely used in fields such as mechanical engineering, biometrics, machine vision, and intelligent manufacturing. As an important means of this technology, fringe projection profilometry (FPP) projects a periodic fringe pattern onto the surface of an object, and then the deformed pattern is captured by a camera, and then the three-dimensional information of the object surface is extracted. This method uses phase coding technology and converts the wrapped phase into a continuous distribution through a phase unwrapping algorithm, and combines calibration parameters and the principle of triangulation to achieve three-dimensional reconstruction.

[0003] Although the FPP method has made significant progress, the gray code assisted phase shift method (GCPS) has been widely used due to its non-contact nature and good environmental adaptability. However, there are still two main problems in actual measurement: First, external noise may cause mutations at the phase truncation, thus affecting the measurement accuracy; Second, due to problems such as uneven reflectivity of the object surface or defocusing of the projector, the boundaries of the gray code fringes may be blurred, resulting in order jump errors, which in turn affect the accuracy of phase unwrapping. For this reason, the complementary gray code (CGC) method adds a fifth pattern to avoid phase jump errors, but the additional projected pattern will reduce the efficiency.

[0004] In addition, traditional structured light coding technology relies on light intensity information. When measuring the surface of an object with a high dynamic range (HDR), due to the interference of strong light reflection, the fringe pattern is prone to overexposure in the high-reflection area, which will cause pattern distortion and affect the measurement accuracy. At the same time, traditional methods usually require multiple projected patterns, significantly reducing the measurement efficiency. Summary of the Invention

[0005] To solve the problems that traditional structured light coding technology relies on light intensity information, when measuring the surface of an object with a high dynamic range, due to the interference of strong light reflection, the fringe pattern is prone to overexposure in the high-reflection area, which in turn causes pattern distortion and affects the measurement accuracy, and multiple projected patterns will significantly reduce the measurement efficiency, etc. The present disclosure proposes a phase shift coding method that fuses polarization offset codes to solve the above problems.

[0006] According to one aspect of the present disclosure, there is provided a phase shift coding method that fuses polarization offset codes, including:

[0007] S10. Obtain the calibration parameters of the camera and the projector, wherein the calibration parameters are obtained by calibrating the camera and the projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image;

[0008] S20. According to the calibration parameters of the camera and the projector, utilize the polarization characteristics of the projector to fuse the phase-shifting fringe pattern and the staggered Gray code fringe pattern together to obtain a polarization-staggered fused phase-shifting fringe pattern;

[0009] S30. Obtain the deformed polarization-staggered fused phase-shifting fringe pattern after the projector projects the polarization-staggered fused phase-shifting fringe pattern onto the surface of the object to be measured. Extract the phase-shifting fringe and the staggered Gray code fringe pattern from the deformed polarization-staggered fused phase-shifting fringe pattern. Calculate the wrapped phase using the extracted phase-shifting fringe pattern, and obtain a binary Gray code pattern by performing threshold processing on the staggered Gray code fringe pattern;

[0010] S40. Unwrap the wrapped phase through the binary Gray code pattern, and perform three-dimensional reconstruction on the object to be measured according to the unwrapped phase and the calibration parameters of the camera and the projector.

[0011] Preferably, calculating the wrapped phase using the extracted phase-shifting fringe pattern includes: calculating the wrapped phase according to the vertically polarized state fringes included in the phase-shifting fringe pattern, expressed as:

[0012] ,

[0013] wherein, is the vertically polarized state fringe, , is the wrapped phase, x is the position coordinate in the horizontal direction in the image, y is the position coordinate in the vertical direction in the image.

[0014] Preferably, obtaining the binary Gray code pattern by performing threshold processing on the staggered Gray code fringe pattern includes: obtaining the binary Gray code pattern through calculating the degree of linear polarization of the staggered Gray code fringe pattern and performing threshold processing.

[0015] Preferably, calculating the degree of linear polarization of the staggered Gray code fringe pattern is expressed as:

[0016] ,

[0017] wherein, represents the camera sensitivity, is the surface reflectivity, t is the exposure time, and respectively represent the maximum light intensity and the minimum light intensity obtained by the polarizer at orthogonal azimuth angles, represents the maximum intensity of the projected light in the horizontal polarization direction, represents the minimum intensity of the projected light in the horizontal polarization direction.

[0018] Preferably, a binary Gray code pattern is obtained by performing threshold processing on a misaligned Gray code stripe pattern, including: selecting the average value of the vertically polarized state stripes included in the phase-shifted stripe pattern as the threshold to obtain a threshold image.

[0019] Preferably, obtaining a binary Gray code pattern by performing threshold processing on a misaligned Gray code stripe pattern further includes: obtaining four polarization misaligned Gray code degree-of-polarization images by performing degree-of-polarization processing on the misaligned Gray code stripe pattern, comparing each polarization misaligned Gray code degree-of-polarization image with the threshold image, and setting the binary Gray code pattern to 0 when the misaligned Gray code degree-of-polarization pattern is less than or equal to the threshold image, otherwise, setting the binary Gray code pattern to 1.

[0020] Preferably, phase unwrapping of the wrapped phase is performed by the binary Gray code pattern, including: dividing regions according to the value of the wrapped phase to adjust the phase period level, and using the phase period level to assist in phase unwrapping of the wrapped phase, expressed as:

[0021] ,

[0022] In the formula, is the phase period level, is the unwrapped phase, x is the position coordinate in the horizontal direction in the image, y is the position coordinate in the vertical direction in the image.

[0023] According to one aspect of the present disclosure, a phase-shift coding system with polarization misalignment code fusion is provided, including:

[0024] A calibration parameter acquisition module for a camera and a projector, which acquires calibration parameters of the camera and the projector, wherein the calibration parameters are obtained by respectively calibrating the camera and the projector according to the checkerboard corner points in the camera image and the center coordinates in the projector image;

[0025] A polarization misalignment fusion phase-shift stripe pattern acquisition module, which fuses the phase-shift stripe pattern and the misaligned Gray code stripe pattern together using the polarization characteristics of the projector according to the calibration parameters of the camera and the projector to obtain a polarization misalignment fusion phase-shift stripe pattern;

[0026] A wrapped phase and binary Gray code pattern calculation module, which acquires the deformed polarization misalignment fusion phase-shift stripe pattern after the projector projects the polarization misalignment fusion phase-shift stripe pattern onto the surface of the object to be measured, extracts the phase-shift stripe and the misaligned Gray code stripe pattern from the deformed polarization misalignment fusion phase-shift stripe pattern, calculates the wrapped phase using the extracted phase-shift stripe pattern, and obtains a binary Gray code pattern by performing threshold processing on the misaligned Gray code stripe pattern;

[0027] A three-dimensional reconstruction module that unwraps the wrapped phase using a binary gray code pattern and performs three-dimensional reconstruction of the object to be measured based on the unwrapped phase and the calibration parameters of the camera and the projector.

[0028] According to one aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: execute the above-mentioned phase shift encoding method with polarization misalignment code fusion.

[0029] According to one aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the above-mentioned phase shift encoding method with polarization misalignment code fusion is implemented.

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

[0031] 1) The present disclosure proposes an efficient phase shift encoding technology with polarization misalignment code fusion for three-dimensional measurement of high-dynamic-range objects. Aiming at the phase unwrapping error caused by high reflectivity in the measurement of HDR surface objects, it encodes through the polarization state of light, uses polarization gray code patterns with different degrees of linear polarization (DOLP), suppresses the measurement error caused by underexposure or overexposure phenomena, and improves the measurement accuracy.

[0032] 2) The present disclosure proposes a phase shift encoding strategy with polarization misalignment code fusion. By fusing the encoding methods of vertical and horizontal polarized light, the phase shift pattern and the gray code pattern are cleverly overlapped through polarization characteristics, so that the three-dimensional point cloud reconstruction of the object can be completed by projecting only four patterns, significantly improving the three-dimensional reconstruction efficiency.

[0033] 3) The present disclosure proposes a simple and stable phase period level correction method, which defines regions for each period of the phase level , sets the phase value range of the boundary region by setting a threshold of π / 4, then divides the wrapped phase of each region into 3 sub-regions for correction respectively, and finally obtains the correct phase level order.

[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure.

[0035] According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear. Description of the Drawings

[0036] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0037] Figure 1 Shows a flowchart of a phase - shift coding method for polarization misalignment code fusion;

[0038] Figure 2 Shows a schematic diagram of the PFPS fringe pattern synthesis process in an example of the present disclosure;

[0039] Figure 3 Shows a schematic diagram of phase - period level correction in an example of the present disclosure;

[0040] Figure 4 Shows a diagram of the phase - unwrapping process in an example of the present disclosure;

[0041] Figure 5 Shows a comparison diagram of the phase - shifted pictures acquired by the camera in an example of the present disclosure;

[0042] Figure 6 Shows a comparison diagram of the unwrapped phases of columns 596 - 1728 in row 910 by three methods in an example of the present disclosure;

[0043] Figure 7 Shows a three - dimensional reconstruction diagram of three methods, namely CGC, PCPS, and PMPS, in measurement scenario 1 of an example of the present disclosure;

[0044] Figure 8 Shows a three - dimensional reconstruction diagram of three methods, namely CGC, PCPS, and PMPS, in measurement scenario 2 of an example of the present disclosure;

[0045] Figure 9 Shows an accuracy analysis diagram of a standard gauge block in an example of the present disclosure;

[0046] Figure 10 Shows an accuracy analysis diagram of a metal sphere in an example of the present disclosure;

[0047] Figure 11 Shows a block diagram of the structure of a phase - shift coding system for polarization misalignment code fusion in an embodiment of the present disclosure. Detailed implementation manners

[0048] Hereinafter, various exemplary embodiments, features, and aspects of the present disclosure will be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings do not have to be drawn to scale unless otherwise specified.

[0049] The special term "exemplary" herein means "serving as an example, embodiment, or illustration". Any embodiment described as "exemplary" herein does not have to be construed as superior to or better than other embodiments.

[0050] As used herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the term "at least one" as used herein means any one of multiple items or any combination of at least two of multiple items. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0051] In addition, for a better illustration of the present disclosure, numerous specific details are provided in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can still be implemented without certain specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail to highlight the gist of the present disclosure.

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0053] Embodiment 1

[0054] Based on the above idea, the present invention proposes a phase shift encoding method that fuses polarization offset codes. Figure 1 The flowchart of a phase shift encoding method that fuses polarization offset codes is shown. The method includes:

[0055] S10. Obtain the calibration parameters of the camera and the projector, where the calibration parameters are obtained by calibrating the camera and the projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image;

[0056] S20. According to the calibration parameters of the camera and the projector, use the polarization characteristics of the projector to fuse the phase shift fringe pattern and the offset Gray code fringe pattern together to obtain a polarization offset fused phase shift fringe pattern;

[0057] S30. Obtain the deformed polarization offset fused phase shift fringe pattern after the projector projects the polarization offset fused phase shift fringe pattern onto the surface of the object to be measured, extract the phase shift fringe and the offset Gray code fringe pattern from the deformed polarization offset fused phase shift fringe pattern, calculate the wrapped phase using the extracted phase shift fringe pattern, and obtain a binary Gray code pattern by performing threshold processing on the offset Gray code fringe pattern;

[0058] S40, performing phase unfolding on the wrapped phase by using a binary Gray code pattern, and performing three-dimensional reconstruction on the object to be measured according to the unfolded phase by using calibration parameters of a camera and a projector.

[0059] The present disclosure provides a phase shift coding method for integrating polarization misalignment codes, which specifically includes the following steps:

[0060] S10, obtaining calibration parameters of the camera and the projector, wherein the calibration parameters are obtained by calibrating the camera and the projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image.

[0061] In this embodiment, by synchronously extracting the coordinates of the checkerboard corner points in the camera image and the center coordinates in the projector image, the dual system calibration of the camera and the projector is completed respectively, and the intrinsic parameter matrix (focal length, principal point, distortion coefficient) and extrinsic parameter matrix (rotation matrix, translation vector) of the two are accurately obtained.

[0062] S20, according to the calibration parameters of the camera and the projector, using the polarization characteristics of the projector to fuse the phase-shifted fringe pattern with the offset Gray code fringe pattern to obtain a polarization-offset fused phase-shifted fringe pattern.

[0063] The traditional GCPS method is prone to jump errors in phase unwrapping, mainly due to the misalignment between the wrapped phase and the fringe order, which causes discontinuous jumps in the phase order at the truncation point. To address this problem, the MGC method shifts the Gray code pattern to the left by half a fringe period, so that the adjacent Gray code boundaries are staggered with the wrapped phase truncation point, ensuring a smooth transition of the wrapped phase, thereby effectively avoiding jump errors.

[0064] Unlike traditional Gray code, the MGC method eliminates the interference of level jumps through shift operations. However, due to the adjustment of the coding strategy, the periodic level obtained when directly using the traditional decoding method is not completely accurate and needs further correction before phase unwrapping. Compared with the CGC method, the additional projection pattern is required to generate two periodic levels. and To avoid level jump, the MGC method only requires a single cycle level k Therefore, there is no need to project an additional complementary Gray code.

[0065] With the inherent polarization characteristics of the 3LCD projector, purple light corresponds to 90-degree vertical linear polarization light, and green light corresponds to 0-degree horizontal linear polarization light. Based on this characteristic, the phase-shifted stripes and the offset Gray code stripes can be cleverly integrated into the same stripe pattern. After projection, the phase-shifted pattern and the offset Gray code pattern can be directly extracted from the acquisition results of the polarization camera without any additional processing, thereby realizing an efficient encoding and decoding process.

[0066] Specifically, the green stripe pattern with horizontal polarization state projected by the projector is defined as , and the purple stripe pattern with vertical polarization state is defined as . The mathematical representations of the two stripe patterns are:

[0067] ,

[0068] ,

[0069] wherein, represents the nth polarization-encoded stripe pattern projected, is the initial polarization intensity, is the modulated polarization intensity, is the contrast of the polarization-encoded stripe, is the wrapped phase.

[0070] In this embodiment, by performing appropriate region processing on two sets of polarization stripe patterns and then fusing them, a new set of polarization fusion stripe patterns (PFPS stripes) can be generated, as shown in Figure 2 . The polarization camera can simultaneously capture the two polarization state stripes contained in the PFPS stripe pattern: the horizontal polarization state stripe and the vertical polarization state stripe . The obtained contains a four-step phase-shift pattern with polarization information. The wrapped phase can be calculated through the phase-shift algorithm. The obtained contains four shifted Gray code patterns with polarization information. These Gray code patterns can be used to assist the phase-shift method to unwrap the phase, so as to obtain the continuous unwrapped phase .

[0071] S30. Obtain the deformed polarization misalignment fusion phase-shift stripe pattern after the projector projects the polarization misalignment fusion phase-shift stripe pattern onto the surface of the object to be measured. Extract the phase-shift stripe and the misaligned Gray code stripe pattern from the deformed polarization misalignment fusion phase-shift stripe pattern. Calculate the wrapped phase by using the extracted phase-shift stripe pattern, and obtain the binary Gray code pattern by performing threshold processing on the misaligned Gray code stripe pattern.

[0072] In this embodiment, the expression of the four-step phase-shift stripe pattern is:

[0073] ,

[0074] Calculating the wrapped phase by using the extracted phase-shift stripe pattern includes: calculating the wrapped phase according to the vertical polarization state stripe contained in the phase-shift stripe pattern, which is expressed as:

[0075] ,

[0076] In the formula, are vertically polarized fringes, , is the wrapping phase, x is the horizontal position coordinate in the image, y is the vertical position coordinate in the image.

[0077] Compared with the traditional method of encoding objects by light intensity, polarization light encoding relies on the degree of linear polarization (DOLP) of light, which is used to describe the degree of linear polarization at a specific azimuth. In this embodiment, a binary Gray code pattern is obtained by thresholding the staggered Gray code stripe pattern, including: calculating the linear polarization degree of the staggered Gray code stripe pattern and obtaining the binary Gray code pattern by thresholding. The polarization information in the stripe image is encoded by the DOLP algorithm. The mathematical expression of DOLP is:

[0078] ,

[0079] In the formula, and They represent the maximum and minimum light intensities obtained by the polarizer at orthogonal azimuths, and the DOLP value range is [0, 1]. In addition, in an ideal imaging system, the pixel grayscale value can be expressed as:

[0080] ,

[0081] In the formula, Indicates the camera sensitivity. is the surface reflectivity, t is the exposure time, is the projection light intensity, is the gray value of the corresponding pixel in the image coordinate system. It should be pointed out that the projection light For polarized light, represents the maximum intensity of the projected light in the horizontal polarization direction, Represents the minimum intensity of the projected light in the horizontal polarization direction. By combining the two equations, the linear polarization degree of the staggered Gray code stripe pattern is expressed as:

[0082] ,

[0083] This formula indicates that the generation of DOLP images is not affected by camera sensitivity, surface reflectivity, and exposure time, and its result depends on light intensity and polarization state. Since DOLP is based on relative intensity calculation, it can enhance polarization contrast and extract useful information in underexposed regions; in overexposed regions, it can reduce the loss of details caused by high-light saturation. Therefore, the DOLP algorithm is applicable to polarization imaging scenarios, can effectively solve the problem of high reflectivity when processing HDR objects, and exhibits good robustness and adaptability under complex lighting conditions.

[0084] In this embodiment, the camera obtains four polarization-shifted Gray-code linear polarization degree images through DOLP preprocessing. , Select the average value of the vertical polarization state stripes included in the phase-shifted fringe pattern as the threshold to obtain a threshold image, expressed as:

[0085] .

[0086] Furthermore, four polarization-shifted Gray-code linear polarization degree images are obtained by performing linear polarization degree processing on the shifted Gray-code fringe pattern. Each polarization-shifted Gray-code linear polarization degree image is compared with the threshold image. When the polarization-shifted Gray-code linear polarization degree image is less than or equal to the threshold image, the binary Gray-code pattern is set to 0; otherwise, the binary Gray-code pattern is set to 1, expressed as:

[0087] ,

[0088] In the formula, is the polarization-shifted Gray-code linear polarization degree image, .

[0089] S40. Phase-unwrap the wrapped phase through the binary Gray-code pattern. According to the unwrapped phase, perform three-dimensional reconstruction on the object to be measured using the calibration parameters of the camera and the projector.

[0090] In this embodiment, first, for each column of pixels in the four polarization-shifted Gray-code patterns after binary processing , the decimal number V generated is:

[0091] ,

[0092] Then the corresponding cycle order can be found and uniquely determined through the known corresponding relationship. According to the above decoding method, the decoded cycle order k can be obtained. To achieve effective phase unwrapping, the goal is to use the decoded order k to obtain the correct decoded order , as Figure 3As shown. Since each Gray code pattern is pre-shifted by half a fringe period, the jump of the phase order does not occur at the truncation of the wrapped phase, but at the middle position of each fringe period. To ensure the stability and fault tolerance of unwrapping, the cycle order k cannot be directly divided into left and right regions at the middle of each fringe period to obtain , otherwise it will cause actual measurement errors. For this reason, a simple and stable phase cycle order correction method is proposed. This method defines regions for each cycle of the phase order, and defines the phase value range of the boundary region by setting a threshold . Then, the wrapped phase of each region is divided into 3 sub-regions for correction respectively, and finally the correct phase order is obtained.

[0093] In actual processing, the truncated phase is mapped from (-π, π) to (0, 2π). First, the non-boundary regions are marked and corrected: when , it is marked as the L region, and this region itself has the correct phase cycle order and does not need to be corrected; when , it is marked as the R region, and the phase cycle order of this region needs to be reduced by 1 to obtain the correct phase cycle order. Then, the boundary regions are marked and corrected: when , it is marked as the M region. Since this region contains two phase cycle orders that differ by 1, the correct phase cycle order can be obtained by summing these two cycle orders, taking the average, and then rounding down. The division of the three regions is as follows:

[0094] ,

[0095] By correcting the cycle order k , the correct phase cycle order is obtained, which is expressed as:

[0096] ,

[0097] To accurately obtain the cycle order in , it is necessary to reduce the order of in the region by one level, keep the region unchanged, and take the smaller order for the region. It should be noted that since the Gray code patterns are all shifted to the left, the unwrapped phase of the last half fringe period will be incorrect. However, since this part of the region is usually not involved, it has no impact on the 3D reconstruction result. Nevertheless, the phase order of the last half fringe period of the last region can also be specially processed, that is,

[0098] 。

[0099] Finally, the phase period level is adjusted according to the value of the wrapped phase, and the phase period level is used to assist the wrapped phase for phase unwrapping. As Figure 4 shown, where PFC1, PFC2, PFC3, and PFC4 respectively represent the phase-shifted fringe patterns fused by four polarization misalignment codes, and the phase unwrapping is expressed as:

[0100] ,

[0101] In the formula, is the phase period level, is the unwrapped phase, x is the position coordinate in the horizontal direction of the image, y is the position coordinate in the vertical direction of the image.

[0102] In this embodiment, a structured light three-dimensional reconstruction system is constructed, which mainly consists of a 3LCD projector (CB-FH52), a polarized monochrome CMOS camera (FLIR BFS-U3-51S5P-C), an LED lamp, a high-precision lifting platform and a lifting bracket. Among them, the resolution of the 3LCD projector is 1920×1200 pixels, the resolution of the polarized camera is 2448×2048 pixels, the projector projects a PFPS fringe pattern with a period of 120 pixels, and the measurement system is located about 0.7 meters in front of the object to be measured.

[0103] To evaluate the performance of the polarization misalignment code fusion phase-shift coding (PFPS) method, this embodiment uses the complementary Gray code (CGC) method and the polarization coding combined with phase-shift (PCPS) method as control groups, and conducts a comparative experiment on a metal mold with a high-reflection surface.

[0104] The comparison diagram of the phase-shifted pictures obtained by the camera is as Figure 5 shown. The phase unwrapping performance of each method is analyzed: in the measurement of high-dynamic-range objects, the traditional gray phase-shifted fringes are prone to overexposure in the high-reflection area, as shown in Figure 5 (a) in. This pixel saturation phenomenon will cause obvious jumps in the unwrapped absolute phase, resulting in large errors and missing in point cloud reconstruction. In the PFPS method, the phase-shifted fringe pattern adopts a linearly polarized state, which can realize non-destructive shooting of the phase-shifted fringes and effectively reduce the interference in the highlight area, as shown in Figure 5 (b) in. To verify the performance of different methods in the high-reflection area, some data are selected for analysis. Data are extracted from the 910th row and the 596-1728th columns of the absolute phase diagram, and relevant charts are drawn. The unwrapped phases of the 596-1728th columns in the 910th row of the CGC, PCPS, and PMPS methods are respectively asFigure 6 in (a) of Figure 6 in (b) of Figure 6 and in (c) of, it can be seen that there are obvious errors in the absolute phase in the high - reflection region of the GCPS method, manifested as severe phase jumps. In contrast, there are no significant jumps in the unwrapped phases of the PFPS and PCPS methods, but the method proposed in this embodiment performs better in terms of the smoothness of the absolute phase.

[0105] To further verify the stability of the method in this embodiment for phase unwrapping in the high - light region, the extracted data is selected for quantitative analysis of the phase unwrapping results. Table 1 below uses the root - mean - square error (RMSE) as the evaluation criterion and shows the comparative evaluation results of the phase unwrapping performance of three methods: CGC (complementary Gray code), PCPS (polarization - encoding combined with phase - shift), and PFPS (polarization - misalignment code fused with phase - shift). The experimental data shows that the RMSE value of the unwrapped phase of the PFPS method in line 910 is 0.1253, significantly lower than that of the CGC and PCPS methods, intuitively reflecting the accuracy differences of each method in processing high - reflection regions, with higher point - cloud reconstruction efficiency and better reconstruction results, verifying its stability and anti - interference ability during the phase - unwrapping process, and further demonstrating the superiority of the PFPS method in measuring high - dynamic - range objects, especially its outstanding performance in suppressing phase jumps in the high - light region and improving reconstruction efficiency.

[0106] Table 1:

[0107]

[0108] An environmental light source is introduced into the measurement scene. By measuring two metal objects, the ability of the PFPS method to resist environmental - light interference and process metal objects with complex shapes is verified: In this embodiment, an LED lamp is introduced as the lighting device, and three different measurement methods are used to evaluate the influence of environmental light on the measurement of metal objects with complex shapes, so as to verify the performance of the proposed method under environmental - light interference and its ability to process objects with complex shapes. For this purpose, two measurement scenes are designed, using a decorative - flower metal mold and a spear - head metal mold respectively. Since the phase - shift fringe pattern in this embodiment is in a linearly polarized state, and after the environmental light passes through the polarizer filter, part of the non - polarized light can be removed. Therefore, under the same environmental - light interference conditions, the PFPS fringes captured by this method are less interfered, and the signal - to - noise ratio is significantly improved.

[0109] Figure 7 shows the measurement scene of the decorative - flower metal mold, Figure 8 shows the measurement scene of the spear - head metal mold, and the high - light region of environmental - light interference is marked by the red dashed box. Specifically, Figure 7 in (a) of Figure 7 in (b) of Figure 7(c) in it respectively shows the three-dimensional reconstruction results of the decorative flower metal mold obtained by the PFPS method, the PCPS method, and the CGC method. Figure 7 (d) in it, Figure 7 (e) in it, and Figure 7 (f) in it is the enlarged 3D point cloud map of the corresponding highlight area. Similarly, Figure 8 (a) in it, Figure 8 (b) in it, and Figure 8 (c) in it shows the three-dimensional reconstruction results of the spearhead metal mold obtained by the PFPS method, the PCPS method, and the CGC method. Figure 8 (d) in it, Figure 8 (e) in it, and Figure 8 (f) in it is the enlarged 3D point cloud map of the corresponding highlight area. It can be seen from the experimental results that Figure 7 (f) in it, and Figure 8 there are large missing parts in the locally enlarged three-dimensional point cloud in (f) in it, while Figure 7 (e) in it, and Figure 8 there are no obvious missing parts in the locally enlarged three-dimensional point cloud in (e) in it. In Figure 7 (d) in it, and Figure 8 (d) in it, the reconstruction result of the three-dimensional point cloud is more complete and significantly better than the other two methods, indicating that the polarization misalignment fusion coding strategy shows better robustness under ambient light interference. The experimental results verify the effectiveness of the PFPS method and prove that this method can reconstruct metal objects with complex shapes relatively completely under ambient light interference.

[0110] The accuracy of the PFPS method is evaluated by measuring a metal standard block and a metal sphere: To quantitatively evaluate the measurement accuracy of the PFPS method, a standard metal gauge block and a metal sphere are reconstructed. In the experiment of this embodiment, the measurement work is carried out under ideal conditions without ambient light interference. First, by fitting the reconstructed point cloud of the standard gauge block to a standard plane, the accuracy of the PFPS method is evaluated according to the calculated fitting error. As Figure 9 shown, among which, Figure 9 (a) in it is the standard gauge block, Figure 9 (b) in it is the reconstruction result diagram of the PFPS method, Figure 9 (c) in it is the error distribution diagram of the reconstruction result of the PFPS method; the root mean square error (RMSE) of the metal gauge block reconstructed by the PFPS method is 0.1574 mm. To further verify the performance of the proposed method in terms of measurement accuracy, the reconstructed point cloud of the metal sphere is fitted to the standard sphere, and the reconstruction results of the three methods are compared, and their fitting errors are calculated respectively to evaluate the accuracy of the PFPS method. Figure 10 shows the results of reconstruction and fitting, among which, Figure 10 (a) in it is the metal sphere,Figure 10 In (b), it is the reconstruction result of the PFPS method. Figure 10 In (c), it is the error distribution of the reconstruction result of the CGC method. Figure 10 In (d), it is the error distribution of the reconstruction result of the PCPS method. Figure 10 In (e), it is the error distribution of the reconstruction result of the PFPS method. Specifically, the root mean square error of the CGC method is 0.3315 mm, that of the PCPS method is 0.2038 mm, and that of the PFPS method is 0.1914 mm. The experimental results show that the PFPS method improves the accuracy by about 42.3% compared with the CGC method and by about 6.1% compared with the PCPS method. Thus, it can be seen that the PFPS method proposed in this embodiment can not only achieve better reconstruction accuracy but also have higher reconstruction efficiency when dealing with the measurement of metal objects, verifying the effectiveness and accuracy of this method.

[0111] The PFPS method proposed in the embodiments of the present disclosure can still stably perform three-dimensional measurement under the interference of ambient light, and shows better robustness and accuracy than traditional methods when dealing with high-reflection objects. Compared with traditional polarization coding methods, the present disclosure not only has an advantage in accuracy but also significantly improves the measurement efficiency, providing a more reliable and efficient technical means for the three-dimensional measurement of HDR objects.

[0112] Embodiment 2

[0113] As another aspect of the embodiments of the present disclosure, a phase-shift coding system 100 with polarization misalignment code fusion is further provided, as Figure 11 shown, including:

[0114] A calibration parameter acquisition module 1 for a camera and a projector, which acquires the calibration parameters of the camera and the projector. Among them, the calibration parameters are obtained by calibrating the camera and the projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image;

[0115] A polarization misalignment fusion phase-shift fringe pattern acquisition module 2, which fuses the phase-shift fringe pattern and the misalignment Gray code fringe pattern together by using the polarization characteristics of the projector according to the calibration parameters of the camera and the projector to obtain a polarization misalignment fusion phase-shift fringe pattern;

[0116] A wrapped phase and binary Gray code pattern calculation module 3, which acquires the deformed polarization misalignment fusion phase-shift fringe pattern after the projector projects the polarization misalignment fusion phase-shift fringe pattern onto the surface of the object to be measured, extracts the phase-shift fringe and the misalignment Gray code fringe pattern from the deformed polarization misalignment fusion phase-shift fringe pattern, calculates the wrapped phase by using the extracted phase-shift fringe pattern, and obtains the binary Gray code pattern by performing threshold processing on the misalignment Gray code fringe pattern;

[0117] The three-dimensional reconstruction module 4 performs phase unwrapping on the wrapped phase through a binary gray code pattern, and performs three-dimensional reconstruction on the object to be measured according to the unwrapped phase and the calibration parameters of the camera and the projector.

[0118] Without contradiction, the above modules in the system of the embodiments of the present disclosure can implement any of the above implementation manners of the method.

[0119] Based on the description of the above embodiments, the embodiments of the present disclosure can achieve the following technical effects:

[0120] 1) The present disclosure proposes an efficient polarization misalignment code fusion phase-shift coding technology for three-dimensional measurement of high-dynamic-range objects. Aiming at the phase unwrapping error caused by high reflectivity in the measurement of HDR surface objects, the polarization state of light is used for coding, and polarization gray code patterns with different degrees of linear polarization (DOLP) are used to suppress the measurement error caused by underexposure or overexposure phenomena, thereby improving the measurement accuracy.

[0121] 2) The present disclosure proposes a polarization misalignment code fusion phase-shift coding strategy. By fusing the coding methods of vertical and horizontal polarized light, the phase-shift pattern and the gray code pattern are cleverly overlapped through polarization characteristics, so that the three-dimensional point cloud reconstruction of the object can be completed by projecting only four patterns, significantly improving the three-dimensional reconstruction efficiency.

[0122] 3) The present disclosure proposes a simple and stable phase period level correction method, which defines regions for each period of the phase level , and defines the phase value range of the boundary region by setting a threshold of π / 4, and then divides the wrapped phase of each region into 3 sub-regions for correction respectively, and finally obtains the correct phase level order.

[0123] The embodiments of the present disclosure also propose an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to perform the above-mentioned phase-shift coding method of polarization misalignment code fusion. Among them, the electronic device can be provided as a terminal, a server or other forms of devices.

[0124] The embodiments of the present disclosure also propose a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned phase-shift coding method of polarization misalignment code fusion is implemented. The computer-readable storage medium can be a non-volatile computer-readable storage medium.

[0125] Those skilled in the art can understand that in the above-mentioned phase shift encoding method and system for polarization misalignment code fusion in the specific implementation manner, the writing order of each step does not mean a strict execution order and does not impose any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of an instruction, and the module, the segment of a program, or the part of an instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the block may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0127] The various embodiments of the present disclosure have been described above. The above description is exemplary and not exhaustive, and is also not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skilled persons in the technical field to understand the embodiments disclosed herein.

Claims

1. A phase shift coding method fused with polarization shift code, characterized in that: The steps include: S10, obtaining calibration parameters of the camera and the projector, wherein the calibration parameters are obtained by calibrating the camera and the projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image; S20, according to the calibration parameters of the camera and the projector, using the polarization characteristics of the projector to fuse the phase-shifted fringe pattern with the offset Gray code fringe pattern to obtain a polarization-offset fused phase-shifted fringe pattern; S30, obtaining a deformed polarization misaligned fused phase-shifted fringe pattern after a projector projects the polarization misaligned fused phase-shifted fringe pattern onto the surface of the object to be measured, extracting phase-shifted fringe patterns and misaligned Gray code fringe patterns from the deformed polarization misaligned fused phase-shifted fringe pattern, calculating a wrapped phase using the extracted phase-shifted fringe pattern, and obtaining a binary Gray code pattern by performing threshold processing on the misaligned Gray code fringe pattern; S40, performing phase unfolding on the wrapped phase by using a binary Gray code pattern, and performing three-dimensional reconstruction on the object to be measured according to the unfolded phase by using calibration parameters of a camera and a projector.

2. The method according to claim 1, characterized in that: Calculating the wrapped phase using the extracted phase-shifted fringe pattern includes: calculating the wrapped phase according to the vertical polarization state fringes contained in the phase-shifted fringe pattern, expressed as: , In the formula, are vertically polarized fringes, , is the wrapping phase, x is the horizontal position coordinate in the image, y is the vertical position coordinate in the image.

3. The method according to claim 1, characterized in that: The binary Gray code pattern is obtained by threshold processing the staggered Gray code stripe pattern, including: the binary Gray code pattern is obtained by calculating the linear polarization degree of the staggered Gray code stripe pattern and threshold processing.

4. The method according to claim 3, characterized in that The linear polarization degree of the staggered Gray code fringe pattern is calculated as: , In the formula, Indicates the camera sensitivity. is the surface reflectivity, t is the exposure time, and They represent the maximum and minimum light intensities obtained by the polarizer at orthogonal azimuths, represents the maximum intensity of the projected light in the horizontal polarization direction, Indicates the minimum intensity of projected light in the horizontal polarization direction.

5. The method according to claim 4, characterized in that The binary Gray code pattern is obtained by threshold processing the dislocated Gray code stripe pattern, including: selecting an average value of vertical polarization stripes contained in the phase-shifted stripe pattern as a threshold to obtain a threshold image.

6. The method according to claim 5, characterized in that The method obtains a binary Gray code pattern by performing threshold processing on the misaligned Gray code stripe pattern, and further includes: obtaining four polarization misaligned Gray code linear polarization images by performing linear polarization processing on the misaligned Gray code stripe pattern, comparing each polarization misaligned Gray code linear polarization image with a threshold image, and when the misaligned Gray code linear polarization pattern is less than or equal to the threshold image, the binary Gray code pattern is set to 0, otherwise, the binary Gray code pattern is set to 1.

7. The method according to claim 6, characterized in that Phase unwrapping of the wrapped phase by using a binary Gray code pattern includes: adjusting the phase cycle order according to the value of the wrapped phase, and using the phase cycle order to assist the wrapped phase in phase unwrapping, which is expressed as: , In the formula, is the phase cycle order, To unwrap the phase, x is the horizontal position coordinate in the image, y is the vertical position coordinate in the image.

8. A phase-shift coding system integrating polarization shift codes, characterized in that: include: A camera and projector calibration parameter acquisition module is used to acquire the camera and projector calibration parameters, wherein the calibration parameters are obtained by calibrating the camera and projector respectively according to the checkerboard corner points in the camera image and the center coordinates in the projector image; The polarization misalignment fusion phase-shifted fringe pattern acquisition module fuses the phase-shifted fringe pattern with the misaligned Gray code fringe pattern according to the calibration parameters of the camera and the projector and utilizes the polarization characteristics of the projector to obtain the polarization misalignment fusion phase-shifted fringe pattern; The wrapped phase and binary Gray code pattern calculation module obtains a deformed polarization misaligned fused phase-shifted fringe pattern after the projector projects the polarization misaligned fused phase-shifted fringe pattern onto the surface of the object to be measured, extracts phase-shifted fringe patterns and misaligned Gray code fringe patterns from the deformed polarization misaligned fused phase-shifted fringe pattern, calculates the wrapped phase using the extracted phase-shifted fringe pattern, and obtains a binary Gray code pattern by performing threshold processing on the misaligned Gray code fringe pattern; The 3D reconstruction module performs phase unwrapping on the wrapped phase through a binary Gray code pattern, and performs 3D reconstruction of the object to be measured based on the unwrapped phase using the calibration parameters of the camera and projector.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the phase-shift coding method for integrating polarization shift codes as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the phase-shift coding method for integrating polarization misalignment codes as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Multi-frequency phase unwrapping method based on staggered ternary Gray codes

    CN116592788A

  • Highly reflective surface three-dimensional reconstruction method and apparatus based on polarized structured light camera

    WO2024148994A1