## Abstract

A non-iterative spatial phase-shifting algorithm based on principal component analysis (PCA) is proposed to directly extract the phase from only a single spatial carrier interferogram. Firstly, we compose a set of phase-shifted fringe patterns from the original spatial carrier interferogram shifting by one pixel their starting position. Secondly, two uncorrelated quadrature signals that correspond to the first and second principal components are extracted from the phase-shifted interferograms by the PCA algorithm. Then, the modulating phase is calculated from the arctangent function of the two quadrature signals. Meanwhile, the main factors that may influence the performance of the proposed method are analyzed and discussed, such as the level of random noise, the carrier-frequency values and the angle of carrier-frequency of fringe pattern. Numerical simulations and experiments are given to demonstrate the performance of the proposed method and the results show that the proposed method is fast, effectively and accurate. The proposed method can be used to on-line detection fields of dynamic or moving objects.

© 2012 OSA

## 1. Introduction

The main advantage of phase extraction approaches based on spatial carrier analysis is that these techniques can retrieve the interesting phase from a single carrier-frequency interferogram in a single shot measurement [1]. Therefore, these methods are not sensitive to vibration and environment perturbation and allow the measurement of dynamic processes and moving objects. The Fourier transform based method (FTM) [2–9] and the spatial carrier phase-shifting (SPS) method [10–17] are the two most popular spatial carrier approaches. The FTM is a phase demodulating method based on the interferogram frequency analysis that was first introduced by Takeda et al [2]. This seminal work was after extended to two-dimensions in Refs [3,6]. The FTM approach has been applied to a variety of optical interferometric phase measurements; for example, dynamic wavefront phase reconstruction by radial shearing interferometer [18,19], and also in fringe projection profilometry [9]. The FTM approach consists in a global transformation and hence is tolerant to noise. On the other hand, as the transformation is a global operation, the signal in one position will affect the signal in other positions in the frequency domain (spectral) analysis. Moreover, there are still some problems unsolved completely in the FTM, as for example, carrier-removal error, spectral leakage and boundary effect because of Gibbs effects [5,7,8]. Recently, another two time-frequency analysis methods as the windowed Fourier transform (WFT) [20–22] and wavelet transform (WF) [23,24], have been introduced. These approaches can solve the problems mentioned above to a some extent.

The SPS method attempts to combine the advantages of the FTM and temporal phase-shifting (PS) approaches. The SPS approach composes a set of phase-shifted fringe patterns from the original interferogram so the modulating phase is obtained from phase-shifting demodulating techniques but using the spatial dimension instead of the temporal one [10–12]. These SPS methods are more sensitive to random noise than the FTM based ones and almost need prior knowledge about the carrier-frequency value [11] or about the phase-shift between the composed interferograms [14]. Guo et al [15] presented a local frequency estimation approach and then the phase distribution is calculated by least-squares method. However, the result is unstable due to the variations of background and contrast of the fringe pattern [16]. Recently, Xu et al [17] presented an excellent SPS algorithm, which obtains high retrieval precision and advanced stability by least-squares iteration process (henceforth named LSI-SPS) but it costs of time-consuming.

In this paper, we present a non-iterative approach spatial carrier phase-shifting algorithm (SPS) based on the principal component analysis (PCA) method [25–33] to directly extract the phase from a single carrier interferogram. The proposed method is fast, approximately two orders of magnitude times faster than LSI-SPS due to it does not use any iterative optimization process. Moreover, our method is based on the statistical properties of the phase-shifted patterns composed from the original interferogram; that is, the measured phase is calculated from the two uncorrelated quadrature signals which correspond to the first two principal components of the PCA algorithm. Therefore, it is less sensitive to random noise than LSI-SPS algorithm. In this paper, we refer to the proposed method as the “SPS-PCA” for brevity and distinction. We will firstly discuss the principle of the proposed algorithm, and then we show some numerical experiments and optical experiments with the aim of seeing the performance of this algorithm.

