A three-dimensional measurement method based on nonlinear cosine coding

By adopting a three-dimensional measurement method based on nonlinear cosine coding, the problems of slow measurement speed and insufficient accuracy of optical three-dimensional measurement technology in complex scenes are solved. By using nonlinear cosine coding and phase expansion technology of De Bruijn element mapping table, efficient and accurate three-dimensional reconstruction is achieved.

CN120868972BActive Publication Date: 2025-12-09HUNAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511388550.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-12-09
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

Existing optical 3D measurement technologies suffer from slow measurement speed, accumulation of temporal errors, and low computational efficiency in complex scenarios. In particular, structured light measurement methods are not accurate enough in scenarios with drastic depth changes or the presence of independent objects, making it difficult to meet the requirements for real-time performance and high precision.

Method used

A three-dimensional measurement method based on nonlinear cosine coding is adopted. By generating N-step phase shift coding and nonlinear cosine component coding, combined with the De Bruijn element mapping table, phase shift fringes and nonlinear cosine coding fringes are projected frame by frame to perform phase unrolling. The phase order is retrieved by minimizing the cosine component error in the local phase region, thus achieving high-precision three-dimensional reconstruction.

Benefits of technology

It improves measurement accuracy and efficiency, reduces computational load, lowers costs, and achieves efficient and reliable phase unfolding, making it suitable for 3D measurement in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120868972B_ABST
    Figure CN120868972B_ABST
Patent Text Reader

Abstract

The application discloses a three-dimensional measurement method based on nonlinear cosine coding, and comprises the following steps: step one, generating N-step phase shift coding, constructing a wavelength-De Bruijn element mapping table, generating nonlinear cosine coding and nonlinear cosine component coding; step two, projecting phase shift stripes and nonlinear cosine coding stripes to a measured object frame by frame, acquiring a modulation pattern and decoding to obtain wrapped phase and nonlinear cosine components; step three, constructing an approximate phase, performing phase unwrapping on the wrapped phase to obtain a local continuous phase, and dividing the local continuous phase into local phases; step four, minimizing cosine component errors of the local phase regions to retrieve phase orders, thereby realizing phase unwrapping and obtaining error absolute phase; and step five, performing phase repair on the error absolute phase to obtain error-free absolute phase, and combining with structural light system parameters to reconstruct a three-dimensional model of an object. The application can realize high-precision phase unwrapping by using only a single frame pattern, and greatly improves the three-dimensional measurement efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a three-dimensional measurement method based on nonlinear cosine coding. BACKGROUND

[0002] With the rapid development of image processing, optics and computer technology, the optical image processing technology based on photoelectric imaging theory has made significant progress. This technology has been widely studied and applied in the past few decades and has driven several breakthroughs in computer vision technology. Optical image processing, with its unique advantages in information processing and visual perception, has become an important support for the continuous evolution of computer vision. As people's demand for image information richness, fineness and diversity continues to increase, the research of computer vision has gradually developed from traditional two-dimensional image processing to complex three-dimensional spatial data acquisition and analysis. This change not only requires technology to be more intelligent and efficient, but also requires computer vision to accurately and quickly process three-dimensional stereo image data and provide more comprehensive spatial perception. This has become one of the research focuses of current computer vision and intelligent perception technology.

[0003] Optical three-dimensional measurement technology, with its high precision, low cost and non-contact characteristics, has shown broad application prospects in many fields such as industry, medicine and engineering. In particular, in the scenes of robot navigation, industrial modeling and microscopic measurement, optical three-dimensional measurement technology is widely adopted due to its high precision and stability. At present, structured light measurement method is one of the mainstream methods of optical three-dimensional measurement. This method uses a projector to project a grating fringe pattern with phase information, and cooperates with a camera to perform synchronous shooting and phase decoding, thereby obtaining the three-dimensional shape information of the object surface. This technology can stably obtain depth information under various lighting conditions, so it is valued. However, the phase information has periodicity and circulates within the range of 0-2π, which is easy to cause phase ambiguity, so it is necessary to obtain continuous absolute phase through phase unwrapping technology to recover the complete three-dimensional information of the object.

