Abstract
The number of phase wraps that result from the carrier component can be completely eliminated or reduced by first applying a fast Fourier transform (FFT) to the image and then shifting the spectrum to the origin. However, because the spectrum can only be shifted by an integer number, the phase wraps of the carrier component cannot be completely reduced. In this paper, an improved carrier frequency-shifting algorithm based on 2-FFT for phase wrap reduction is proposed which allows the spectrum to be shifted by a rational number. Firstly, the phase wraps are reduced by the conventional FFT frequency shift method. Secondly, the wrapped phase with residual carrier components is filtered and magnified sequentially; the amplified phase is transformed into the frequency domain using an FFT, and then, the wrapped phase with the residual carrier components can be further reduced by shifting the spectrum by a rational number. Simulations and experiments were conducted to validate the efficiency of the proposed method.
1. Introduction
In optical metrology, two-dimensional (2D) phase-based techniques have been widely used in various measurement applications, such as deformation and vibration measurement and three-dimensional (3D) surface measurement [1–3]. In these applications, information is always encoded in a modulated fringe, which can be directly projected by a commercial projector or generated using the interference method [4–6]. Then, the phase is calculated from the arctangent function based on a phase-shifting or Fourier transform method [7]. From the mathematical properties of the arctangent function, phase jumps exist in the recovery phase signal, which is called a wrapped phase. To obtain a continuous phase distribution, a phase unwrapping procedure is required [8]. Theoretically, a phase unwrapping algorithm starts at a particular pixel and then searches for the phase jumps; it adds or at each jump detected, and the phase of two neighboring points becomes continuous; however, it is easily affected by phase noise in practical applications. In recent years, researchers have conducted many studies on the phase unwrapping algorithm, which has made phase unwrapping technology more powerful; however, there are still problems, such as poor accuracy and low efficiency [9–11].
In some cases, phase unwrapping can be avoided or the phase wraps can be significantly reduced, for example, in fringe projection or off-axis holographic profilometry [12–14]. In these techniques, a carrier signal is included in the extracted phase information. By applying a Fourier transform and shifting the spectrum to the origin, the carrier phase can be eliminated. Therefore, fewer wraps or even phase unwrapping are obtained. Because the spectrum can only be shifted by an integer number in a conventional fast Fourier transform (FFT), while the carrier frequency is always a fraction in a practical application, the carrier phase cannot be reduced completely, thereby resulting in a measurement error. To solve this problem, researchers have developed several approaches. Gdeisat et al. proposed a zero-padding method to enlarge the array size of the origin phase image, which achieves a high frequency resolution [15]. Good results can be obtained but with low computational efficiency. Wang et al. presented a fast two-step method to reduce the phase wraps. In their method, a frequency peak was calculated first using an FFT, and then, the sub-pixel spectral peak was determined by applying a discrete Fourier transform to the iteratively up-sampled area around the initial frequency peak location [16]. High accuracy and efficiency can be achieved based on their method.
In this paper, an improved carrier frequency-shifting algorithm based on 2-FFT for phase wrap reduction is proposed, which is more concise and intuitive and does not require zero-padding and iterative sampling. In the first step, an FFT is applied to an image, and the phase wraps are reduced by shifting the spectrum to the origin by an integer number. In the second step, the wrapped phase that results from the residual carrier components is filtered and magnified sequentially, and then, the amplified phase is transformed into the frequency domain using an FFT. Finally, the wrapped phase that results from the residual carrier components is further reduced by shifting the spectrum by a rational number.
2. Principle
2.1. Algorithm Principle
The proposed method includes two steps, which both use carrier frequency-shifting algorithm based on 2-FFT to roughly remove and precisely remove the phase wraps respectively, which further reduce the wrapped phase that results from the residual carrier components. Suppose the deformation fringe pattern modulated by the surface of the object iswhere is the carrier frequency along the direction, is an integer, is a rational number, , and is the modulation phase produced by the modulation of the object surface. In the first step, the phase wrap is roughly eliminated using the conventional FFT frequency shift method. Since the spectrum can only be shifted by an integer number, its residual linear phase is , . In order to eliminate the residual phase, in the second step, the phase information of equation (1) is amplified by multiplying it by a large number K; the corresponding cosine fringe pattern iswhere , is an integer, and . Similarly, can be obtained by applying a Fourier transform and shifting the spectrum of equation (2). Now, and K are both known, the dominant component of the original residual linear phase can be determined as , and the residual linear phase becomes , . Therefore, the phase wraps can be further reduced by eliminating the residual carrier phase information , and the theoretical accuracy is . It is worth mentioning that there is a problem on the above analysis, which is that the phase of the object will change from to according to equation (2), namely, when the residual carrier frequency is amplified and frequency of the object will be amplified too, which may cause frequency aliasing and exceed the Nyquist sampling frequency, thereby causing wrong determination of . To avoid this problem, Gauss filtering is first carried out before amplifying the phase information to suppress the high frequency information. Meanwhile, in order to avoid under sampling from the amplification of residual carrier information, we have
Since , can be calculated using equation (3), that is, the theoretical maximum value of the large number K is .
2.2. Analysis of the Algorithm
In this section, the effectiveness of the proposed algorithm is demonstrated using a numerical simulation based on fringe projection profilometry. A simulation object with a pixel size of is generated by the peak function in MATLAB. Its 3D surface shape is shown in Figure 1, and the mathematical expression is as follows:

The fringe pattern of the simulated object is generated bywhere and are the carrier frequencies along the X and Y directions, respectively. In the simulation, the value of is set to 50/512, and to simplify the model, the value of is set to 0.
The four-step phase-shifting method is used to calculate the phase information of the simulated object. First, four simulated fringe patterns are generated using equation (6), and a increment of the phase is introduced between the four fringe patterns. Then, the phase information is extracted using equation (7), and the wrapped phase map is shown in Figure 2:where is the wrapped phase produced using the four-step phase-shifting method and is the four-quadrant arctangent operator. From Figure 2, we can see that many wraps appear in the phase image. To eliminate the phase wraps, the conventional FFT frequency shift method is used first. The following is used to convert the wrapped phase map into the complex array :where is equal to . The 2D Fourier transform is applied to as follows:where is the 2D Fourier transform operator, and the terms and are the horizontal and vertical frequencies, respectively. Assuming that the peak of the spectrum is located at , the phase is eliminated by shifting the spectrum to the origin, that is, . The 2D inverse Fourier transform of the phase-shifted frequency signal is calculated aswhere is the 2D inverse Fourier transform operator. Phase information is extracted usingwhere and represent the imaginary part and real part of the complex array , respectively, and the phase wraps in the original phase map are eliminated, as shown in Figure 3.


(a)

(b)
As can be seen from Figure 3, the phase wraps are completely eliminated. Note that the size of the simulated object is . The frequency interval after the Fourier transform is 1/512, and the simulated carrier frequency is set to 50/512, which is exactly an integer multiple of the frequency interval. Therefore, in this case, the carrier frequency is precisely determined from the peak location of the spectrum based on the conventional FFT method, and no residual carrier signal exists in the phase map.
However, the carrier frequency is rarely exactly an integer multiple of the frequency interval in a practical application. The carrier phase cannot be reduced completely using the conventional FFT frequency shift method. To visualize this problem, a second simulation is conducted. All parameters are the same as those in the first simulation, except that the value of is set to 50.32/512. The simulation results are presented in Figure 4. Because the carrier frequency calculated from the peak location of the spectrum is 50/512, a residual carrier phase exists, as shown in Figure 4(b). Therefore, the phase wraps that result from the carrier phase cannot be completely eliminated using the conventional FFT frequency shift method.

(a)

