Three-dimensional imaging method based on binary coded stripes with complementary symmetric diffusion paths
By adopting a binary coded stripe method with complementary symmetric diffusion paths in three-dimensional imaging, the problem of insufficient accuracy and speed in high-speed motion scenarios is solved, and a higher accuracy of three-dimensional measurement is achieved.
Patent Information
- Application Number
- CN202510128209.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-02-05
AI Technical Summary
Traditional digital stripe projection technology is difficult to balance accuracy and speed in high-speed motion scenarios, and nonlinear errors and phase errors are present, resulting in a decrease in the accuracy of three-dimensional reconstruction.
A binary coded stripe method based on complementary symmetric diffusion path is adopted. By obtaining the FS error diffusion path and its symmetric path, a symmetric binary coded stripe image is generated and projected onto the object to be measured. Two groups of absolute phase images are calculated and fused to reduce phase error.
It significantly reduces phase errors caused by error diffusion, improves the accuracy and reliability of three-dimensional measurements, and ensures more accurate and stable measurement results.
Smart Images

Figure CN119554994B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of three-dimensional measurement and proposes a three-dimensional imaging method based on complementary symmetric diffusion path binary coding stripes. Background Art
[0002] In recent years, digital fringe projection technology using sinusoidal fringe patterns has been widely used in the field of high-precision three-dimensional imaging measurement due to its high accuracy and non-contact characteristics. However, in many high-speed motion scenes, traditional digital fringe projection technology has the disadvantage of being difficult to balance accuracy and speed. The specific reasons are as follows: (1) General projection equipment (such as DLP projectors) has nonlinear characteristics, and there is a difference between the actual projected sinusoidal fringes and the ideal mathematical model, resulting in a decrease in reconstruction accuracy. To address this problem, some nonlinear compensation methods can be used to compensate for the nonlinear errors caused by the projector; (2) Digital fringe projection technology uses a phase shift method to extract the phase information of the object, which often requires at least 3 images. The projection switching rate of an 8-bit sinusoidal fringe pattern projected by a DMD-based projector is usually 120 Hz, which is extremely unfavorable for the reconstruction of high-speed moving objects, because the object position information between different sinusoidal fringe patterns may change, which in turn leads to inconsistent phase calculations, resulting in artifacts and phase errors, making it difficult to accurately reconstruct the object surface.
[0003] Due to the defects of the digital fringe projection technology using sinusoidal fringe patterns mentioned above, research on binary coding technology has been continuously proposed in recent years, aiming to achieve high-speed and high-precision three-dimensional shape measurement, avoiding nonlinear problems, and realizing high-speed projection by utilizing the inherent high binary mode switching rate of DLP technology. Approximate sinusoidal fringe patterns can produce images with reduced contrast through defocused projection, thereby achieving fast 3D measurement while maintaining or even improving measurement accuracy. Typical binary coding technologies can be divided into: one-dimensional modulation coding and two-dimensional modulation coding, time coding and space coding, including the combination of the two in time and space coding.
[0004] The binary coding method is simple and easy to use, so early research mainly focused on one-dimensional modulation. Someone introduced the idea of sinusoidal pulse width modulation (SPWM) in power electronics and applied it to binary defocused 3D measurement for the first time. By increasing the fundamental frequency, this method can effectively suppress high-order harmonics and generate high-quality sinusoidal fringe patterns even at a small defocus amount. Then, someone proposed the optimal pulse width modulation (OPWM) method, which can achieve more accurate phase recovery under limited defocus conditions by suppressing specific order harmonics in the square wave, greatly improving the measurement accuracy. At the same time, someone proposed square binary modulation (SBM). Although this method requires significant defocusing to suppress high-order harmonics under larger fringe periods, it is still used as a classic method in early binary coding. Subsequently, someone conducted in-depth research on N-step phase shift technology and found that the influence of four-step phase shift on odd harmonics is more significant. On this basis, a three-level SPWM was proposed for three-dimensional reconstruction in dynamic scenes.
[0005] In the exploration of two-dimensional modulation technology, the influence of error diffusion path on stripe generation has gradually attracted attention. Some people have also applied the Bayer dithering algorithm to generate sinusoidal patterns. Although the stripe period is improved, the problem of repeated texture structure still exists. The spatial error diffusion method and its variants have been widely used in two-dimensional modulation technology to more accurately represent the sinusoidal stripe pattern by diffusing the quantization error of pixels.
[0006] Traditional Floyd-Steinberg dithering (FS for short), ierra Lite dithering and Stucki dithering methods usually adopt the error diffusion path from top to bottom and from left to right, which causes the quantization error to accumulate in the horizontal direction and affects the sinusoidal nature of the image. However, most spatial error diffusion methods still rely on defocused projection to suppress high-order harmonics, resulting in a decrease in the signal-to-noise ratio of the measurement, especially in the three-dimensional reconstruction of high-frequency fringes. To address this problem, the spatiotemporal binary coding method came into being to ensure that a fringe pattern with close to sinusoidal characteristics can be generated even in the focused state.
[0007] The above research methods study the coding methods to reduce the error of binary stripes from the perspectives of one-dimensional and two-dimensional, time and space, but few studies focus on the phase error itself generated by binary coding methods such as error diffusion and how the phase error is generated. Summary of the invention
[0008] The purpose of the present invention is to provide a three-dimensional imaging method based on binary coded stripes with complementary symmetric diffusion paths, taking into account the influence of the error diffusion path on the intensity error and subsequent phase error of the binary fringe image, and selecting two appropriate error diffusion paths in combination with a super-resolution algorithm to obtain a phase image with a smaller phase error, which is conducive to more accurate three-dimensional measurement.
[0009] The present invention solves the technical problem and adopts the following technical solution:
[0010] The three-dimensional imaging method based on complementary symmetric diffusion path binary coding stripes includes the following steps:
[0011] Obtaining the FS error diffusion path and the symmetric error diffusion path symmetrical to it, and performing error diffusion respectively to generate two sets of symmetric binary coded fringe images;
[0012] Project two sets of symmetrical binary coded fringe images onto the surface of the object to be measured, and calculate and obtain two sets of absolute phase images;
[0013] The two sets of absolute phase images are fused to obtain a phase fusion image, and the phase fusion image is used as the three-dimensional measurement data of the object to be measured.
[0014] As a further optimization, the calculation obtains two sets of absolute phase images, including:
[0015] Get the package phase;
[0016] The phase is unwrapped using the triple-frequency time-domain phase unwrapping method to obtain two sets of absolute phase images.
[0017] As a further optimization, when fusing the two sets of absolute phase images, noise suppression of a weighted Gaussian observation model and edge preservation of a weighted bilateral total variation regularization are included;
[0018] The noise suppression of the weighted Gaussian observation model refers to: assigning a dynamic weight to each pixel of the phase image, adjusting the confidence of the pixel according to the size of the residual, and obtaining an absolute phase observation sequence given a set of symmetric paths , system matrix T Describe the formation process of the symmetric path phase image to the fused phase image, and optimize the phase fusion image through maximum a posteriori estimation. :
[0019] ,
[0020] in, It means that we need to find the value that minimizes the objective function. value, and are the weight matrices based on observations and priors, respectively, T is a transformation matrix used to transform Mapped to The same space, S is the bilateral total variation regularization operator, is the regularization coefficient. In this model, the noisier regions in the input phase image are given lower weights. represents the absolute phase calculated using the error diffusion path A to generate binary fringes, represents the absolute phase calculated using the error diffusion path B to generate binary fringes, Indicates T This transformation matrix will Mapped to The same space, Represents the signal through the bilateral total variation regularization operator Transform to reduce high frequency noise, represents the weighted bilateral total variation regularization term;
[0021] The edge preservation of the weighted bilateral total variation regularization means that a stronger smoothing effect is applied in the flat area and the regularization strength is weakened in the edge area. , the weighted bilateral total variation regularization term is defined as:
[0022] ,
[0023] in, is the dynamic weight vector of the image prior, which controls the regularization strength of different regions. is a small constant used to approximate the L1 norm, Indicates the total number of pixels of the processed image, Indicates Pixels.
[0024] As a further optimization, the phase fusion image is gradually optimized through an iterative reweighted minimization framework. In each iteration, the observation weights are updated based on the current image estimate. and the prior regularization weights , to gradually reduce noise and enhance edge characteristics, the iterative process is as follows:
[0025] Parameter initialization;
[0026] Update parameter estimates;
[0027] Update weights;
[0028] Update hyperparameters;
[0029] Update phase fusion image estimate;
[0030] Determine whether it converges. If so, output the final phase fusion image. Otherwise, return to the parameter estimation step and continue iterating.
[0031] As a further optimization, the parameter initialization refers to:
[0032] Using Symmetric Path Phase Image The temporal median image of is used as the initial estimate of the phase fusion image :
[0033] ,
[0034] in, is the inverse mapping from the symmetric path phase image to the phase fusion image, It is the median operator, which takes the middle value after sorting the given data by size.
[0035] Set initial observation confidence weights and image prior confidence weights , initialize the amplification factor , the sparsity parameter is set to 0.5 to adjust the sparsity of the prior, and the step size of the regularization parameter is set to , the maximum number of iterations is set to .
[0036] As a further optimization, the updated parameter estimate refers to:
[0037] In each iteration, the noise level is estimated based on the weighted median absolute deviation of the residuals to adaptively adjust the noise parameters in the observation model. The calculation formula is:
[0038] ,
[0039] in, is a constant used to convert the MAD value into an absolute estimate of the noise, is a conditional variable, representing data Under certain conditions, the distribution Indicated in weight The residual calculated below The median absolute deviation of MED represents the median value, Indicates the image The residual value of each pixel;
[0040] Estimate the prior parameters by estimating the residual in the transform domain of the current phase fusion image :
[0041] ,
[0042] in, is a weighted bilateral total variation transformation matrix used to preserve edge characteristics and sparsity.
[0043] As a further optimization, the update weight refers to:
[0044] Assign weights to each low-resolution observation based on the residual value, gradually reduce the impact of outliers, and use two detection methods: global detection and local detection;
[0045] During global detection, the residual deviation of each phase image is detected. If there is a large deviation, the phase image with a large deviation will be removed. If there is a large deviation, the problem will be returned and the phase image will be required to be re-entered. If the median of the residual of a phase image exceeds the set threshold , then the phase image is considered to be an outlier, and its calculation formula is:
[0046] ,
[0047] is a conditional variable, indicating the The bias state corresponding to the figure is , used to identify frames with large deviations, represents the residual deviation value of the kth phase image;
[0048] During local detection, the residual of each pixel is detected, and the weight of the pixel whose residual exceeds the noise level threshold is reduced. The calculation formula is:
[0049] ,
[0050] where c = 2 is a constant used to ensure that approximately 95% of normal values are considered inliers, It refers to the residual deviation of the current pixel;
[0051] Update the image prior weights , weights are assigned to each pixel based on the value of the image in the transform domain to make adaptive adjustments between smooth areas and edge areas, reduce the penalty intensity in edge areas, and increase the penalty intensity in smooth areas. The formula is as follows:
[0052] ,
[0053] where p is the sparsity parameter, It is the value of the signal or image after being processed by a median filter, indicating the The output value of the position, Z is the edge-preserving median filter used to filter out isolated noise pixels, S is the bilateral total variation regularization operator, Represents the input image.
[0054] As a further optimization, the updated hyperparameters are:
[0055] Optimize regularization weights using cross validation or grid search , balancing the weights of observation and prior, and converting the observation data of the phase image Divide into two parts, one part of the absolute phase is used for training, and the other part of the absolute phase is used for verification. The calculation formula is as follows:
[0056] ,
[0057] in, Represents the parameters Optimize and find the optimal solution that minimizes the objective function value, is a random sampling matrix of observed data.
[0058] As a further optimization, the updating of the phase fusion image estimation means:
[0059] The high-resolution phase image is solved using the scaled conjugate gradient method, and the phase fusion image estimate is updated by solving the following objective function :
[0060] ,
[0061] Among them, the matrix and The image prior weights and observation weights The pixel weights at the corresponding positions affect the regularization and data consistency terms.
[0062] As a further optimization, the judgment of whether convergence occurs refers to:
[0063] Convergence conditions are met or the maximum number of iterations is reached .
[0064] The beneficial effect of the present invention is as follows: through the above-mentioned three-dimensional imaging method based on binary coded stripes with complementary symmetric diffusion paths, first, error diffusion is performed using a traditional error diffusion path and a symmetrical new error diffusion path to obtain symmetrical binary coded stripe images, and then the two groups of binary coded stripe images are projected onto the surface of the object to be measured and the data are analyzed and calculated to obtain two groups of absolute phase maps, and finally, the two groups of absolute phase maps are fused to eliminate the horizontal phase error generated by error diffusion, and the fusion result is combined with the system calibration coefficient to finally calculate the three-dimensional measurement shape of the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1It is a flow chart of a three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes in an embodiment of the present invention;
[0066] Figure 2 Schematic diagram of error diffusion path in an embodiment of the present invention, where: Figure 2 (a) is a schematic diagram of the FS error diffusion path. Figure 2 (b) is Figure 2 (a) Schematic diagram of the symmetrical error diffusion path;
[0067] Figure 3 This is a schematic diagram of the intensity and true value of a row of binary fringes obtained by traditional error diffusion path A and path B. Figure 3 (a) is the binary fringe image obtained by error diffusion using path A. Figure 3 (b) is the binary fringe image obtained by using path B error diffusion. Figure 3 (c) is the sinusoidal fringe pattern. DETAILED DESCRIPTION
[0068] In order to make the purpose, 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 drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0069] Embodiment 1
[0070] This embodiment provides a three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes, and its flow chart is shown in Figure 1 , wherein the method comprises the following steps:
[0071] S1, obtaining the FS error diffusion path and the symmetric error diffusion path symmetrical to it, and performing error diffusion respectively to generate two sets of symmetric binary coded fringe images;
[0072] S2, projecting two sets of symmetrical binary coded fringe images onto the surface of the object to be measured, and calculating and obtaining two sets of absolute phase images;
[0073] S3. Fusing the two sets of absolute phase images to obtain a phase fusion image, and using the phase fusion image as three-dimensional measurement data of the object to be measured.
[0074] This embodiment mainly includes two aspects: one is how to select the error diffusion path and obtain two sets of absolute phase images, and the other is how to fuse the two sets of absolute phase images to obtain a phase fused image.
[0075] For the first aspect, in practical application, see Figure 2 , the influence of the error diffusion path needs to be considered, see Figure 2 In (a), the traditional binary coding method usually adopts a "Z"-shaped path of "first left then right, first up then down" for error diffusion, which will cause the error to accumulate to the lower right of the image. In addition, simulation and experiments show that this path selection will cause intensity errors in the binary fringe pattern in the horizontal direction and induce phase errors in the three-frequency four-step phase unwrapping. For this reason, see Figure 2 (b) This embodiment adopts a symmetric path diffusion of "first right then left, first up then down". The results show that it produces errors with opposite directions but similar values, further clarifying the impact of the error diffusion path on the phase error.
[0076] Moreover, the binary fringe patterns generated by the traditional path and its symmetric path are basically equal in terms of intensity error and phase error, but the errors in the horizontal direction are opposite. Based on this, this embodiment chooses to use the binary coded fringe patterns generated by the traditional path and the symmetric path for phase calculation, and obtains a preliminary phase map by the three-frequency time-domain phase unwrapping method. Subsequently, the IRM-SR super-resolution algorithm is used to fuse the two phase maps to generate a higher-precision absolute phase map for three-dimensional reconstruction. In addition, experiments have verified that this method shows good results under different error diffusion kernels, which can not only effectively reduce errors, but also significantly improve the accuracy of phase maps and the accuracy of three-dimensional reconstruction.
[0077] Therefore, the three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes proposed in this embodiment can significantly reduce the phase error caused by error diffusion. At the same time, this method makes the error distribution more uniform, greatly improving the accuracy and reliability of three-dimensional measurement. In actual three-dimensional measurement, by effectively fusing the phase map of the symmetric path, not only the horizontal error is reduced, but also the measurement accuracy of the overall system is further improved, ensuring more accurate and stable measurement results.
[0078] Therefore, in this embodiment, the calculation to obtain two sets of absolute phase images may also include: obtaining the wrapped phase; and unwrapping the phase using a three-frequency time-domain phase unwrapping method to obtain two sets of absolute phase images.
[0079] In this embodiment, the FS error diffusion path is first obtained, so the FS dithering technology needs to be used. As a commonly used error diffusion dithering technology, the FS dithering technology is introduced into the binary defocusing technology and has achieved good results. Each pixel can be quantized to 0 or 255 according to the threshold, and the quantization error of the processed pixel can be diffused to the unprocessed pixel according to a certain proportional factor, thereby reducing the quantization error caused by the entire encoding.
[0080] Among them, the traditional FS error diffusion kernel is: ,
[0081] According to the traditional FS error diffusion path, the whole process can be expressed as:
[0082] ,
[0083] in is the original image intensity value, is the image intensity value after error diffusion, is the final image intensity value, is an optional error diffusion kernel, is the diffusion error of each pixel.
[0084] On this basis, a phase shift algorithm is also needed for high-precision three-dimensional surface measurement, which can achieve high-resolution and high-precision pixel-by-pixel phase measurement and requires at least three phase shift fringe patterns. The phase shift fringe pattern can be expressed as:
[0085] ,
[0086] in, , represents the number of phase shift steps, represents the background light intensity, represents the modulation intensity, is the phase that contains the height information.
[0087] The wrapping phase can be obtained by the following formula:
[0088] ,
[0089] Due to the characteristics of the arctan function, the phase range is , called the wrapped phase, therefore, this embodiment adopts a three-frequency heterodyne method to calculate the final unwrapped phase.
[0090] In the process of using FS dither encoding binary fringe images, the following rules need to be followed to reduce the binarization error:
[0091] 1) Cut out the coding images of each step from the complete binary coding pattern
[0092] If you need to get a four-step phase-shifted binary fringe image with a spacing of X, you need to horizontally expand the complete sinusoidal fringe by a complete cycle, that is, the width of X pixels, and then get a binary image through FS dither encoding. Then, the entire binary fringe image is cropped at intervals of X / 4 to get the required four-step phase-shifted binary fringe image.
[0093] 2) The fringe spacing should be an integer multiple of the phase shift step number.
[0094] Because phase shifting is achieved by moving the binary pattern in space, the fringe spacing that is an integer multiple of the phase shifting step number can avoid the generation of sub-pixel errors.
[0095] After the binary fringe pattern is projected through defocus, there will be an intensity deviation in the horizontal direction, which will cause the final phase error in the N-step phase shift method. Following the above principles, the traditional FS error diffusion path A and the symmetric diffusion path B are used to generate a four-step phase-shifted binary coded fringe pattern with a fringe spacing of 16 pixels. 3×3, 5×5 and 7×7 Gaussian filters are used to simulate different defocus projection conditions in actual experiments. The intensity calculated with 16-step sinusoidal fringes is taken as the true value. The schematic diagram of the intensity of a row of binary fringes obtained by the traditional error diffusion path A and path B and the true value is shown in the figure below. Figure 3 ,in, Figure 3 (a) is the binary fringe image obtained by error diffusion using path A. Figure 3 (b) is the binary fringe image obtained by using path B error diffusion. Figure 3 (c) is the sinusoidal fringe pattern.
[0096] It can be seen that the intensity of the defocused binary fringe image will have a significant deviation compared to the true value. The intensity value of the defocused binary fringe image obtained by the traditional error diffusion path A is "left-shifted" compared to the true value, while the intensity value of the defocused binary fringe image obtained by the error diffusion path B is "right-shifted" compared to the true value. Assuming that the intensity error between the defocused binary coded fringe image and the sinusoidal fringe image can be regarded as a slight disturbance under slight defocus conditions, the phase error of the standard N-step phase shift is defined as:
[0097] ,
[0098] in, is the phase error, B is the modulation intensity, is the fringe frequency, is the intensity error of the nth fringe. According to the formula, a "left shift" in the intensity of the binary fringe pattern obtained by path A will produce a negative phase error, while a "right shift" in the intensity of the binary fringe pattern obtained by path B will produce a negative phase error.
[0099] Therefore, error diffusion jitter will cause the final phase to be different from the actual phase. The generated phase error can affect the height of 3D reconstruction. The quadratic polynomial fitting method is used to express the phase height mapping relationship:
[0100] ,
[0101] Among them, a, b, and c are coefficients that need to be calibrated pixel by pixel, and the derivative is about The rate of change is:
[0102] ,
[0103] In the actual calibration and use process, it can be considered Always > 0, that is About is a monotonically increasing function of .
[0104] For the second aspect, it has been proved that the phase error of the error jitter algorithm is closely related to the error diffusion path. Therefore, in this embodiment, it is proposed to use the phase fusion algorithm to fuse the phase images obtained along the two symmetrical error diffusion paths, thereby effectively reducing the phase error. Specifically, the error diffusion directions of the binary fringe images generated by the error diffusion path A and the path B are opposite in the horizontal direction. The IRM-SR algorithm (Iteratively Re-weighted Multiframe Super-Resolution) is used to fuse the phase images of the two paths, which can significantly suppress the phase error in the horizontal direction. The IRM-SR algorithm achieves a balance between error suppression and edge detail preservation in the phase fusion process by introducing a weighted Gaussian observation model and weighted bilateral total variation (WBTV) regularization. According to the problem background and requirements of this embodiment, corresponding improvements have been made. The principle of the IRM-SR algorithm can be divided into two aspects: noise suppression of the weighted observation model and edge preservation of WBTV regularization.
[0105] First, the weighted Gaussian observation model of the IRM-SR algorithm can handle the spatial variation noise in the image, that is, the noise between the absolute phases obtained by two different path methods due to environmental noise or small movements. Unlike traditional methods, IRM-SR assigns a dynamic weight to each pixel of the phase image and adjusts the confidence of the pixel according to the size of the residual. Given a set of symmetric paths, the absolute phase observation sequence is , system matrix T Describes the formation process of the symmetric path phase image to the fused phase image. The goal of the IRM-SR algorithm is to optimize the phase fused image through maximum a posteriori (MAP) estimation. :
[0106] ,
[0107] in, It means that we need to find the value that minimizes the objective function. value, and are the weight matrices based on observations and priors, respectively, Tis a transformation matrix used to transform Mapped to The same space, S is the bilateral total variation regularization operator, is the regularization coefficient. In this model, the noisier regions in the input phase image are given lower weights. represents the absolute phase calculated by using the error diffusion path A to generate binary fringes, represents the absolute phase calculated using the error diffusion path B to generate binary fringes, Indicates T This transformation matrix will Mapped to The same space, Represents the signal through the bilateral total variation regularization operator Transform to reduce high frequency noise, represents the weighted bilateral total variation regularization term. In this model, the noisy areas in the input phase image are assigned lower weights, which effectively reduces the impact of noise on image fusion and makes the algorithm more robust in complex noise environments.
[0108] Secondly, the IRM-SR algorithm uses the image sparsity characteristics to preserve edge details by combining WBTV regularization. WBTV regularization applies a stronger smoothing effect in flat areas and weakens the regularization strength in edge areas, thereby effectively avoiding edge blurring caused by excessive smoothing in traditional regularization methods. Specifically, for images , the WBTV regularization term is defined as:
[0109] ,
[0110] in, is the dynamic weight vector of the image prior, which controls the regularization strength of different regions. is a small constant used to approximate the L1 norm, Indicates the total number of pixels of the processed image, Indicates Pixels.
[0111] The IRM-SR algorithm gradually optimizes the phase fusion image through an iterative reweighted minimization framework. In each iteration, the algorithm updates the observation weights based on the current image estimate. and the prior regularization weights , to gradually reduce noise and enhance edge characteristics. The specific iterative process is as follows:
[0112] 1) Initialization: Use symmetric path phase image The temporal median image (after motion compensation) is used as the initial estimate of the phase fusion image , ensuring that the initial estimate is robust to noise and outliers:
[0113] ,
[0114] in, is the inverse mapping from the symmetric path phase image to the phase fusion image, It is the median operator, which takes the middle value after sorting the given data by size.
[0115] Set initial observation confidence weights and image prior confidence weights , initialize the amplification factor , because in this embodiment, the resolution of the input symmetric path phase image and the obtained fusion phase image are consistent, so there is no need to amplify, so the amplification factor is 1, and the sparsity parameter is set to 0.5 to adjust the sparsity of the prior, and the step size of the regularization parameter is set to , the maximum number of iterations is set to .
[0116] When the convergence condition is met or the maximum number of iterations is reached Before, repeat the following steps:
[0117] 2) Update parameter estimates: In each iteration, the noise level is estimated based on the weighted median absolute deviation (MAD) of the residuals to adaptively adjust the noise parameters in the observation model. Noise level The calculation formula is:
[0118] ,
[0119] in, is a constant used to convert the MAD value into an absolute estimate of the noise, is a conditional variable, representing data Under certain conditions, the distribution Indicated in weight The residual calculated below The median absolute deviation of MED represents the median value, Indicates the image The residual value of each pixel is obtained; and the prior parameters are estimated by estimating the residual in the transform domain of the current phase fusion image.
[0120] ,
[0121] in, is the weighted bilateral total variation (WBTV) transformation matrix, which is used to preserve edge characteristics and sparsity.
[0122] 3) Update weights: Assign weights to each low-resolution observation based on the residual value, gradually reducing the impact of outliers. Two detection methods are used: global detection and local detection. Global detection is to detect the residual deviation of each phase image. If there is a large deviation, the phase image with a large deviation will be removed. In this embodiment, if there is a large deviation, the problem will be returned and re-entered. If the median of the residual of a phase image exceeds the set threshold , then the phase image is considered to be an outlier, and its calculation formula is:
[0123] ,
[0124] is a conditional variable, indicating the The bias state corresponding to the figure is , used to identify frames with large deviations, represents the residual deviation value of the kth phase image;
[0125] The local detection is to detect the residual of each pixel point, and reduce the weight of the pixel points whose residual exceeds the noise level threshold. The calculation formula is:
[0126] ,
[0127] where c = 2 is a constant used to ensure that approximately 95% of normal values are considered inliers, It refers to the residual deviation of the current pixel;
[0128] Update the image prior weights , weights are assigned to each pixel based on the value of the image in the transform domain to make adaptive adjustments between smooth areas and edge areas, reduce the penalty intensity in edge areas, and increase the penalty intensity in smooth areas. The formula is as follows:
[0129] ,
[0130] Where p is the sparsity parameter (usually set to 0.5), It is the value of the signal or image after being processed by a median filter, indicating the The output value of the position, Z is the edge-preserving median filter used to filter out isolated noise pixels, S is the bilateral total variation regularization operator, Represents the input image.
[0131] 4) Update hyperparameters: Use cross validation or grid search to optimize regularization weights , balance the weights of the observation model and the prior model, and convert the observation data of the phase image Divide into two parts, one part of the absolute phase is used for training, and the other part of the absolute phase is used for verification. The calculation formula is as follows:
[0132] ,
[0133] in, Represents the parameters Optimize and find the optimal solution that minimizes the objective function value, is a random sampling matrix of observed data.
[0134] 5) Update the phase fusion image estimate: Use the scaled conjugate gradient method (SCG) to solve the high-resolution image and update the phase fusion image estimate by solving the following objective function :
[0135] ,
[0136] Among them, the matrix and The image prior weights and observation weights The pixel weights at the corresponding positions affect the regularization and data consistency terms.
[0137] Finally, check whether it converges. If it converges, output the final phase fusion image. If it does not converge, return to the main loop. The advantages of the IRM-SR algorithm in this embodiment are high computational efficiency and fewer parameter requirements. The algorithm can automatically estimate noise and regularization parameters, thereby reducing the complexity of manual parameter adjustment. Thanks to the weighted minimization method, the computational overhead of each iteration is low, ensuring the efficiency of the algorithm in practical applications. Experiments show that the IRM-SR algorithm can provide excellent image fusion effects and effectively reduce phase errors in the scenario of symmetric path phase image fusion.
[0138] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes, characterized in that: The steps include: Obtaining an FS error diffusion path and a symmetric error diffusion path symmetrical thereto, and performing error diffusion respectively to generate two sets of symmetric binary coded fringe images, wherein the FS error diffusion path adopts a "Z"-shaped path of "first left then right, first up then down", and the symmetric error diffusion path symmetrical to the FS error diffusion path adopts a path of "first right then left, first up then down"; Projecting two sets of symmetrical binary coded fringe images onto the surface of the object to be measured, and calculating to obtain two sets of absolute phase images, wherein the two sets of absolute phase images are calculated, including: Get the package phase; The three-frequency time-domain phase unwrapping method is used to unwrap the phase and obtain two sets of absolute phase images. The two sets of absolute phase images are fused to obtain a phase fusion image, and the phase fusion image is used as the three-dimensional measurement data of the object to be measured; When fusing the two sets of absolute phase images, noise suppression of a weighted Gaussian observation model and edge preservation of weighted bilateral total variation regularization are included; The noise suppression of the weighted Gaussian observation model refers to: assigning a dynamic weight to each pixel of the phase image, adjusting the confidence of the pixel according to the size of the residual, and obtaining an absolute phase observation sequence given a set of symmetric paths , system matrix T Describe the formation process of the symmetric path phase image to the fused phase image, and optimize the phase fusion image through maximum a posteriori estimation. : , in, It means that we need to find the value that minimizes the objective function. value, and are the weight matrices based on observations and priors, respectively, T is a transformation matrix used to transform Mapped to The same space, S is the bilateral total variation regularization operator, is the regularization coefficient. In this model, the noisier regions in the input phase image are given lower weights. represents the absolute phase calculated by using the error diffusion path A to generate binary fringes, It represents the absolute phase calculated by using the error diffusion path B to generate the binary fringes. The error diffusion path A is the FS error diffusion path, and the error diffusion path B is the symmetric error diffusion path that is symmetric to the FS error diffusion path. Indicates T This transformation matrix will Mapped to The same space, Represents the signal through the bilateral total variation regularization operator Transform to reduce high frequency noise, represents the weighted bilateral total variation regularization term; The edge preservation of the weighted bilateral total variation regularization means that a stronger smoothing effect is applied in the flat area and the regularization strength is weakened in the edge area. , the weighted bilateral total variation regularization term is defined as: , in, is the dynamic weight vector of the image prior, which controls the regularization strength of different regions. is a small constant used to approximate the L1 norm, Indicates the total number of pixels of the processed image, Indicates Pixels.
2. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 1, characterized in that: The phase fusion image is gradually optimized through an iterative reweighted minimization framework. In each iteration, the observation weights are updated based on the current image estimate. and the prior regularization weights , to gradually reduce noise and enhance edge characteristics, the iterative process is as follows: Parameter initialization; Update parameter estimates; Update weights; Update hyperparameters; Update phase fusion image estimate; Determine whether it converges. If so, output the final phase fusion image. Otherwise, return to the parameter estimation step and continue iterating.
3. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 2, characterized in that: The parameter initialization refers to: Using Symmetric Path Phase Image The temporal median image of is used as the initial estimate of the phase fusion image : , in, is the inverse mapping from the symmetric path phase image to the phase fusion image, It is the median operator, which takes the middle value after sorting the given data by size. Set initial observation confidence weights and image prior confidence weights , initialize the amplification factor , the sparsity parameter is set to 0.5 to adjust the sparsity of the prior, and the step size of the regularization parameter is set to , the maximum number of iterations is set to .
4. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 2, characterized in that: The updating parameter estimation refers to: In each iteration, the noise level is estimated based on the weighted median absolute deviation of the residuals to adaptively adjust the noise parameters in the observation model. The calculation formula is: , in, is a constant used to convert the MAD value into an absolute estimate of the noise, is a conditional variable, representing data Under certain conditions, the distribution Indicated in weight The residual calculated below The median absolute deviation of MED represents the median value, Indicates the image The residual value of each pixel; Estimate the prior parameters by estimating the residual in the transform domain of the current phase fusion image : , in, is a weighted bilateral total variation transformation matrix used to preserve edge characteristics and sparsity.
5. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 4, characterized in that: The update weight refers to: Assign weights to each low-resolution observation based on the residual value, gradually reduce the impact of outliers, and use two detection methods: global detection and local detection; During global detection, the residual deviation of each phase image is detected. If there is a large deviation, the phase image with a large deviation will be removed. If there is a large deviation, the problem will be returned and the phase image will be required to be re-entered. If the median of the residual of a phase image exceeds the set threshold , then the phase image is considered to be an outlier, and its calculation formula is: , is a conditional variable, indicating the The bias state corresponding to the figure is , used to identify frames with large deviations, represents the residual deviation value of the kth phase image; During local detection, the residual of each pixel is detected, and the weight of the pixel whose residual exceeds the noise level threshold is reduced. The calculation formula is: , where c = 2 is a constant used to ensure that approximately 95% of normal values are considered inliers, It refers to the residual deviation of the current pixel; Update the image prior weights , weights are assigned to each pixel based on the value of the image in the transform domain to make adaptive adjustments between smooth areas and edge areas, reduce the penalty intensity in edge areas, and increase the penalty intensity in smooth areas. The formula is as follows: , where p is the sparsity parameter, It is the value of the signal or image after being processed by a median filter, indicating the The output value of the position, Z is the edge-preserving median filter used to filter out isolated noise pixels, S is the bilateral total variation regularization operator, Represents the input image.
6. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 2, characterized in that: The updating of the hyper parameters refers to: Optimize regularization weights using cross validation or grid search , balancing the weights of observation and prior, and converting the observation data of the phase image Divide into two parts, one part of the absolute phase is used for training, and the other part of the absolute phase is used for verification. The calculation formula is as follows: , in, Represents the parameters Optimize and find the optimal solution that minimizes the objective function value, is a random sampling matrix of observed data.
7. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 2, characterized in that: The updating of the phase fusion image estimation refers to: The high-resolution phase image is solved using the scaled conjugate gradient method, and the phase fusion image estimate is updated by solving the following objective function : , Among them, the matrix and The image prior weights and observation weights The pixel weights at the corresponding positions affect the regularization and data consistency terms.
8. The three-dimensional imaging method based on complementary symmetric diffusion path binary coded stripes according to claim 2, characterized in that: The judgment of whether convergence occurs refers to: Convergence conditions are met or the maximum number of iterations is reached .
Citation Information
Patent Citations
Monte Carlo Quantum Computing
US20230016119A1
Iterative joint estimation method of vehicle mass and road gradient based on mmrls and SH-stf
US20230054246A1