A defocus structured light stripe binary encoding method
Patent Information
- Application Number
- CN202211283991.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-10-20
AI Technical Summary
[0006]鉴于此,本发明提供了一种离焦结构光条纹的二值编码方法,以解决以往基于相位优化的编码方法以及基于光强优化的编码方法均会受到离焦量影响,导致编码精度低的问题
[0033]应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明的公开。
Smart Images

Figure CN115471577B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of structured light three-dimensional measurement, and more particularly to a binary encoding method for defocused structured light fringes. Background Technology
[0002] 3D measurement technology based on structured light stripes requires projecting the stripes onto the surface of the object being measured using a projector. However, projectors typically suffer from gamma distortion and defocusing, which reduces the sinusoidal accuracy of the structured light stripes and directly affects the accuracy of 3D measurement.
[0003] Currently, binary information can be used for stripe encoding, and then an approximate sinusoidal structured light stripe can be generated by adjusting the defocus of the projector. Since only binary information of 0 and 1 is used, the encoding speed of binary stripes is faster than that of sinusoidal stripes. At the same time, compared with the 8-bit encoding method, binary encoded stripes are robust to the influence of projector gamma distortion.
[0004] Based on the encoding direction, current binary fringe coding methods are mainly divided into one-dimensional binary coding methods and two-dimensional binary coding methods. Since one-dimensional binary fringe coding only calculates in a single direction, the encoded fringes are easily affected by the period. As the fringe period increases, the accuracy of the sinusoidal fringes after defocusing decreases. Two-dimensional binary fringe coding methods use image halftone technology to process information in two directions. Because they process two-dimensional information, two-dimensional binary fringe coding can solve the problem of inaccurate measurement when the binary fringe period is large. Currently, two-dimensional binary fringe coding methods mainly include ordered dithering coding and error diffusion coding. However, as the period decreases, the accuracy of the defocused sinusoidal fringes in two-dimensional binary coding methods is affected. To address the impact of period on the accuracy of encoded fringees, current methods optimize the encoding based on phase or light intensity. Phase-based optimization methods can directly improve phase accuracy, but are easily affected by the amount of defocus; intensity-based optimization methods are robust to the amount of defocus, but cannot effectively improve phase accuracy, resulting in the encoding accuracy of both methods being affected by the amount of defocus.
[0005] Therefore, how to develop a new encoding method to solve the problem that the accuracy of previous encoding methods is affected by the amount of defocus? Summary of the Invention
[0006] In view of this, the present invention provides a binary encoding method for defocused structured light stripes to solve the problem that previous encoding methods based on phase optimization and encoding methods based on light intensity optimization are affected by the amount of defocus, resulting in low encoding accuracy.
[0007] The technical solution provided by this invention is specifically a binary encoding method for defocused structured light fringes, which includes the following steps:
[0008] S1: Bayesian binary fringes are generated using the Bayesian coding method, and a size of S is selected. x ×S y The semi-periodic fringe d1(i,j) is to be used, where the fringe width S is selected. x =T / 2, select the stripe height S y = n pixels;
[0009] S2: Detect an error pixel in the half-period stripe in step S1;
[0010] S3: Optimize the light intensity of the half-period stripes for the error pixels detected in step S2, and calculate the convergence function R for the light intensity optimization. I ;
[0011] Among them, R I =|(ΔI) k -ΔI k-1 ) / ΔI k-1 |,ΔI k-1 Let ΔI be the root mean square error of the phase corresponding to the (k-1)th light intensity optimization. k The root mean square error of the phase corresponding to the k-th light intensity optimization;
[0012] S4: If R I If the error is greater than 0.1%, then repeat steps S2 and S3 to detect the next error pixel in the half-period stripe, and optimize the light intensity of the half-period stripe for the detected error pixel until the light intensity optimization converges to the function R. I If the light intensity is ≤0.1%, stop the light intensity optimization and obtain the half-periodic stripe d1(i,j) after light intensity optimization;
[0013] S5: Based on the three-step phase shift principle, the half-periodic stripes after light intensity optimization are phase shifted by a grating;
[0014] S6: Based on the half-period fringes after light intensity optimization and the two half-period fringes after three-step phase shift, perform local optimization on a single pixel and calculate the convergence function LEC(I) for the local optimization. s ,I d );
[0015] Among them, LEC(I s ,I d )=|(Δe k -Δe k-1 ) / Δe k-1 |,Δe k Let Δe be the root mean square error of the phase after local optimization in the k-th round. k-1 The root mean square error of the phase after local optimization in the (k-1)th round;
[0016] S7: If LEC(I) s ,I d If the local optimization rate is greater than 0.1%, then repeat step S6 to perform local optimization on the next pixel until the local optimization convergence function LEC(I) is reached. s ,I d If the value is less than or equal to 0.1%, stop local optimization and obtain the locally optimized half-period stripes;
[0017] S8: Replace the height of the stripe with n+1, and repeat steps S2-S7 to obtain locally optimized half-cycle stripes of different lengths.
[0018] S9: Based on the symmetry and periodicity of the sinusoidal fringes, the locally optimized semi-periodic fringes of different lengths are spliced together to obtain a series of optimized binary coded fringes.
[0019] S10: Set a series of optimized binary coded stripes to the same size, calculate the root mean square error of the phase of the optimized binary coded stripes, and select the binary coded stripe corresponding to the smallest root mean square error as the final coded stripe.
[0020] Preferably, in step S2, detecting an error pixel in the half-period stripes of step S1 specifically involves:
[0021] S201: Set the Gaussian filter function window G = 5×5, and perform convolution operation between the half-period Bayesian encoded stripes in step S1 and the Gaussian filter function to generate approximate sine stripes.
[0022] S202: Using the formula ΔI=|I s (x,y)-I d (x,y), calculate the package phase difference ΔI, where I d (x,y) represents the light intensity of the half-period Bayesian encoded fringe in step S1, I s (x,y) represents the light intensity of the approximate sinusoidal fringes;
[0023] S203: Compare the phase difference ΔI of the package with the threshold τ of the light intensity difference. If ΔI ≥ τ, the corresponding pixel is an error pixel; otherwise, the corresponding pixel is not an error pixel.
[0024] Further preferably, the threshold τ = 0.1.
[0025] Further optimization, in step S3, the light intensity of the half-period stripes is optimized for the error pixels detected in step S2, specifically as follows:
[0026] The light intensity is optimized by changing the gray value of the detected error pixel from 0 to 1 or from 1 to 0.
[0027] Further optimization involves, in step S5, performing a grating phase shift on the half-periodic fringes after intensity optimization, based on the three-step phase shift principle. Specifically:
[0028] The light intensity-optimized semi-periodic stripes d1(i,j) are spliced together to form a global stripe D1(i,j). Based on the three-step phase shift principle, the spliced global stripe D1(i,j) is shifted by 2π / 3 and 4π / 3 respectively to obtain the corresponding phase-shifted stripes D2(i,j) and D3(i,j). Based on the two phase-shifted stripes D2(i,j) and D3(i,j), two semi-periodic stripes d2(i,j) and d3(i,j) of the same size are generated.
[0029] Further optimization, in step S6, local optimization of a single pixel is performed based on the half-period fringes after light intensity optimization and the two half-period fringes after three-step phase shift, specifically as follows:
[0030] Take one pixel in the optimized half-cycle stripe and the two pixels corresponding to the displacement after the phase shift in step S5 to form a pixel group. The pixel group corresponds to 8 binary combinations. According to the residual optimization function, calculate the residual optimization value corresponding to each binary combination of the pixel group. Take the binary combination with the smallest residual optimization value as the new pixel binary value of the pixel group.
[0031] The binary encoding method for defocused structured light fringes provided by this invention is a structured light fringe encoding method based on global and local optimization. This method uses an error objective function to represent the intensity error between sinusoidal fringes and defocused fringes. By iteratively reducing the value of the error objective function, global optimization is achieved, resulting in globally optimized fringes. In a standard sinusoidal image, the local structure of the fringes is crucial information for structured light, including angular frequency, center of symmetry, peak value, and curvature. Local optimization is performed based on global optimization. The local optimization process establishes an intensity residual optimization function by reducing the third harmonic component of the encoded fringes. Furthermore, to improve the optimization efficiency of the encoded fringes, this invention uses semi-periodic fringes as the local optimization object and, based on the periodicity and symmetry of the fringes, stitches together the optimal semi-periodic fringes to obtain the globally encoded fringes.
[0032] The binary encoding method for defocused structured light stripes provided by this invention has the advantages of being simple and easy to implement, and having high encoding accuracy.
[0033] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the disclosure of the present invention. Attached Figure Description
[0034] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a graph showing the root mean square error of the phase under different jitter threshold templates in Example 1.
[0037] Figure 2 A comparison of the coded stripes before and after global optimization;
[0038] Figure 3 This is a graph showing the relationship between the frequency and amplitude of the filter function.
[0039] Figure 4 This is a flowchart illustrating a binary encoding method for defocused structured light stripes provided in an embodiment of the present invention. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods consistent with some aspects of the invention as detailed in the appended claims.
[0041] To address the issue that previous coding methods based on phase optimization and light intensity optimization are affected by defocusing, resulting in low coding accuracy, this implementation scheme provides a binary coding method for defocused structured light fringes. This method is a structured light fringes coding method based on global and local optimization.
[0042] The following sections will further investigate the barcode production method, the effect of global optimization, and the effect of the three-step phase shift.
[0043] Example 1
[0044] To address the NP-hard problem and improve the quality of defocused fringes during global optimization, this embodiment uses an error objective function to represent the intensity error between sinusoidal fringes and defocused fringes. The error objective function value is reduced iteratively to ultimately obtain globally optimized fringes. Compared to the error jitter function, the Bayesian jitter coding method is relatively simple. The Bayesian jitter coding method typically requires setting a Bayesian threshold template and then comparing the original image with the template. If the pixel grayscale value of the original image is greater than the threshold value corresponding to the template, the pixel grayscale value is set to 1; otherwise, it is set to 0. The size of the Bayesian threshold template is 2. N (N is a positive integer), and different threshold templates can generate different coded fringes. Compared to error-spreading coded fringes, the Bayesian coded fringes generation method is simpler, and pixels do not affect each other. Therefore, this embodiment selects Bayesian coded fringes as the original fringes for optimization. To determine the Bayesian threshold template size, let the Gaussian filter function window G = 5 × 5, the standard deviation σ = 5 / 3, and the range of the threshold template exponent N be {1, 2, 3, 4, 5, 6, 7, 8, 9}. The defocused fringes generated by different threshold templates are compared with sinusoidal fringes of the same period, and the root mean square error of the phase of different threshold templates is calculated. Figure 1 The figure shown is a graph of the root mean square error of the phase under different jitter threshold templates in this embodiment.
[0045] Example 2
[0046] In this embodiment, the global optimization process is as follows:
[0047] 1) Generate Bayesian coded stripes: Select a Bayesian threshold template with a size of 8×8 pixels, and then convert the sine stripes through the template to generate Bayesian binary stripes.
[0048] 2) Light Intensity Error Pixel Detection: Set the Gaussian filter function window G = 5×5, then convolve the Bayesian coded stripes with the Gaussian filter function to generate approximate sinusoidal stripes. Then compare the light intensity I of the standard sinusoidal stripes. s (x,y) and the light intensity I of approximately sinusoidal fringes d (x,y). If I s (x,y) and I d If the difference between (x, y) is greater than the set threshold ε, it is defined as a pixel with light intensity error. In this embodiment, ε is set to 1.
[0049] 3) Globally Optimized Stripes: The binary information of each pixel with a global intensity error is transformed, i.e., 0 is changed to 1 or 1 is changed to 0. Then, the same Gaussian filtering function is used to convert the newly generated binary stripes into approximate sinusoidal stripes, and the intensity I of the standard sinusoidal stripes is compared with that of the standard sinusoidal stripes. sCompare (x, y) and calculate the root mean square error ΔE of the light intensity of the new approximate sinusoidal fringes. Let ΔE... k Let ΔE be the root mean square error of light intensity after the k-th global optimization. k-1 Let be the root mean square error of light intensity after the (k-1)th global optimization. Then, the improvement in fringe accuracy after each global optimization can be expressed as GEC(I). s ,I d As shown in formula (1).
[0050]
[0051] From the perspective of global light intensity analysis, GEC(I) s ,I d The smaller the value of GEC(I), the closer the coded stripes are to the ideal sine stripes. The embodiment sets GEC(I) to... s ,I d When ) > 0.1%, the global optimization process repeats step three until GEC(I) is reached. s ,I d ≤0.1%. Example of encoded stripe contrast before and after global optimization. Figure 3 As shown, where Figure 2 (a) is a standard sine stripe. Figure 2 (b) shows the Bayesian coding stripes before optimization. Figure 2 (c) is the optimized Bayesian coded stripe.
[0052] Example 3
[0053] In distorted images, the local structure of the stripes is important information for structured light, including information such as period, axis of symmetry, peaks, troughs, and curvature.
[0054] This embodiment uses vertical fringes, therefore the light intensity of the fringes varies along the x-direction. Assuming the period of the fringes is T, each period is divided into three equal parts, with each part having a value P = T / 3. This embodiment uses a three-step phase shift for three-dimensional measurement; therefore, the three-step phase shift fringes exhibit the following relationship:
[0055] I1(xP,y)=I2(x,y)=I3(x+P,y) (2)
[0056] From formula (2), it can be seen that after a binary fringe is generated, other fringes can be generated by phase shift. However, due to the influence of ambient light and the equipment itself in the actual measurement process, there is an intensity error between the collected fringes and the projected fringes. Therefore, the collected light intensity can be expressed as:
[0057] F1(x,y)=I1(x,y)+C1(x,y) (3)
[0058] F2(x,y)=I2(x,y)+C2(x,y) (4)
[0059] F3(x,y)=I3(x,y)+C3(x,y) (5)
[0060] Where i takes values in the range {1, 2, 3}, F i (x,y) are defocused coded fringes, I i (x,y) represents a standard sine fringe, C i (x, y) represents the light intensity error. If the light intensity error of each part changes periodically along the x-axis within one period, then we can deduce:
[0061] C1(x,y)=C2(xP,y)=C2(x,y)=C2(x+P,y)=C3(x,y) (6)
[0062] Therefore, the phase diagram φ wrapped by the coded stripes can be derived. f (x,y), as shown in formula (7):
[0063]
[0064] As can be seen from formula (7), the obtained wrapped phase is equal to the standard wrapped phase, indicating that the fringes containing the third harmonic and those without the third harmonic have the same wrapped phase. Therefore, it shows that the third harmonic does not introduce phase error in the three-step phase shift. For further analysis, the three-step phase shift theory can be expressed in the frequency domain as:
[0065]
[0066] Where a(x,y) is the average gray level and b(x,y) is the modulation gray level. Since the three-step phase shift can eliminate the average light intensity and the exponential parameter, and finally obtain the wrapped phase, the three-step phase shift process can be regarded as a frequency domain filter, as shown in formula (9):
[0067]
[0068] The relationship between the amplitude and frequency of the filter function, such as Figure 3 As shown, for the three-step phase shift method, when the frequency is ±3, ±6, ±9..., the corresponding filter function amplitude H(ω) = 0. Therefore, it can be seen that the three-step phase shift method is robust to the influence of the third harmonic component.
[0069] Example 4
[0070] Based on the research of embodiments 1 to 3 above, this implementation scheme provides a basis Figure 4The encoding process described provides a binary encoding method for defocused structured light fringes, in which vertical encoding fringes are used, and the selected fringes' light intensity needs to vary periodically along the x-axis. If the period of the fringes is T, then S is set along the x-axis. x =T / 2, S in the y-axis direction y The stripes are sequentially set to 2 to 14 pixels, representing different lengths along the y-axis. Each stripe length is then optimized, and a globally optimized stripe is obtained through half-period optimization. This binary encoding method includes the following steps:
[0071] S1: Bayesian binary fringes are generated using the Bayesian coding method, and a size of S is selected. x ×S y The semi-periodic fringe d1(i,j) is to be used, where the fringe width S is selected. x =T / 2, select the stripe height S y = n pixels;
[0072] S2: Detect an error pixel in the half-period stripe in step S1;
[0073] S3: Optimize the light intensity of the half-period stripes for the error pixels detected in step S2, and calculate the convergence function R for the light intensity optimization. I ;
[0074] Among them, R I =|(ΔI) k -ΔI k-1 ) / ΔI k-1 |,ΔI k-1 Let ΔI be the root mean square error of the phase corresponding to the (k-1)th light intensity optimization. k The root mean square error of the phase corresponding to the k-th light intensity optimization;
[0075] S4: If R I If the error is greater than 0.1%, then repeat steps S2 and S3 to detect the next error pixel in the half-period stripe, and optimize the light intensity of the half-period stripe for the detected error pixel until the light intensity optimization converges to the function R. I If the light intensity is ≤0.1%, stop the light intensity optimization and obtain the half-periodic stripe d1(i,j) after light intensity optimization;
[0076] S5: Based on the three-step phase shift principle, the half-periodic fringe d1(i,j) after light intensity optimization is shifted by the grating phase;
[0077] S6: Based on the half-period fringes after light intensity optimization and the two half-period fringes after three-step phase shift, perform local optimization on a single pixel and calculate the convergence function LEC(I) for the local optimization. s ,I d );
[0078] Among them, LEC(I s ,I d )=|(Δe k -Δe k-1 ) / Δe k-1 |,Δe k Let Δe be the root mean square error of the phase after local optimization in the k-th round. k-1 The root mean square error of the phase after local optimization in the (k-1)th round;
[0079] S7: From the perspective of local light intensity, LEC(I) s ,I d The smaller the value of LEC(I), the better the sinusoidal property after the local fringes defocus. Therefore, if LEC(I) is smaller, the sinusoidal property will be better. s ,I d If the local optimization rate is greater than 0.1%, then repeat step S6 to perform local optimization on the next pixel until the local optimization convergence function LEC(I) is reached. s ,I d If the value is less than or equal to 0.1%, stop local optimization and obtain the locally optimized half-period stripes;
[0080] S8: Replace the height of the stripe with n+1, and repeat steps S2-S7 to obtain locally optimized half-cycle stripes of different lengths.
[0081] S9: Based on the symmetry and periodicity of the sinusoidal fringes, the locally optimized semi-periodic fringes of different lengths are spliced together to obtain a series of optimized binary coded fringes.
[0082] S10: Set a series of optimized binary coded stripes to the same size, calculate the root mean square error of the phase of the optimized binary coded stripes, and select the binary coded stripe corresponding to the smallest root mean square error as the final coded stripe.
[0083] Because S in the y-axis direction y The values are set to 2 to 14 pixels respectively, therefore, the value of n ranges from 2 to 13.
[0084] In step S2 above, detecting an error pixel in the half-period stripes of step S1 specifically involves:
[0085] S201: Set the Gaussian filter function window G = 5×5, and perform convolution operation between the half-period Bayesian coded stripes in step S1 and the Gaussian filter function to generate approximate sine stripes.
[0086] S202: Using the formula ΔI=|I s (x,y)-I d (x,y), calculate the package phase difference ΔI, where I d(x,y) represents the light intensity of the half-period Bayesian encoded fringe in step S1, I s (x,y) represents the light intensity of the approximate sinusoidal fringes;
[0087] S203: Compare the phase difference ΔI of the package with the threshold τ of the light intensity difference. If ΔI ≥ τ, the corresponding pixel is an error pixel; otherwise, the corresponding pixel is not an error pixel.
[0088] Wherein, the standard deviation σ = 5 / 3, and the threshold τ = 0.1.
[0089] In step S3 above, the light intensity of the half-period stripes is optimized for the error pixels detected in step S2, specifically as follows:
[0090] The light intensity is optimized by changing the gray value of the detected error pixel from 0 to 1 or from 1 to 0.
[0091] In step S5 above, according to the three-step phase shift principle, the half-periodic fringes after light intensity optimization are subjected to grating phase shifting, specifically as follows:
[0092] The light intensity-optimized semi-periodic stripes d1(i,j) are spliced together to form a global stripe D1(i,j). Based on the three-step phase shift principle, the spliced global stripe D1(i,j) is shifted by 2π / 3 and 4π / 3 respectively to obtain the corresponding phase-shifted stripes D2(i,j) and D3(i,j). Based on the two phase-shifted stripes D2(i,j) and D3(i,j), two semi-periodic stripes d2(i,j) and d3(i,j) of the same size are generated.
[0093] Further optimization, in step S6, local optimization of a single pixel is performed based on the half-period fringes after light intensity optimization and the two half-period fringes after three-step phase shift, specifically as follows:
[0094] Take one pixel d1(i,j) from the optimized half-cycle stripe and the two pixels d2(i,j) and d3(i,j) corresponding to the displacement after the phase shift in step S5, to form a pixel group. Each of d1(i,j), d2(i,j), and d3(i,j) contains corresponding binary information. If the binary information in d1(i,j), d2(i,j), and d3(i,j) is changed, the pixel group corresponds to 8 binary combinations, namely (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), and (1,1,1). According to the residual optimization function, calculate the residual optimization value corresponding to each binary combination of the pixel group, and take the binary combination with the smallest residual optimization value as the new pixel binary value of the pixel group.
[0095] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0096] It should be understood that the present invention is not limited to the content already described above, and various modifications and changes can be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A binary encoding method for defocused structured light fringes, characterized in that, Includes the following steps: S1: Bayesian binary stripes are generated using the Bayesian coding method, and a size of [size missing] is selected. Half-periodic stripes Pending, where the width of the stripes is selected. Select the height of the stripes Pixels, of which Indicates the period of the stripes, The value range is 2 to 13; S2: Detect an error pixel in the half-period stripe in step S1; S3: Optimize the light intensity of the half-period stripes for the error pixels detected in step S2, and calculate the convergence function for light intensity optimization. ; in, , For the first The root mean square error of the phase corresponding to the secondary light intensity optimization. For the first The root mean square error of the phase corresponding to the secondary light intensity optimization; S4: If Then repeat steps S2 and S3 to detect the next error pixel in the half-period stripe, and optimize the light intensity of the half-period stripe for the detected error pixel until the light intensity optimization converges. Stop light intensity optimization and obtain the half-period fringes after light intensity optimization. ; S5: Based on the three-step phase shift principle, the half-periodic stripes after light intensity optimization are phase shifted by a grating; S6: Based on the half-period fringes after light intensity optimization and the two half-period fringes after three-step phase shift, perform local optimization on a single pixel and calculate the convergence function of the local optimization. ; Specifically, local optimization of a single pixel is performed based on the half-period fringes optimized by light intensity and the two half-period fringes after three-step phase shift: Take one pixel in the optimized half-cycle stripe and the two pixels after the phase shift of the pixel in step S5 to form a pixel group. The pixel group corresponds to 8 binary combinations. According to the residual optimization function, calculate the residual optimization value corresponding to each binary combination of the pixel group. Take the binary combination with the smallest residual optimization value as the new pixel binary value of the pixel group. in, , For the first The root mean square error of the phase after local optimization. For the first The root mean square error of the phase after local optimization; S7: If Then repeat step S6 to perform local optimization on the next pixel until the local optimization function converges. Stop local optimization and obtain the locally optimized half-period stripes; S8: Adjust the height of the stripes from... Replace with Repeat steps S2-S7 to obtain locally optimized half-period stripes of different lengths. S9: Based on the symmetry and periodicity of the sinusoidal fringes, the locally optimized semi-periodic fringes of different lengths are spliced together to obtain a series of optimized binary coded fringes. S10: Set a series of optimized binary coded stripes to the same size, calculate the root mean square error of the phase of the optimized binary coded stripes, and select the binary coded stripe corresponding to the smallest root mean square error as the final coded stripe.
2. The binary encoding method for defocused structured light fringes according to claim 1, characterized in that, In step S2, detecting an error pixel in the half-period stripes of step S1 specifically involves: S201: Setting Gaussian filter function window The half-cycle Bayesian coded stripes in step S1 are convolved with the Gaussian filter function to generate approximate sine stripes. S202: Using the formula Calculate the package phase difference ,in, The light intensity of the half-period Bayesian encoded stripes in step S1, The light intensity approximates a sinusoidal fringe. S203: The wrapped phase difference Threshold of light intensity difference If a comparison is made, If the error is found, then the corresponding pixel is an error pixel; otherwise, the corresponding pixel is not an error pixel.
3. The binary encoding method for defocused structured light fringes according to claim 2, characterized in that, The threshold .
4. The binary encoding method for defocused structured light fringes according to claim 1, characterized in that, In step S3, the light intensity of the half-period stripes is optimized for the error pixels detected in step S2, specifically as follows: The light intensity is optimized by changing the gray value of the detected error pixel from 0 to 1 or from 1 to 0.
5. The binary encoding method for defocused structured light fringes according to claim 1, characterized in that, In step S5, according to the three-step phase shift principle, the half-periodic fringes after light intensity optimization are subjected to grating phase shifting, specifically as follows: Half-period stripes with optimized light intensity spliced into global stripes Based on the three-step phase shift principle, the spliced global stripes are... Move separately and The corresponding phase-shifted fringes were obtained. and Based on the two phase-shifted fringes and Generate two half-period stripes of the same size. and .
Citation Information
Patent Citations
Remote sensing image ship target identification method
CN107766792A
Binary out-of-focus coding structured light method based on frequency domain optimization
CN111649692A