## 2. Theory Analysis

#### 2.1. Constructing phase-shifting interferograms

Generally, the intensity distribution of fringe pattern with a linear carrier can be expressed as [1]

*x*and

*y*are integers denoting the pixel position in the fringe pattern;

*A*(

*x*,

*y*),

*B*(

*x*,

*y*) and

*ϕ*(

*x*,

*y*) are the background illumination, the modulation signal and the modulating phase at pixel (

*x*,

*y*). Additionally, κ

_{x}and κ

_{y}are the spatial carrier-frequency along

*x*and

*y*axes respectively. Typically,

*A*,

*B*, and

*ϕ*maps are assumed to be smooth signals, so we can assume that

*A*,

*B*, and

*ϕ*have approximately the same quantity for four adjacent pixels on the carrier-frequency pattern (see Fig. 1(a) ). Thus, from four consecutive pixels on the original spatial carrier interferogram, we can construct four phase-shifted interferograms,

*I*

_{1}=

*I*(

*x*,

*y*),

*I*

_{2}=

*I*(

*x*+ 1,

*y*),

*I*

_{3}=

*I*(

*x*,

*y*+ 1) and

*I*

_{4}=

*I*(

*x*+ 1,

*y*+ 1) that are given by

*δ*

_{1},

*δ*

_{2}and

*δ*

_{3}are the relatively phase-shift at (

*x*,

*y*) pixel between the constructed randomly phase-shifted fringe pattern

*I*

_{1},

*I*

_{2},

*I*

_{3}and

*I*

_{4}. Similarly, referring to Fig. 1(b), we also can construct nine randomly phase-shifting interferogram

*I*

_{1}~

*I*

_{n}(

*n*= 9) from nine consecutive neighboring pixels of the original carrier-frequency interferogram

*I*(

*x*,

*y*). For the convenient of the subsequent analysis, the former constructed method is denoted as mode a while the latter is denoted as mode b.

#### 2.2. Determination phase with principal component analysis method

The PCA is a technique from statistics for reducing the dimensionality of an image or date set [26]. It involves a mathematical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of uncorrelated variables, called principal components [25–27]. The principal components are linear combinations of the original variables and are the single best subspace of a given dimension in the least-square sense [28]. According to the analysis in Section.2.1, suppose that we have constructed *N* (with *N* equals to 4 or 9) phase-shifting interferograms of size *M _{x}* ×

*M*. Then, each pattern is reshaped into a column vector of size

_{y}*M*, where

*M*=

*M*×

_{x}*M*. These

_{y}*N*images can be expressed in a matrix form as

*denotes the transposing operation, and*

^{T}*X*has

*M*×

_{x}*M*columns and

_{y}*N*rows. Taking into account that the background component

*A*is a smooth signal, we can estimate it as,Therefore, the intensity with background filtered version of

*N*frames can be approximately express as

*X*=

_{F}*X*-

*X*. And then the covariance matrix of the data sets can be expressed asThe covariance matrix

_{m}*C*is by definition a square and symmetric matrix with size of

*N*×

*N*. According to the matrix theory, we can calculate an orthogonal basis of the image set by finding the eigenvalues and eigenvectors from the symmetric matrix

*C*. The eigenvectors

*Q*

_{i}and the corresponding eigenvalues

*V*are the solutions of the following equation expressionAn orthogonal matrix

_{i}*Q*composed by the eigenvectors

*Q*is constructed and given bySince the matrix

_{i}*C*is a square matrix, from the matrix theory, the covariance matrix

*C*can be diagonalized aswhere D is a diagonal matrix composed by the eigenvalues

*V*. This diagonalization process is the second step of the PCA method and is achieved in a practical point of view by the singular value decomposition (SVD) algorithm [27]. Once the covariance matrix

_{i}*C*is diagonalized and the orthogonal matrix

*Q*is obtained, the principal components can be extracted by the Hotelling Transform [26] as

_{1}, Φ