(b)
To overcome this problem, a simple two-step algorithm for phase wrap reduction is presented as follows: the principle of this method is demonstrated based on a simulation in which all the simulation parameters are the same as those in the second simulation. In the first step, the carrier frequency is roughly determined based on the conventional FFT frequency-shifting method, and the phase with the residual carrier information is shown in Figure 4(b).
In the second step, the residual phase shown in Figure 4(b) is amplified by multiplying it by a large number K and then calculating the magnified residual carrier frequency using an FFT. Consequently, the residual carrier frequency is further roughly determined by dividing the known number K, and the phase wraps are further reduced by removing this residual carrier information.
It is worth mentioning that when the residual phase is amplified, the frequency of the detected object is amplified simultaneously, which may cause frequency aliasing and exceed the Nyquist sampling frequency. The magnified residual carrier frequency may be incorrectly determined. Therefore, high frequency information needs to be suppressed. Before the residual phase shown in Figure 4(b) is amplified, a Gauss filter shown in Figure 5(a) is used first. Additionally, the phase information after the phase wraps are initially eliminated is processed using Gauss filtering :where is set to 25. Figure 5(b) shows the filtered phase shown in Figure 4(b).

(a)

(b)
Following the above analysis, the filtered phase shown in Figure 5(b) is multiplied by a factor of K, where K = 50, and the amplified phase is shown in Figure 6(a). Using an FFT again, the location of the spectral peak of the amplified phase is determined, thereby obtaining the magnified residual carrier frequency. Finally, the magnified residual carrier frequency is divided by K, that is, 50, and the residual carrier frequency with a rational number is obtained. By reducing this residual carrier information from the phase shown in Figure 4, the unwrapped phase shown in Figure 6(b), and its 3D distribution shown in Figure 6(c), the phase wraps that result from the carrier phase are completely eliminated based on our proposed method.

(a)

(b)

(c)
As we can see, although the spectrum can only be shifted by an integer number based on the conventional FFT method, it can be shifted by a rational number, that is, an integer times 1/K, based on our proposed method. Theoretically, the larger the value of K, the better. However, the value of K cannot be infinite, and K < N was determined by equation (3). When K is too large, the remaining frequency of the object after Gauss filtering is still very high, and the magnified residual carrier frequency will be mis-determined because of frequency aliasing. To demonstrate this issue, different amplification factors (K) and standard deviations () are selected for a simulation, and the corresponding relationship between K, , and residual carrier frequency is obtained, as shown in Table 1.
Because the carrier frequency of the simulation object is 50.32/512 and, in the first step, the carrier frequency calculated from the peak location of the spectrum is 50/512, the residual carrier frequency is 0.32/512. From Table 1, we can see that when the amplification factor is 50, 100, and 250, the residual carrier frequency is 0.320/512; and, if K is equal to 500, the residual carrier frequency is 0.320/512 only when is equal to 25. In a practical application, to avoid frequency aliasing, the recommended value is K = 50 and = 25. Note that this is not a strict criterion, and a slightly larger or smaller value would not affect the result significantly. Clearly, carrier information still exists because the residual carrier frequency can be only shifted by a rational number that is an integer times 1/50; however, this remaining carrier frequency is very small and can be ignored in most cases.
3. Experimental Results
To verify the feasibility of the proposed method, we tested a face model with smooth shapes using a fringe projection measurement system. The fringe projection measurement system consisted of a computer, DLP projector, and CCD camera, as shown in Figure 7. One of the deformed fringe patterns captured by the CCD camera is shown in Figure 8(a).


(a)