[0004] ​With the development of years, phase unwrapping technology has made significant progress, mainly divided into spatial phase unwrapping method and time phase unwrapping method. The spatial phase unwrapping method is usually based on the phase relationship between pixels to unwrap, which is suitable for reconstructing the phase on the surface with good continuity. However, in the scene where the depth changes dramatically or there are independent objects, spatial phase unwrapping is prone to errors, affecting the accuracy. In contrast, the time phase unwrapping method uniquely identifies each phase order through multi-frame image acquisition, effectively solving the limitations of spatial unwrapping in discontinuous areas, and thus performs better in complex scenes. However, the time phase unwrapping method also faces problems such as slow measurement speed and time domain error accumulation, affecting the measurement efficiency and accuracy. Although Chinese patent application file CN119251276A, a non-equal period phase shift three-dimensional measurement method, discloses using multiple single-frequency stripes of different frequencies to form a combined code in De Bruijn order, which improves the coding efficiency and reduces the cost. However, this scheme uses sinusoidal stripes of different wavelengths to form a combined code, resulting in uneven measurement accuracy, which still affects the final measurement results. And this scheme is calculated by local phase point by point, and frequency domain transform is used in the calculation, which has a large amount of calculation, thus also leading to low calculation efficiency, which is difficult to meet the demand of fast measurement. Therefore, developing an efficient and reliable phase unwrapping method without additional data patterns to meet the higher application requirements for real-time, accuracy and stability has become an important research direction in the field of optical three-dimensional measurement. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a three-dimensional measurement method based on nonlinear cosine coding.

[0006] The technical solution of the application is as follows:

[0007] A three-dimensional measurement method based on nonlinear cosine coding, comprising the following steps:

[0008] Step 1: generate N-step phase shift coding, then build a wavelength-De Bruijn element mapping table to generate nonlinear cosine coding and nonlinear cosine component coding;

[0009] The nonlinear cosine component coding is generated from the nonlinear cosine coding, and the nonlinear cosine component coding is used for subsequent phase unwrapping steps.

[0010] Step 2: project the phase shift stripe and the nonlinear cosine coding stripe to the measured object frame by frame, obtain the modulated pattern by the camera and decode to get the wrapped phase and the nonlinear cosine component;

[0011] Step 3: Constructing approximate phase, unwrapping phase, phase-unfolding, and segmenting local phase from the local continuous phase. The local continuous phase is truncated in the global range, and the local phase is continuous in the global range.

[0012] Step 4: Minimizing the cosine component error of the local phase region to retrieve the phase order, thereby realizing phase-unfolding, and obtaining the error absolute phase.

[0013] Step 5: Phase-repairing the error absolute phase to obtain the error-free absolute phase, and reconstructing the object three-dimensional model combined with the structured light system parameters.

[0014] The nonlinear cosine coding in Step 1 is obtained by the following steps:

[0015] Step 1.1: Generating N-step phase shift coding.

[0016] Step 1.2: Selecting m wavelengths and De Bruijn elements to construct a wavelength-De Bruijn element mapping table.

[0017] Step 1.3: Generating m-element n-order De Bruijn wavelength sequence, and generating nonlinear cosine coding and nonlinear cosine component coding. m is an integer greater than 0.

[0018] The N-step phase shift coding in Step 1.1 is:

[0019]

[0020] and represent the horizontal and vertical coordinates of the projector plane, respectively, , . and represent the horizontal and vertical pixel resolutions of the projector plane, respectively; is the N-step phase shift coding, is the wavelength of the sinusoidal fringe, represents the total number of phase shift patterns, ; represents the coding background intensity; it can be understood as the average gray scale of the background, , represents the coding modulation intensity, ; and The preferred values of and are both 127.5.

[0021] The wavelength-De Bruijn element mapping table in Step 1.2 is Table 1 below:

[0022] ​Table 1. Wavelength-De Bruijn element mapping table.

[0023] .

[0024] The De Bruijn wavelength sequence in step 1.3 is:

[0025] The De Bruijn sequence is a pseudo-random sequence of length composed of m De Bruijn elements, so the number of wavelengths in is Since it is pseudo-random, it is represented by an unknown number.

[0026] wherein is the De Bruijn wavelength sequence; then, the non-linear cosine encoding is generated, and the generation formula is:

[0027] ;

[0028] wherein:

[0029] In this formula, all cases are involved because the index of the pixel coordinate must be positive and cannot exceed the maximum pixel.

[0030] wherein is the non-linear cosine encoding; then, the non-linear cosine component encoding is generated:

[0031] .

[0032] The wrapped phase and non-linear cosine component in step 2 are obtained as follows:

[0033] Step 2.1, the N-step phase shift encoding pattern is projected by the projector to the scene to be measured, and the deformed phase shift fringe pattern is obtained by synchronous shooting by the industrial camera, and the fringe average intensity, intensity modulation, and wrapped phase are further calculated;

[0034] Step 2.2, the non-linear fringe pattern is projected by the projector to the scene to be measured, and the non-linear cosine deformed fringe pattern is obtained by synchronous shooting by the industrial camera, and the phase cosine component is calculated in combination with the average intensity and intensity modulation of the fringe;

[0035] The deformed phase shift fringe pattern in step 2.1 is:

[0036] ;

[0037] wherein and represent the horizontal and vertical coordinates of the camera plane, respectively, , ; and represent the lateral and longitudinal pixel resolution (i.e. the number of pixels) of the camera plane, respectively; represents the average intensity of the fringe pattern, represents the intensity modulation of the fringe pattern, represents the wrapped phase, ;

[0038] The fringe average intensity, intensity modulation and wrapped phase of the deformed phase-shifting fringe pattern are calculated using the phase-shifting method 、 and with the following formulas:

[0039] ; I is the pattern captured by the camera, so A, B, etc. are unknowns, and this equation is used to solve for these unknowns;

[0040] where represents the average intensity of the fringe pattern, represents the intensity modulation, represents the wrapped phase.

[0041] The non-linear cosine deformed fringe pattern in step 2.2 is:

[0042] ;

[0043] where represents the non-linear cosine deformed fringe pattern, represents the non-linear wrapped phase. Next, the non-linear cosine component is calculated:

[0044] ;

[0045] where represents the non-linear cosine component. is the non-linear cosine component of the camera pixel (x, y), is the non-linear cosine component of the projector pixel v. They are completely different.

[0046] The local phase in step 3 is obtained as follows:

[0047] Step 3.1, the wrapped phase gradients along and directions are calculated respectively, and are corrected to absolute phase gradients.

[0048] Step 3.2, the approximate phase gradients are predicted by the absolute phase gradients along and directions respectively, and the approximate phase is calculated.

[0049] Step 3.3: Use the approximate phase to perform phase expansion on the wrapped phase to obtain a local continuous phase, and then perform phase segmentation on the local continuous phase to obtain a local phase;

[0050] In step 3.1 and The formulas for calculating the phase gradient of the wrapping direction are as follows:

[0051] ;

[0052] ;

[0053] in, and They are and The direction of the wrapping phase gradient, and These are the horizontal and vertical Prewitt kernels, respectively. p and q These represent the x and y coordinates in the computation kernel, respectively. It's the core size. It is the pixel product operator;

[0054] Next, respectively and Corrected to absolute phase gradient, the calculation formulas are as follows:

[0055] ;

[0056] ;

[0057] in, and They are and Absolute phase gradient in direction;

[0058] In step 3.2 and The formulas for calculating the approximate phase gradient in the direction are as follows:

[0059] ;

[0060] ;

[0061] in, , denotes the adaptive binarization operator (see reference: Huang, Deng-Yuan, and Chia-Hung Wang. "Optimal multi-level thresholding using a two-stage Otsu optimization approach." Pattern Recognition Letters 30.3 (2009): 275-284.). The operator is an indicator function that takes the value 1 if the condition is true and 0 otherwise. approximate phase gradient in the direction; then, the approximate phase is calculated as

[0062]

[0063] where is the approximate phase;

[0064] The local continuous phase in step 3.3 is calculated as

[0065]

[0066] where denotes the rounding operator, denotes the local continuous phase, which contains multiple local phases with continuous characteristics; for this purpose, the local continuous phase is further divided into multiple local phases with continuous characteristics, which is calculated as

[0067]

[0068] where denotes the local phase group, denotes the flood fill segmentation operator, denotes the obtained th local phase; denotes the statistical pixel number operator, denotes the local phase whose pixel number is greater than , and denotes the number of obtained local phases.