_{2},…, Φ

_{N}are the principal component of the

*X*-

*X*. The first two principal components with the biggest eigenvalues (Φ

_{m}_{1}and Φ

_{2}) correspond to the two uncorrelated quadrature signals

*I*(

_{c}*x*,

*y*) =

*B*cos[

*ϕ*(

*x*,

*y*) + 2π(

*κ*+

_{x}x*κ*)] and

_{y}y*I*=

_{s}*B*sin[

*ϕ*(

*x*,

*y*) + 2π(κ

*+ κ*

_{x}x*)] of the phase-shifting interferogram without background illumination*

_{y}y*X*=

_{F}*X*-

*X*[25]. Thus the measured phase,

_{m}*ϕ*(

*x*,

*y*), can be directly extracted with the following expression as,

*ϕ*(

*x*,

*y*) + 2π(κ

*+ κ*

_{x}x*)] and sin[*

_{y}y*ϕ*(

*x*,

*y*) + 2π(κ

*+ κ*

_{x}x*)] signals to the first two principal components [26,29,30]. Moreover, the accuracy of the background estimation operation depends on the number of fringe pattern used (*

_{y}y*N*); the larger

*N*, the better background component

*A*is estimated. Additionally note that for large

*N*the algorithm is more robust against noise. Observe also, on the other hand, that as large

*N*is, the spatial resolution of the recovered phase is reduced.

## 3. Numerical Simulation

To show the performance of the proposed algorithm, numerical simulations are carried out. The carrier-frequency fringe patterns are generated according to Eq. (1) by setting the parameters as follows: *A*(*x*,*y*) = 50, *B*(*x*,*y*) = 50exp[-(*x*^{2} + *y*^{2})/8.0], and phase *ϕ*(*x*,*y*) = 2πPeak (*x*/8,*y*/8) + 2π(κ_{x}*x* + κ_{y}*y*); where (*x*,*y*)∈[-2,2] and they are discretized into an array of 400 × 400, Peak is a multi-peak built-in function of Matlab shown in Fig. 2(a)
, and κ_{x} and κ_{y} are the carrier-frequencies along x and y direction, respectively. Moreover, additive Gaussian white noise which goes from 0% to 10% of Signal-to-Noise-Ratio (SNR) is added to the different spatial carrier interferogram. Then the intensity of each pattern is assumed to be captured by a CCD with 8-bit quantization. The image size is 400 × 400. In all following cases, the patterns are processed with a dual-core 2.2 GHz desktop and using Matlab.

In the first simulation experiment, we set the value of κ_{x} and κ_{y} equals to 10 (px^{−1}) and we add additive Gaussian white noise (2%) to the fringe pattern. In Fig. 2 we show the resultant interferogram (right) and the phase distribution (left). Then we use the proposed SPS-PCA and LSI-SPS methods to demodulate the interferogram. Figure 3(a)
and 3(c) shows the extracted phase using the proposed SPS-PCA method with mode a and mode b, respectively. The obtained phase by Xu’s LSI-SPS method is shown in Fig. 3(e). Here, we also show the corresponding residual phase error distributions in Fig. 3(b), 3(d), and 3(f). The obtained root mean square error (RMS) between the theoretical and reconstructed phases by the proposed SPS-PCA method are 0.114 (rad) with mode a, and 0.052 (rad) with mode b. The obtained RMS error by the Xu’s LSI-SPS is 0.098 (rad). Additionally, the processing times are 0.121 s (mode a), 0.242s (mode b) and 26.97 s for the proposed SPS-PCA method and Xu’s LSI-SPS method, respectively. As can be seen from the results shown above, the proposed method with mode a has accuracy similar to the Xu’s LSI-SPS algorithm. On the other hand, the obtained accuracy is higher than Xu’s method when we use mode b. In both mode a and b, the preprocessing times are approximately two orders of magnitude faster than LSI-SPS method.