(b)
In the above simulation analysis, the phase information of the model was calculated using the four-step phase-shifting method; however, this method still had phase errors [17]. To reduce these errors and improve accuracy, the five-step phase-shifting method was adopted to calculate the phase information of the object in the experiment; the phase-shifted fringe images are given bywhere is the background intensity, is the modulation of the fringe, and a increment of the phase is introduced between the five fringe patterns. The phase information is given byand this is shown as a wrapped phase map in Figure 8(b).
We first used the conventional FFT frequency shift method to reduce the phase wraps that resulted from the carrier phase. The wrapped phase map shown in Figure 8(b) was Fourier transformed using equations (8) and (9). The resultant phase map was then calculated using equations (10) and (11) and is shown in Figures 9(a) and 9(b). The unwrapped phase image for this case is shown in Figure 9(c). However, the phase wraps that resulted from the carrier phase could not be completely eliminated.

(a)

(b)

(c)
To further improve the calculation accuracy and reduce the error in the process of phase wrap reduction, we used the proposed method to further reduce the residual carrier phase of Figure 9(b). The filtered phase was calculated using equation (12), which is shown in Figure 10(a), and amplified by multiplying it by 50. Then, the magnified residual carrier frequency was calculated using an FFT. The inverse Fourier transform was then calculated using equation (10). The phase was extracted using equation (11) and is shown in Figures 10(b) and 10(c). The unwrapped image is shown in Figure 10(d), which shows that the phase wraps that resulted from the carrier phase were completely eliminated.

(a)

(b)

(c)

(d)
In order to further test the performance of our proposed method, a USB disk was measured. One of the deformed fringe patterns is shown in Figure 11(a). The procedure was similar to the previous experiment. The five-step phase-shifting method was adopted to calculate the phase information of the object, and the wrapped phase map is shown in Figure 11(b). Firstly, the conventional FFT frequency shift method was used to reduce the phase wraps that resulted from the carrier phase. The resultant phase map is shown in Figures 11(c) and 11(d), and the phase wraps that resulted from the carrier phase could not be completely eliminated. Then, the proposed method was used to further reduce the residual carrier phase. The filtered phase is shown in Figure 11(e), which was multiplied by 50. And, the magnified residual carrier frequency was calculated using an FFT. The wrapped phase that results from the residual carrier components is further reduced by shifting the spectrum, as shown in Figures 11(f) and 11(g).

(a)

(b)

(c)

(d)

(e)

(f)

(g)
Because the existence of the high order harmonic in the projected fringe affects the initial determination of the initial carrier frequency, it can be seen that the wraps from the residual linear phase in Figure 11(d) are more than those in Figure 9(b). However, as shown in Figure 11(g), the linear phase can be basically eliminated based on our proposed method, which further demonstrates the superiority of the proposed method compared with the conventional method.
4. Conclusion
In this paper, we presented an improved carrier frequency-shifting algorithm based on 2-FFT for phase wrap reduction. By first applying an FFT to the wrapped phase with the carrier, most of the carrier components were removed by spectrum shifting. Because the spectrum can only be shifted by an integer number, residual carrier information remained. By applying a second FFT to the filtered and amplified phases with the residual carrier information, the carrier frequency was further determined, and the wrapped phase that resulted from the carrier was almost eliminated. And, we demonstrated both theoretically and experimentally the reliability of the proposed method and contrasted this method with the conventional FFT method. As a result, the spectrum can be only shifted by an integer number in the conventional FFT method, and the phase wraps resulting from the carrier phase cannot be eliminated entirely, while noninteger frequency shift can be achieved in our proposed method, and the phase wraps resulting from the carrier phase can be significantly eliminated.
Data Availability
The data used to support the findings of the study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported by Key Scientific Research Plan of Education Department of Shaanxi Province (Grant no. 20JS051), National Natural Science Foundation of China (NSFC) (Grant no. 61701384), Natural Science Foundation of Shaanxi Province, China (Grant no. 2020JQ-820), Xi’an Key Laboratory of Modern Intelligent Textile Equipment (Grant no. 2019220614SYS021CG043), and Produce-Learn-Research Projects of Keqiao Graduate School of Xi’an Polytechnic University (19KQYB03).