[0069] The error absolute phase in step 4 is obtained as follows:

[0070] ​​​​​​​Step 4.1: The mapping from local continuous phase to non-linear cosine component code is achieved by constructing the mapping from local continuous phase to longitudinal coordinate of projector plane, and the mapping from longitudinal coordinate of projector plane to non-linear cosine component code.

[0071] Step 4.2: The phase unwrapping is achieved by retrieving phase order from minimizing cosine component error of local phase region, and the error absolute phase is obtained.

[0072] The formula of mapping from image plane to longitudinal coordinate of projector plane in step 4.1 is:

[0073]

[0074] wherein, represents the i-th pixel point in the region. represents the local continuous phase value at the position, represents the longitudinal coordinate of projector plane corresponding to the position. Then, the mapping from longitudinal coordinate of projector plane to non-linear cosine component code is performed, and the calculation formula is:

[0075]

[0076]

[0077] wherein, represents the corresponding non-linear cosine component code value. Thus, step 4.1 establishes the mapping relationship of , and achieves the mapping from local phase to non-linear cosine component code.

[0078] The calculation formula of phase order in step 4.2 is:

[0079]

[0080] wherein, represents the non-linear cosine component value at the pixel coordinate position. is an absolute value operator, represents the local phase order. Then, the obtained all are fused to obtain the local continuous phase order, and the calculation formula is:

[0081]

[0082] wherein, is a union operator, is the local continuous phase order. Then, ​​​​​​Combination Phase expansion is achieved using the following formula:

[0083] ;

[0084] in, This indicates the absolute phase of the error.

[0085] Furthermore, in the aforementioned three-dimensional measurement method based on nonlinear cosine coding, the three-dimensional model of the object in step 5 is obtained as follows:

[0086] because It contains noise and a small amount of phase error, therefore... The formula for phase repair is as follows:

[0087] ;

[0088] in This is the median filtering operator. For filtering kernel, This is the accurate absolute phase. Finally, Object models can be reconstructed by combining structured light system parameters (see: Li, Beiwen, et al. "High-accuracy, high-speed 3D structured light imaging techniques and potential applications to intelligent robotics." International journal of intelligentrobotics and applications 1.1 (2017): 86-103.).

[0089] Beneficial effects:

[0090] 1. This invention proposes a three-dimensional measurement method based on nonlinear cosine encoding, which uses multiple sinusoidal fringes of different frequencies to be combined and encoded in De Bruijn order. This encoding, composed of pure sinusoidal fringes, is robust to complex object structures and different reflection regions. Because the amplitude and intensity distribution of the sine wave are not modified, high measurement accuracy is ensured.

[0091] 2. This invention achieves measurement accuracy similar to advanced multi-frequency heterodyne methods using only 1 / 6 of the additional projections, greatly improving coding efficiency;

[0092] 3. This invention does not require the introduction of additional equipment and only projects a single frame of additional stripes, ensuring low measurement cost and high measurement efficiency.

[0093] The method of the present application introduces an additional nonlinear cosine coding pattern, which uses multiple different wavelength sinusoidal fringes to code in DB sequence. In the decoding stage, the phase order is calculated by minimizing the cosine component error of the local phase region, realizing robust phase disambiguation. High-precision phase unwrapping can be realized using only a single frame of pattern, greatly improving the efficiency of three-dimensional measurement. BRIEF DESCRIPTION OF DRAWINGS

[0094] Figure 1 The measurement flowchart of the three-dimensional measurement method based on nonlinear cosine coding in embodiment 1 of the present application;

[0095] Figure 2 N-step phase shift coding pattern and nonlinear cosine coding pattern in embodiment 1 of the present application, wherein Figure 2 (a), Figure 2 (b) and Figure 2 (c) are phase shift coding patterns of I1, I2 and I3, respectively, Figure 2 (d) is a nonlinear cosine deformed fringe pattern;

[0096] Figure 3 Deformed phase shift fringe pattern and nonlinear cosine deformed fringe pattern obtained by shooting in embodiment 1 of the present application, wherein Figure 3 (a), Figure 3 (b) and Figure 3 (c) are deformed phase shift fringe patterns corresponding to Figure 2 (a), Figure 2 (b) and Figure 2 (c) are deformed phase shift fringe patterns, Figure 3 (d) is a nonlinear cosine deformed fringe pattern;