In the simulation experiments, we find that some factors that may influence the performance of the proposed method, for example, the level of random noise, the carrier-frequency values and the angle of carrier-frequency in the fringe pattern. All of these factors will be analyzed and discussed.

Firstly, we compute the RMS errors between the reconstructed and ground truth phases and the processing times obtained by the proposed SPS-PCA and LSI-SPS methods when the carrier-frequencies are κ_{x} = κ_{y} = 10 (px^{−1}) and we add different levels of random noise. We show the obtained results in Table 1
. As can be seen from the Table 1, the proposed method has accuracy similar to the Xu’s LSI-SPS algorithm and is approximately two orders of magnitude faster which maintain the same results to above analysis.

Secondly, in order to compare the robustness of the proposed SPS-PCA method with different carrier-frequency values of the fringe patterns, we have obtained the RMS errors and the processing times for different carrier-frequency values in the interferogram. We use the same level of noise, background illumination, modulation signal and theoretical phase distribution than in the first simulation. The results are presented in Table 2 , which shows that the RMS errors obtained from SPS-PCA and LSI-SPS methods decrease with the increasing carrier-frequency values of the fringe pattern. On the other hand, the obtained accuracy is similar to Xu’s method when we use SPS-PCA with mode a, and the obtained RMS errors by SPS-PCA (mode b) are always lower than the ones retrieved using the SPS-PCA (mode a) and LSI-SPS method. The reason is that the SPS-PCA with mode b extracted the phase from 9 phase-shifting interferograms which filters the random noise by the mask of 3 × 3 (px). Finally, it can be seen that the processing time of both mode a and b is approximately two orders of magnitude faster than LSI-SPS method.

In the last simulation, we investigate the performance of the proposed method when we modify the direction of the interferogram carrier-frequency. As in the last simulation, we use the same interferogram components than in the first simulation but without added noise. Then we extract the modulating phase from interferograms with different angle of carrier-frequency using both of the proposed SPS-PCA and LSI-SPS methods. The obtained the RMS errors for different angle of carrier-frequency in the interferogram are shown in Fig. 4 . The results show that the RMS errors obtained from SPS-PCA (with mode a) and LSI-SPS methods are sensitive to the angle of carrier-frequency of fringe pattern, and they can achieve good satisfactory results when the direction of carrier-frequency locate at 20°to 70 °. While the obtained RMS errors by mode b of the proposed SPS-PCA method are practically constant along the full range from 0°to 90 °of the angle of carrier-frequency in the interferogram.

## 4. Experiment and results

Optical experiments are also carried out to investigate the performance of the proposed PCA method. An experimental interferogram with size of 150 × 150 is produced by a self-referencing Mach-Zehnder interferometer, as shown in Fig. 5(a) . We analyzed the fringe pattern by the proposed SPS-PCA algorithm and Xu’s LSI-SPS method. Figure 5(b) and 5(c) shows the extracted phase by the proposed SPS-PCA algorithm with mode a and mode b, respectively. The retrieved phase by Xu’s LSI-SPS method is shown in Fig. 5(d). Additionally, the detail parameters (PV and RMS) of the reconstructed phase and corresponding processing times are shown in Table 3 . As can be seen from Fig. 5 and Table 3, the PV and RMS of retrieved phase by the proposed SPS-PCA method are 3.326 (rad) and 0.636 (rad) with a mode and 3.104 (rad) and 0.634 (rad) with b mode, respectively; while the obtained PV andRMS of the reconstructed phase by LSI-SPS method are 3.360 (rad) and 0.637 (rad), which mean that the proposed method can achieve the same accuracy with the Xu’s LSI-SPS algorithm and it is approximately two orders of magnitude faster. Furthermore, it can be seen from Fig. 5(b) and 5(c) that the reconstructed phase map with mode b is smoother than the obtained one by mode a. The reason is that the SPS-PCA using mode b extracts the phase from 9 phase-shifting interferograms which filters the random noise by the mask of 3 × 3 (px) while the mode a filters the phase with a 2 × 2 (px) mask.

