Nonlinear response is an important factor affecting the accuracy of three-dimensional image measurement based on the fringe structured light method. A phase compensation algorithm combined with a Hilbert transform is proposed to reduce the phase error caused by the nonlinear response of a digital projector in the three-dimensional measurement system of fringe structured light. According to the analysis of the influence of Gamma distortion on the phase calculation, the algorithm establishes the relationship model between phase error and harmonic coefficient, introduces phase shift to the signal, and keeps the signal amplitude constant while filtering out the DC component. The phase error is converted to the transform domain, and compared with the numeric value in the space domain. The algorithm is combined with a spiral phase function to optimize the Hilbert transform, so as to eliminate external noise, enhance the image quality, and get an accurate phase value. Experimental results show that the proposed method can effectively improve the accuracy and speed of phase measurement. By performing phase error compensation for free-form surface objects, the phase error is reduced by about 26%, and about 27% of the image reconstruction time is saved, which further demonstrates the feasibility and effectiveness of the method.
Structured light three-dimensional (3D) measurement technology, with non-contact, high-speed, and high-precision measurement, has become a commonly used tool [
Curve calibration makes no changes to the projection fringe pattern, but compensates for the phase error in the phase calculation process. First, the method calibrates a brightness transfer function from projector to camera, and performs a gamma inverse transformation when generating the pattern image to realize advance correction of the input value of the projected image, or gamma correction of a distorted fringe image. Huang et al. [
Phase error compensation corrects the projection pattern so that the collected fringe image has an approximately sinusoidal intensity distribution. The phase error is calibrated in advance according to its inherent regularity, and the calculated distortion phase is compensated to obtain the correct phase. Zhang et al. [
The defocus imaging method uses the suppression effect of image defocus on high frequency and reduces the high-order harmonic energy of the captured image, thereby reducing the phase error. The method generates a low-pass filter through the defocus of a projector to obtain a fringe image without gamma distortion, thereby avoiding the gamma effect. Zhang et al. [
In summary, whether to establish a phase reference, calibrate the gamma value, or defocus projection, auxiliary conditions are needed for phase error compensation. For example, curve calibration and phase error compensation need to quantify the nonlinear response of a system, and defocus imaging method needs to adjust the optical parameters of a system, and both procedures affect a method’s flexibility and robustness.
Current nonlinear phase-error compensation methods all require auxiliary conditions, such as phase reference construction, gamma calibration, and response curve fitting, which affect the flexibility and robustness of the method. This paper presents an adaptive phase error compensation method based on a Hilbert transform. The method introduces a
In the structured light 3D reconstruction system, the grating fringes, which are obtained with gamma distortion on the projection reference plane, can be expressed as
where
According to the principle of least squares, the image data can calculate the package phase information, which can be expressed as
Due to the nonlinear characteristics of the projection line, the fringe pixel intensity produces nonlinear error. The resulting phase difference is expressed as
Substituting
The relationship [
where
The absolute value of
The Hilbert transform does not need to rely on external auxiliary conditions to introduce a phase shift in the image signal to compensate for the phase. The Hilbert transform of the phase-shift fringe image is expressed as
where
Due to the nonlinear response, the transformed fringe image also contains high-order harmonics, so the actual transformed image is given by
According to
The phase error in the transform domain is the deviation between the actual phase and true phase. According to the phase derivation formula in the space domain, the phase error is given by
Like the phase error distribution in the space domain, the phase error in the transform domain is a periodic function related to the number of ideal phase shift steps N and the gamma value. By comparing the phase error models in the space domain and transform domain, it can be seen that their amplitudes are equal, but the phase difference is half a period, i.e., the sign is opposite. Therefore, the phase error can be compensated for the help of the Hilbert transform.
Let
It can be seen from
In an ideal state, the effect of Hilbert transform recovery is good, and there is no need to introduce auxiliary images for processing, but in the Hilbert transform fringe image, there is still a small amount of noise mixed in the eigenmode function components. If one simply applies global mean filtering to the fringes, the overall image will become blurred. Instead of improving the quality, it will reduce the resolution. Moreover, in order to adapt to the needs of images, the Hilbert transform is extended to a two-dimensional space, and its sign function will cause high anisotropy, which cannot meet the requirement of scale invariance. Combining the spiral phase function
According to
The optimization of the Hilbert transform based on the spiral phase is as follows.
(1) Use the Hilbert spiral to calculate the amplitude distribution of each selected BIMF component and smooth it.
(2) Set a threshold to identify the noise area, and specify that the part whose amplitude distribution is lower than the threshold is noise; the part above the threshold is ignored and not processed.
(3) Smooth the image locally. The identified noise part is subjected to local mean filtering, and the non-noise part is directly used for image reconstruction without processing.
To verify the performance of the algorithm, we constructed a structured light 3D measurement system composed of a DLP digital projector BenQ es6299 projector with
The system first generated projection grating fringes, where
To more accurately reflect the effect of phase recovery, the relative error RMSE and image quality factor Q are introduced as evaluation criteria. The relative error RMSE is the expected value of the square of the image error,
where x and y are the original signal and compensation signal, respectively, and
where
Phase recovery method | Relative error | Quality factor | Time |
---|---|---|---|
No compensation | 0.034 | 0.678 | 5.24 |
Hilbert transform | 0.020 | 0.745 | 3.82 |
Method of this article | 0.012 | 0.820 | 3.74 |
Gamma nonlinearity may result in phase error in a structured light 3D reconstruction system. The phase model and phase error model of gamma distortion are derived from the analysis of the relationship between the gamma distortion and phase error. A nonlinear phase error compensation method based on a Hilbert transform was proposed, making use of the property of the Hilbert transform that induces a phase shift of 2
The authors thank Dr. Jinxing Niu for his suggestions. The authors thank the anonymous reviewers and the editor for the instructive suggestions that significantly improved the quality of this paper. We thank LetPub (