[0097] Figure 4 Average intensity pattern, intensity modulation pattern, wrapped phase pattern and nonlinear cosine component pattern in embodiment 1 of the present application, wherein Figure 4 (a) is an average intensity pattern, Figure 4 (b) is an intensity modulation pattern, Figure 4 (c) is a wrapped phase pattern, Figure 4 (d) is a nonlinear cosine component pattern;

[0098] Figure 5 In embodiment 1 of the present application, and direction wrapped phase gradient pattern, and and direction absolute phase gradient pattern, wherein Figure 5 (a) is a direction wrapped phase gradient pattern, Figure 5 (b) is a direction wrapped phase gradient pattern,Figure 5 (c) is a directional absolute phase gradient map, Figure 5 (d) is a directional absolute phase gradient map;

[0099] Figure 6 is the approximate phase map, the local continuous phase and the local phase map in the embodiment 1 of the present application, wherein Figure 6 (a) is the approximate phase map, Figure 6 (b) is the local continuous phase map, Figure 6 (c) and Figure 6 (d) are respectively and the local phase map;

[0100] Figure 7 is the phase order map in the embodiment 1 of the present application;

[0101] Figure 8 is the absolute phase map in the embodiment 1 of the present application.

[0102] Figure 9 is the object model in the embodiment 1 of the present application. DETAILED DESCRIPTION

[0103] The present application will be further described in detail below in combination with the drawings and specific embodiments. However, it should not be understood that the above-mentioned subject matter of the present application is limited to the following embodiments only, and any technology realized based on the content of the present application falls within the scope of the present application.

[0104] In order to better illustrate the method of the present application, the present embodiment takes a 4-element 3-order De Bruijn sequence as an example, and a three-step phase shift of is used as the encoding scheme to illustrate the three-dimensional measurement of a plaster figure.

[0105] As shown in Figure 1 , it is a flow chart of the present application, a three-dimensional measurement method based on nonlinear cosine encoding, comprising the following steps:

[0106] Step 1: generate N-step phase shift encoding, and then construct a wavelength-De Bruijn element mapping table to generate nonlinear cosine encoding and nonlinear cosine component encoding.

[0107] In order to ensure the measurement accuracy, a three-step phase shift method of is used for sine encoding, and the encoding formula is:

[0108] (1);

[0109] wherein, and represent the horizontal and vertical coordinates of the projector plane respectively. For three-step phase-shifting encoding, respectively as shown in Figure 2 (a)- Figure 2 (c), Then, the wavelength De Bruijn element mapping table is constructed to generate the nonlinear cosine encoding.

[0110] In order to ensure the uniformity of the calculated phase, 4 approximate wavelengths are selected for sine encoding, which include: 26, 29, 32 and 35. Then the wavelengths are assigned to 4 De Bruijn elements to construct the wavelength-De Bruijin element mapping table as shown in Table 2 below.

[0111] Table 2 De Bruijn element-wavelength mapping table.

[0112] .

[0113] Then a set of 4-element 3-order De Bruijn wavelength sequences is constructed, as shown in formula (2): (2);

[0114] wherein, represents a 4-element 3-order De Bruijn wavelength sequence. Then, using the wavelengths in , a nonlinear cosine fringe pattern is generated, and the calculation formula is:

[0115] (3);

[0116] wherein

[0117] (4);

[0118] represents the horizontal and vertical coordinates of the projector plane. is a nonlinear cosine encoding pattern, as shown in Figure 2 (d). According to the properties of De Bruijn pseudo-random sequences, , the nonlinear distribution in the adjacent wavelengths has uniqueness in the global encoding range.

[0119] Step 2: Project the phase-shifting fringe and the nonlinear cosine encoding fringe to the measured object frame by frame, obtain the modulation pattern by the camera and decode to obtain the wrapped phase and the nonlinear cosine component.

[0120] The phase-shifting fringe and the nonlinear cosine encoding pattern are projected by the projector to the scene to be measured, and the deformed fringe pattern is obtained by the industrial camera, and their resolution is 1920x1440 pixels, respectively as shown in Figure 3 (a)-Figure 3 As shown in (d). Further calculations using formula (5) yielded the fringe average intensity, intensity modulation, and wrapping phase, as shown in [the diagram]. Figure 4 (a)- Figure 4 As shown in (c);