## 5. Conclusion

In summary, a novel spatial phase-shifting algorithm without iterative process based on PCA method is present. Based on the PCA method, we extract two uncorrelated quadrature signals from a set of phase-shifted interferograms which are composed from the original spatial carrier interferogram shifting by one pixel their starting position. The phase is calculated from the arctangent function using these quadrature signals. The proposed method is fast, accurate, and only needs a single interferogram. Meanwhile, the main factors that may influence the performance of the proposed method are analyzed and discussed, such as the level of random noise, the carrier-frequency values and the angle of carrier-frequencies of fringe pattern. Numerical simulations and experiments are given to demonstrate the performance of the proposed method and the results show that the proposed method is fast, effectively and accurate. The proposed method can be applied to on-line detection fields of dynamic or moving objects.

## Acknowledgments

This work was supported by Major Program of National Natural Science Foundation of China (60890200) and National Natural Science Foundation of China (10976017).

## References and links

**1. **D. Malacara, M. Servín, and Z. Malacara, *Interferogram Analysis for Optical Testing* (Marcel Dekker, 1998).

**2. **M. Takeda, H. Ina, and S. Kobayashi, “Fourier-transform method of fringe-pattern analysis for computer-based topography and interferometry,” J. Opt. Soc. Am. **72**(1), 156–160 (1982). [CrossRef]

**3. **W. W. Macy Jr., “Two-dimensional fringe-pattern analysis,” Appl. Opt. **22**(23), 3898–3901 (1983). [CrossRef] [PubMed]

**4. **K. A. Nugent, “Interferogram analysis using an accurate fully automatic algorithm,” Appl. Opt. **24**(18), 3101–3105 (1985). [CrossRef] [PubMed]

**5. **D. J. Bone, H. A. Bachor, and R. J. Sandeman, “Fringe-pattern analysis using a 2-D Fourier transform,” Appl. Opt. **25**(10), 1653–1660 (1986). [CrossRef] [PubMed]

**6. **C. Roddier and F. Roddier, “Interferogram analysis using Fourier transform techniques,” Appl. Opt. **26**(9), 1668–1673 (1987). [CrossRef] [PubMed]

**7. **J. B. Liu and P. D. Ronney, “Modified Fourier transform method for interferogram fringe pattern analysis,” Appl. Opt. **36**(25), 6231–6241 (1997). [CrossRef] [PubMed]

**8. **J. H. Massig and J. Heppner, “Fringe-pattern analysis with high accuracy by use of the Fourier-transform method: theory and experimental tests,” Appl. Opt. **40**(13), 2081–2088 (2001). [CrossRef] [PubMed]

**9. **M. Takeda and K. Mutoh, “Fourier transform profilometry for the automatic measurement of 3-D object shapes,” Appl. Opt. **22**(24), 3977–3982 (1983). [CrossRef] [PubMed]

**10. **M. Kujawinska and J. Wójciak, “Spatial-carrier phase-shifting technique of fringe pattern analysis,” Proc. SPIE **1508**, 61–67 (1991). [CrossRef]

**11. **P. H. Chan, P. J. Bryanston-Cross, and S. C. Parker, “Spatial phase stepping method of fringe-pattern analysis,” Opt. Lasers Eng. **23**(5), 343–354 (1995). [CrossRef]

**12. **M. Servin and F. J. Cuevas, “A novel technique for spatial phase-shifting interferometry,” J. Mod. Opt. **42**(9), 1853–1862 (1995). [CrossRef]

**13. **J. A. Ferrari and E. M. Frins, “Multiple phase-shifted interferograms obtained from a single interferogarm with linear carrier,” Opt. Commun. **271**(1), 59–64 (2007). [CrossRef]

**14. **S. K. Debnath and Y. Park, “Real-time quantitative phase imaging with a spatial phase-shifting algorithm,” Opt. Lett. **36**(23), 4677–4679 (2011). [CrossRef] [PubMed]