[0121] (5);

[0122] in, Indicates the average intensity of the stripes. Indicates intensity modulation. This represents the wrapping phase. Next, the nonlinear cosine components are calculated using formula (6):

[0123] (6);

[0124] in, Representing nonlinear cosine components, such as Figure 4 As shown in (d).

[0125] Step 3: Construct an approximate phase and perform phase expansion on the wrapped phase to obtain a local continuous phase, and then divide it into local phases.

[0126] First, calculate using formulas (7)-(8). exist and The phase gradient of the direction:

[0127] (7);

[0128] (8);

[0129] in, and They are and The phase gradient of the direction is as follows: Figure 5 (a)- Figure 5 As shown in (b). and These are the horizontal and vertical Prewitt processing kernels, each 3x3 pixels in size. p and q These represent the x and y coordinates in the computation kernel, respectively. This is the pixel product operator. However, the edge-truncation property of the wrapped phase causes periodic jumps in the phase gradient. Therefore, equations (9)-(10) are used to further transform the wrapped phase gradient into a continuous absolute phase gradient:

[0130] (9);

[0131] (10);

[0132] in, and They are and The absolute phase gradient in the direction, respectively, are as follows: Figure 5 (c)- Figure 5 As shown in (d). Next, the approximate phase gradient of the scene under test is estimated using formulas (11)-(12):

[0133] (11);

[0134] (12);

[0135] in, , This represents the adaptive binarization operator (see: Huang, Deng-Yuan, and Chia-Hung Wang. "Optimal multi-level thresholding using a two-stage Otsu optimization approach." Pattern Recognition Letters 30.3(2009): 275-284.). Operator This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. and They are and The approximate phase gradient in the direction. Next, the approximate phase is calculated using formula (13):

[0136] (13);

[0137] in, For approximate phase, such as Figure 6 As shown in (a). Due to Phase with package Having similar phase gradients, therefore, using formula (14) for Perform preliminary phase expansion:

[0138] (14);

[0139] in, This represents the rounding operator. Representing a locally continuous phase, such as Figure 6As shown in (b), it contains multiple local phases with continuous characteristics. Since the truncation edges of the local continuous phases provide good segmentation conditions, formula (15) is further used to further divide... Divide into multiple local phases with continuous characteristics:

[0140] (15);

[0141] in, Indicates a local phase group. This represents the flood filling segmentation operator. Indicates the obtained first A local phase, such as Figure 6 (c)- Figure 6 As shown in (d). This represents the operator for counting the number of pixels. This indicates that the local phase with more than 10 pixels is retained.

[0142] Step 4: Minimize the cosine component error of the local phase region to retrieve the phase order, thereby realizing phase expansion and obtaining the error absolute phase;

[0143] First, the ordinate mapping from the local continuous phase to the projector plane is constructed using formula (16):

[0144] (16);

[0145] in, express The first in the region Each pixel. express Local continuous phase value of the position. express The corresponding ordinate of the projector plane. Next, using formulas (17)-(18), the mapping from the ordinate of the projector plane to the nonlinear cosine component encoding is constructed:

[0146] (17);

[0147] (18);

[0148] in, express The corresponding nonlinear cosine component encoding value. Therefore, formulas (16)-(18) establish... The mapping relationship realizes the mapping from local phase to nonlinear cosine component encoding. Then, using formula (19), the phase order is retrieved by minimizing the cosine component error in the local phase region:

[0149] (19) ;

[0150] wherein, represents nonlinear cosine component values of pixel coordinate positions. is an absolute value operator, represents a local phase order. Then, using formula (20) all obtained are fused to get a local continuous phase order:

[0151] (20) ;

[0152] wherein, is a union operator, is a local continuous phase order, as shown in Figure 7 Then, using formula (21) the is combined with to realize phase unwrapping:

[0153] (21) ;

[0154] wherein, represents an error absolute phase, wherein the noise and a small amount of error phase are contained.

[0155] Step 5: phase repair is performed on the error absolute phase to obtain an error-free absolute phase, and a three-dimensional model of an object is reconstructed in combination with a structured light system parameter;

[0156] In order to eliminate the error in , phase repair is performed on using formula (22):

[0157] (22) ;

[0158] wherein is a median filter operator, is a filter kernel, is an error-free absolute phase, as shown in Figure 8 Finally, the Reconstructing object model in combination with structured light system parameters (see document: Li, Beiwen, et al. "High-accuracy, high-speed 3D structured light imaging techniques and potential applications to intelligent robotics." International journal of intelligent robotics and applications 1.1 (2017): 86-103.), such as Figure 9 shown in Fig. 2.

[0159] It should be emphasized that the examples described herein are illustrative and not restrictive, and that the present application is not limited to the examples described in the specific embodiments, but any other embodiments derived from the technical solution of the present application by those skilled in the art without departing from the purpose and scope of the present application, whether modified or replaced, also belong to the protection scope of the present application.

Claims

1. A method for three-dimensional measurement based on nonlinear cosine coding, characterized by, The method comprises the following steps: Step 1: generating N-step phase shift encoding, then constructing a wavelength-De Bruijn element mapping table to generate nonlinear cosine encoding and nonlinear cosine component encoding; Step 2: projecting phase shift fringes and nonlinear cosine encoding fringes to a measured object frame by frame, obtaining a modulated pattern by a camera and decoding to obtain wrapped phase and nonlinear cosine component; Step 3: constructing an approximate phase, performing phase unwrapping on the wrapped phase to obtain a local continuous phase, and segmenting into local phases; Step 4: minimizing the cosine component error of the local phase region to retrieve the phase order, thereby realizing phase unwrapping to obtain an error absolute phase; Step 5: performing phase repair on the error absolute phase to obtain an error-free absolute phase, and reconstructing a three-dimensional model of the object in combination with the structural light system parameters.

2. The method of claim 1, wherein, The nonlinear cosine encoding in step 1 is obtained by the following steps: Step 1.1, generating N-step phase shift encoding; Step 1.2, selecting m wavelengths and De Bruijn elements to construct a wavelength-De Bruijn element mapping table; Step 1.3, generating a De Bruijn wavelength sequence of m elements and n orders, and generating nonlinear cosine encoding and nonlinear cosine component encoding.

3. The method of claim 2, wherein, The N-step phase shift encoding in step 1.1 is: ; and x and y represent the horizontal and vertical coordinates of the projector plane, respectively, , ; and x and y represent the horizontal and vertical pixel resolution of the projector plane, respectively; is the N-step phase-shifting encoding, is the wavelength of the sinusoidal fringe, represents the total number of phase-shifting patterns, ; represents the encoding background intensity, , represents the encoding modulation intensity, ; The wavelength-De Bruijn element mapping table in step 1.2 is to map m wavelengths f0-f m-1 to m De Bruijn elements μ0-μ m-1 in one-to-one correspondence with each other; The De Bruijn wavelength sequence in step 1.3 is: ; wherein, is a De Bruijn wavelength sequence; then, a non-linear cosine encoding is generated, with the generation formula being: ; Wherein: ; wherein is a non-linear cosine encoding; then, a non-linear cosine component encoding is generated: 。 4. The method of claim 3, wherein, The wrapped phase and nonlinear cosine component in step 2 are obtained by the following steps: Step 2.1, projecting the N-step phase shift encoding pattern into the scene to be measured by the projector, and synchronously shooting a deformed phase shift fringe pattern by the industrial camera, further calculating to obtain fringe average intensity, intensity modulation and wrapped phase; Step 2.2, projecting the nonlinear fringe pattern into the scene to be measured by the projector, and synchronously shooting a nonlinear cosine deformed fringe pattern by the industrial camera, and calculating the phase cosine component in combination with the average intensity and intensity modulation of the fringe; The deformed phase shift fringe pattern in step 2.1 is: ; wherein and denote the horizontal and vertical coordinates of the camera plane, respectively, , ; and denote the horizontal and vertical pixel resolution of the camera plane, respectively; denotes the average intensity of the fringe, denotes the intensity modulation of the fringe, denotes the wrapped phase, ; The average intensity, intensity modulation and wrapped phase of the deformed phase shifting fringe are calculated by using the phase shifting method , and , the calculation formula is: ; wherein, represents the average intensity of the fringes, represents the intensity modulation, represents the wrapping phase; The nonlinear cosine deformed fringe pattern in step 2.2 is: ; wherein, denotes a non-linear cosine deformation fringe pattern, denotes a non-linear wrapping phase; then, a non-linear cosine component is calculated: ; wherein denotes a non-linear cosine component.