**15. **H. Guo, Q. Yang, and M. Chen, “Local frequency estimation for the fringe pattern with a spatial carrier: principle and applications,” Appl. Opt. **46**(7), 1057–1065 (2007). [CrossRef] [PubMed]

**16. **A. Styk and K. Patorski, “Analysis of systematic errors in spatial carrier phase shifting applied to interferogram intensity contrast determination,” Appl. Opt. **46**(21), 4613–4624 (2007). [CrossRef] [PubMed]

**17. **J. Xu, Q. Xu, and H. Peng, “Spatial carrier phase-shifting algorithm based on least-squares iteration,” Appl. Opt. **47**(29), 5446–5453 (2008). [PubMed]

**18. **D. Li, P. Wang, X. Li, H. Yang, and H. Chen, “Algorithm for near-field reconstruction based on radial-shearing interferometry,” Opt. Lett. **30**(5), 492–494 (2005). [CrossRef] [PubMed]

**19. **D. Liu, Y. Yang, L. Wang, and Y. Zhuo, “Real time diagnosis of transient pulse laser with high repetition by radial shearing interferometer,” Appl. Opt. **46**(34), 8305–8314 (2007). [CrossRef] [PubMed]

**20. **Q. Kemao, “Windowed Fourier transform for fringe pattern analysis,” Appl. Opt. **43**(13), 2695–2702 (2004). [CrossRef] [PubMed]

**21. **Q. Kemao, H. Wang, and W. Gao, “Windowed Fourier transform for fringe pattern analysis: theoretical analyses,” Appl. Opt. **47**(29), 5408–5419 (2008). [CrossRef] [PubMed]

**22. **W. Gao, N. T. Huyen, H. S. Loi, and Q. Kemao, “Real-time 2D parallel windowed Fourier transform for fringe pattern analysis using Graphics Processing Unit,” Opt. Express **17**(25), 23147–23152 (2009). [CrossRef] [PubMed]

**23. **L. R. Watkins, S. M. Tan, and T. H. Barnes, “Determination of interferometer phase distributions by use of wavelets,” Opt. Lett. **24**(13), 905–907 (1999). [CrossRef] [PubMed]

**24. **J. Zhong and J. Weng, “Phase retrieval of optical fringe patterns from the ridge of a wavelet transform,” Opt. Lett. **30**(19), 2560–2562 (2005). [CrossRef] [PubMed]

**25. **R. C. Gonzalez and R. E. Woods, *Digital Image Processing*, 3rd ed. (Prentice-Hall, 2007).

**26. **J. Vargas, J. A. Quiroga, and T. Belenguer, “Phase-shifting interferometry based on principal component analysis,” Opt. Lett. **36**(8), 1326–1328 (2011). [CrossRef] [PubMed]

**27. **J. Vargas, J. A. Quiroga, and T. Belenguer, “Analysis of the principal component algorithm in phase-shifting interferometry,” Opt. Lett. **36**(12), 2215–2217 (2011). [CrossRef] [PubMed]

**28. **http://en.wikipedia.org/wiki/Principal_component_analysis

**29. **J. Xu, L. Sun, Y. Li, and Y. Li, “Principal component analysis of multiple-beam Fizeau interferograms with random phase shifts,” Opt. Express **19**(15), 14464–14472 (2011). [CrossRef] [PubMed]

**30. **J. Xu, W. Jin, L. Chai, and Q. Xu, “Phase extraction from randomly phase-shifted interferograms by combining principal component analysis and least squares method,” Opt. Express **19**(21), 20483–20492 (2011). [CrossRef] [PubMed]

**31. **http://en.wikipedia.org/wiki/Principal_component_analysis.

**32. **http://en.wikipedia.org/wiki/Singular_value_decomposition.

**33. **http://en.wikipedia.org/wiki/Karhunen%E2%80%93Lo%C3%A8ve_theorem.