5. The method of claim 4, wherein, The local phase in step 3 is obtained by the following steps: Step 3.1, the wrapped phase gradient along and directions are calculated respectively and corrected to absolute phase gradient; Step 3.2, by and the absolute phase gradient in the direction of the approximate phase gradient and the approximate phase is calculated. Step 3.3, using the approximate phase to perform phase unwrapping on the wrapped phase to obtain a local continuous phase, and then performing phase segmentation on the local continuous phase to obtain a local phase; In step 3.1 and The wrapped phase gradient calculation formula in the direction of ; ; wherein, and are respectively and are wrapped phase gradients in horizontal and vertical directions, and are respectively Prewitt operation kernels in horizontal and vertical directions, p and q denote respectively horizontal and vertical coordinates in the operation kernel, is the kernel size, is the pixel multiplication operator; Next, the absolute phase gradient is calculated by modifying the phase gradient and respectively, and the calculation formula is as follows: ; ; wherein, and are respectively and the absolute phase gradient in the direction of In step 3.2 and The approximate phase gradient calculation formula in the direction of is respectively: ; ; wherein, , denotes an adaptive binarization operator; operator is an indicator function that takes the value 1 if the condition is true and 0 otherwise; and are the approximated phase gradients in the directions and ; then, the approximated phase is computed as: ; wherein is the approximate phase; The local continuous phase calculation formula in step 3.3 is: ; wherein denotes a rounding operator, denotes a locally continuous phase, which comprises a plurality of local phases with continuous characteristics; for this purpose, the locally continuous phase is divided into a plurality of local phases with continuous characteristics, the calculation formula being: ; wherein, denotes a local phase group, denotes a flood fill segmentation operator, denotes the obtained first local phase; denotes a statistics pixel number operator, denotes the local phases for which the number of pixels is greater than a threshold, denotes the number of obtained local phases.

6. The method of claim 5, wherein the nonlinear cosine coding is based on a cosine coding with adaptive bit allocation. The error absolute phase in step 4 is obtained by the following steps: Step 4.1, realizing the mapping of the local continuous phase to the nonlinear cosine component encoding by constructing the mapping of the local continuous phase to the longitudinal coordinate of the projector plane and the mapping of the longitudinal coordinate of the projector plane to the nonlinear cosine component encoding; Step 4.2: minimizing the cosine component error of the local phase region to retrieve the phase order, thereby realizing phase unwrapping to obtain an error absolute phase; The image plane to the longitudinal coordinate of the projector plane mapping formula in step 4.1 is: ; in, express The first in the region 1 pixel; express Local continuous phase value of the position. express The corresponding vertical coordinate of the projector plane; next, the mapping from the vertical coordinate of the projector plane to the nonlinear cosine component encoding is performed, and the calculation formula is: ; ; wherein, represents the corresponding nonlinear cosine component encoding value; step 4.1 establishes the mapping relationship of , which realizes the mapping of local phase to nonlinear cosine component encoding. The phase order calculation formula in step 4.2 is: ; wherein, denotes a non-linear cosine component value of the pixel coordinate position; is an absolute value operator, denotes a local phase order; then, all obtained local continuous phase orders, the calculation formula is: ; wherein, is a union operator, is a local continuous phase order; then, combining phase unwrapping is implemented, and the calculation formula is: ; wherein, denotes the error absolute phase.

7. The method according to claim 6, wherein The error absolute phase in step 5 is obtained by the following steps: Because contains noise and a small amount of error phase, the phase is repaired to the calculation formula is: ; wherein is a median filter operator, is a filter kernel, is the final obtained absolute phase.

Citation Information

Patent Citations

  • Three-dimensional measurement method for non-equal period phase shift

    CN119251276A

  • PCNN model-based compression encoding and decoding methods of still image and systems thereof

    CN102411785A

  • Moving object three-dimensional measurement method based on color fringe projection

    CN112097685A