## Abstract

We develop an error-free nonuniform phase-stepping algorithm (nPSA) based on principal component analysis (PCA). PCA-based algorithms typically give phase-demodulation errors when applied to nonuniform phase-shifted interferograms. We present a straightforward way to correct those PCA phase-demodulation errors. We give mathematical formulas to fully analyze PCA-based nPSA (PCA-nPSA). These formulas give a) the PCA-nPSA frequency transfer function (FTF), b) its corrected Lissajous figure, c) the corrected PCA-nPSA formula, d) its harmonic robustness (*R*_{H}), and e) its signal-to-noise-ratio (SNR). We show that the PCA-nPSA can be seen as a linear quadrature filter and, as consequence, one can find its FTF. Using the FTF, we show why plain PCA often fails to demodulate nonuniform phase-shifted fringes. Previous works on PCA-nPSA (without FTF), give specific numerical/experimental fringe data to “visually demonstrate” that their new nPSA works better than its competitors. This often leads to biased/favorable fringe pattern selections which “visually demonstrate” the superior performance of their new nPSA. This biasing is herein totally avoided because we provide figures-of-merit formulas based on linear systems and stochastic process theories. However, and for illustrative purposes only, we provide specific fringe data phase-demodulation, including comprehensive analysis and comparisons.

© 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Phase-shifting interferometry is a widely used optical metrology technique to demodulate the phase from a set of phase-shifted interferograms [1–7]. The demodulated phase contains the searched measuring information from *N* phase-shifted fringe patterns. Traditionally phase shifting algorithms (PSAs) require precise phase-shifting steps, however, it is not easy to be absolutely sure that an interferometer have a zero-error phase shifter. Therefore, methods to estimate nonuniform phase-shifting steps and the desired modulating phase from nonlinear phase-shifted data have been investigated [8–23]. The Lissajous ellipse fitting technique is one of the earliest phase demodulation methods for dealing with nonuniform phase-stepped images [24–26]. If the demodulated analytic signal forms a Lissajous circle, one obtains an error-free measuring phase [24–26]. For erroneous phase demodulation, the Lissajous figure of the analytic signal is not a circle; it is an ellipse. The ellipse fitting method converts the Lissajous ellipse into a Lissajous circle, and the phase demodulation error is eliminated [27–32]. The Lissajous technique is a powerful technique to correct phase demodulation errors; it is currently based on least squares fitting of a rotated and origin-shifted ellipse; this has however its own difficulties which are sometimes not trivially solved [27–32].

Another nonuniform phase-steps algorithm (nPSA) is the principal component analysis (PCA) of phase-shifted fringe data [33–38]; we call this the PCA-nPSA technique. This is a subspace technique because it finds two orthogonal signals from *N* correlated nonuniform phase-shifted fringe images. Plain/unmodified PCA-nPSA demodulates the phase from fringe images without the explicit knowledge about their nonlinear phase shifts. The PCA-nPSA technique has low computational cost, it is linear, non-iterative, and it can deal with spatially varying background illumination and fringe contrast. Therefore, it seems at first glance, that PCA-nPSA would deal with all possible situations of nonuniform/linear phase-shifted phase demodulation [33–38].

In spite of all those good properties, the PCA-nPSA has however some disadvantages which often gives inacceptable phase demodulation errors [37–40]. The PCA-nPSA users may not be aware of the phase-demodulation errors, and may therefore reach erroneous conclusions in phase metrology engineering [37–40]. A well studied PCA-nPSA limitation occurs when less-than-one spatial fringe is present within the fringe pattern [33–40]. But the problem of “few spatial-fringes” is in our view, a pseudo-problem. That is because one can easily introduce as many spatial fringes as desire simply by introducing a large spatial carrier (a large tilt), and the few spatial-fringes “problem” is gone [1]. A more recent attempt, and good review, to improve the PCA-nPSA using the Lissajous figure is given in [40].

In this work we show that the PCA-nPSA can be regarded as a linear quadrature filter applied to nonuniform phase-shifted fringe data. And as any other linear filter, it is possible to find its Fourier spectrum through its frequency transfer function (FTF) [1]. Finding the FTF of the PCA-nPSA one can see the reason why plain PCA often fails to demodulate, error-free, a set of nonuniform phase-shifted data. With the FTF at hand, one can find the signal-to-noise ratio (SNR) and fringe harmonics robustness of the PCA-nPSA from first principles of stochastic process and linear systems theories [1].

## 2. Nonuniform phase-shifting fringe images

We first describe the continuous-time fringe model as,

_{${\omega}_{0}$}is the angular frequency of the fringes. Without loss of generality we assume

*ω*

_{0}= 1.0 (radians/second). The temporal Fourier transform

_{$F[\cdot ]$}of the fringe is,

_{$(x,y)\in L\times L$}, and

_{$i=\sqrt{-1}$}; see Fig. 1.

The temporal continuous fringe in Eq. (1) is sampled at nonuniform times _{$({t}_{n})$} as,

*tn*are not meaningful; the relevant data are the nonuniform phase-steps ${\theta}_{n}={\omega}_{0}{t}_{n}$. Figure 1(a) shows 9 nonlinearly-spaced phase-shifted samples (in red), and Fig. 1(b) the Fourier spectrum of the continuous temporal fringe (in blue).

## 3. PCA-nPSA phase demodulation formula

Principal component analysis (PCA) was invented by Karl Pearson in 1901 [42]. It is a statistical procedure that uses a linear transformation that converts hundreds of correlated observations into a subset of linearly uncorrelated signals called the principal components of the data. In phase-shifting demodulation, the PCA is used to find 2 orthogonal signals (an analytic signal) from few temporal fringe samples. The fact of using a handful (instead of hundreds) of nonuniform phase-shifted data translates into an erroneous phase estimation, making the PCA-nPSA (if not properly corrected) inadequate for precision optical metrology. That is why several works have been published to correct the PCA-nPSA to cope with this residual phase demodulation error [37–41].

We now construct the desired PCA-nPSA formula. We start by modeling *N* nonuniform phase-shifted samples as,

*N*eigenvalues

*λ*and eigenvectors

_{n}**v**of matrix

_{n}_{$C$}as,

_{$({\lambda}_{0},{\lambda}_{1})$}(

_{$C\text{\hspace{0.17em}}{v}_{0}={\lambda}_{0}{v}_{0}$},

_{$C\text{\hspace{0.17em}}{v}_{1}={\lambda}_{1}{v}_{1}$}), then the PCA-nPSA formula is given by,

The first work on PCA as nPSA was presented as a linear algorithm which could demodulate any set of phase-shifted fringes, almost error-free [33]. Afterwards this was found not to be exact and several attempts have been made to improve plain PCA [35,38–40]. However, plain PCA can be combined with the advanced iterative algorithm (AIA), obtaining a PCA-AIA algorithm which reduces the phase-errors left by plain PCA [35]. The PCA calculation provides a good first phase estimation helping the AIA converge faster [35]. Note that the AIA estimates both, the modulating phase _{$\phi (x,y)$} and the nonuniform phase-steps _{$\{{\theta}_{0},{\theta}_{1},\mathrm{...},{\theta}_{N-1}\}$} [35].

## 4. Correcting the Lissajous ellipse of the PCA-nPSA analytic signal

The Lissajous figure of the PCA-nPSA (Eq. (9)) is obtained by the following parametric plot,

**i**and

**j**are the real and imaginary unit vectors. Since the PCA finds orthogonal eigenvectors, these Lissajous ellipses $r\left[\phi \right]$ are always non-rotated; they are easily transformed into circles (with zero phase demodulation error) by first calculating the ratio,

_{$|\cdot |$}denotes the absolute value. Equation (11) is very robust to noise because a single parameter is estimated from an entire image. With

*ρ*, we may transform the Lissajous ellipse into a circle by modifying the plain PCA-nPSA (Eq. (9)) as,

*i.e.*an error-free phase $\mathrm{arg}[{A}_{2}(x,y)]$. Equation (12) constitutes the corrected PCA-nPSA formula. The Lissajous ellipses are then transformed into circles without explicitly knowing the nonuniform phase-steps $\{{\theta}_{0},\mathrm{...},{\theta}_{N-1}\}$.

## 5. Frequency transfer function (FTF) for the PCA-nPSA

The phase-steps $\{{\theta}_{0},\mathrm{...},{\theta}_{N-1}\}$ can be known by combining the PCA and AIA (PCA-AIA) algorithms [35]. Having $\{{\theta}_{0},\mathrm{...},{\theta}_{N-1}\}$ we can obtain the FTF from the PCA-nPSA formula because it may be seen as a convolution product (see [1]),

_{$h(t)$}is the impulse response and $I(x,y,t)$ is the fringe data. The overbar stands for the complex conjugate, and (*) is the linear convolution symbol. The Fourier transform $H(\omega )=F[h(t)]$ is the FTF of the corrected PCA-nPSA,

_{$H(-1)$}is not zero, then one obtains an erroneous analytic signal given by,

## 6. Signal-to-noise ratio gain (*G*_{SNR}) and fringe harmonic robustness

Once the FTF (Eq. (14)) is obtained, one can find the SNR and harmonics robustness of the PCA-nPSA from basic stochastic process and linear systems theories (for more details see pages 48-85 in [1]). Without the FTF people usually rely on particular fringe images (sometimes favorably biased) which may lead to over-optimistic conclusions [9–40].

#### 6.1 Signal-to-noise ratio gain G_{SNR} of the PCA-nPSA formula

_{SNR}

The SNR of the analytic signal (Eq. (13)) for nonuniform sampled fringes corrupted by additive white Gaussian noise (AWGN) with power density $N(\omega )=\eta /2$, $\omega \in (-\pi ,\pi )$ is [1].

_{${G}_{\mathrm{SNR}}$}) as [1],

_{${G}_{\mathrm{SNR}}$}is the SNR-gain of the analytic signal with respect to the SNR of the fringe data. For example

_{${G}_{\mathrm{SNR}}=N$}means that the analytic signal has

*N*-times higher SNR than the fringe data. The figure of merit

_{${G}_{\mathrm{SNR}}$}substantially decreases for highly nonuniform phase-step fringes [41].

#### 6.2 Harmonic robustness R_{H} for N-steps PCA-nPSA

_{H}

Harmonic-distorted phase-shifted fringes may be modeled by,

*k*-th harmonics

*k*= {2,3,...}. Assuming that the harmonics amplitude decreases as

*b*= (1/

_{k}*k*) we define the harmonic robustness as,

_{${R}_{\text{H}}$}figure means high fringe harmonics robustness. In contrast, a low

*R*

_{H}figure means high harmonics power (low harmonics robustness).

## 7. Computer simulations

For illustrative purposes we now offer two simulations for plain and corrected PCA-nPSA applied to 3 and 9 nonuniform phase sampled fringe images. These examples are given to show the Fourier spectral response of plain/corrected PCA-nPSA.

#### 7.1 Plain PCA-nPSA applied to 3 nonuniform phase-step fringe images

Let us start with the 3 nonuniform phase-shifted fringe images shown in Fig. 2 and Fig. 3.

The nonlinear phase-shifting are _{${\theta}_{n}=\{0,\text{\hspace{0.17em}}1.49,\text{\hspace{0.17em}}5.13\}$} radians. The fringes are shown in Fig. 3.

Then we apply the PCA to these 3 images as,

The FTF, $H(\omega )$, of the plain PCA-nPSA is,

#### 7.2 Lissajous figures for plain and corrected PCA-nPSA with 3 phase steps

Figure 5(a) shows the FTF, analytic signal, and Lissajous ellipse of plain PCA-nPSA.

The (noise-robust) correcting factor *ρ* for these 3 nonuniform phase-steps in Fig. 2 is,

*ρ*to correct the PCA-nPSA obtaining the Lissajous circle in Fig. 5(b). From Fig. 5 we see that

*G*

_{SNR}reduces from 1.96 to 1.2. On the other hand, the harmonic robustness

*R*

_{H}decreases from 1.3 to 0.66. That is, the corrected PCA-nPSA is more sensitive to noise and harmonics than plain PCA-nPSA. However, the phase error of plain PCA-nPSA is intolerable (see Fig. 4).

#### 7.3 Lissajous figures for plain and corrected PCA-nPSA with 9 phase steps

To further illustrate our technique, we now present the figures of merit for plain and corrected 9-steps PCA-nPSA. Figure 6 shows 4 out of 9 noiseless fringe images.

Figure 7 shows the 9 phase-steps _{${\theta}_{n}$} = {0, 1.13, 2.49, 1.52, 3.55, 3.78, 6.2, 6.42, 8.74},

Figure 8 shows the FTF, analytic signal, and Lissajous figures of plain PCA and corrected FTF. Plain PCA-nPSA has a SNR-gain of *G*_{SNR} = 8.11, and harmonics robustness of *R*_{H} = 4.316. In contrast, the corrected PCA-nPSA has a SNR-gain of *G*_{SNR} = 7.12, and harmonics robustness of *R*_{H} = 3.381. Again, plain PCA-nPSA has better figure of merits than the corrected PCA-nPSA, but the demodulated phase error is intolerable.

Please note that we omit the demodulated phase and phase-error maps for this 9-step example because they are virtually undistinguishable to Fig. 4 (for 3-steps) and do not contribute to a better understanding of the proposed technique.

## 8. Conclusion

We have presented a very simple way to correct the technique of principal component analysis (PCA) applied to phase-demodulation of nonuniform phase-shifting fringes. We can summarize the contributions of this work as,

- a) We have presented a PCA-nPSA procedure which does not need to vectorize the two-dimensional fringe images (Eqs. (5)-(9)).
- b) The Lissajous figures of the PCA-nPSA demodulated analytic signal are always non-rotated ellipses. These non-rotated ellipses are corrected to circles using a single scale factor (Eqs. (11)-(12)).
- c) Knowing the phase steps
_{$\{{\theta}_{0},{\theta}_{1},\mathrm{...},{\theta}_{N-1}\}$}, one can find the PCA-nPSA Fourier spectral response_{$H(\omega )$}or frequency transfer function (FTF). - d) The FTF of the PCA-nPSA is then used to estimate the SNR-gain (
*G*_{SNR}), for fringes corrupted by additive white Gaussian noise, and the harmonics robustness*R*_{H}for the plain/corrected PCA-nPSA (Eqs. (19) and (22)). - e) We have shown that plain PCA-nPSA has better SNR and harmonics robustness (
*R*_{H}) than corrected PCA-nPSA. But plain PCA-nPSA produces, in general, inacceptable phase demodulation errors.

In brief, we have shown that the cost for correcting plain PCA's demodulated phase are small decreases in SNR and harmonics robustness.

## References

**1. **M. Servin, J. A. Quiroga, and M. Padilla, *Fringe Pattern Analysis for Optical Metrology*, (WILEY-VCH, 2014).

**2. **H. Schreiber and J. H. Bruning, “Phase shifting interferometry,” in Optical Shop Testing (Wiley, 2006), pp. 547–666.

**3. **Y.-Y. Cheng and J. C. Wyant, “Multiple-wavelength phase-shifting interferometry,” Appl. Opt. **24**(6), 804–807 (1985). [CrossRef] [PubMed]

**4. **H. Medecki, E. Tejnil, K. A. Goldberg, and J. Bokor, “Phase-shifting point diffraction interferometer,” Opt. Lett. **21**(19), 1526–1528 (1996). [CrossRef] [PubMed]

**5. **I. Yamaguchi and T. Zhang, “Phase-shifting digital holography,” Opt. Lett. **22**(16), 1268–1270 (1997). [CrossRef] [PubMed]

**6. **Y. Awatsuji, M. Sasada, and T. Kubota, “Parallel quasi-phase-shifting digital holography,” Appl. Phys. Lett. **85**(6), 1069–1071 (2004). [CrossRef]

**7. **K. Ishikawa, K. Yatabe, N. Chitanont, Y. Ikeda, Y. Oikawa, T. Onuma, H. Niwa, and M. Yoshii, “High-speed imaging of sound using parallel phase-shifting interferometry,” Opt. Express **24**(12), 12922–12932 (2016). [CrossRef] [PubMed]

**8. **G. Lai and T. Yatagai, “Generalized phase-shifting interferometry,” J. Opt. Soc. Am. A **8**(5), 822–827 (1991). [CrossRef]

**9. **K. Okada, A. Sato, and J. Tsujiuchi, “Simultaneous calculation of phase distribution and scanning phase shift in phase shifting interferometry,” Opt. Commun. **84**(3-4), 118–124 (1991). [CrossRef]

**10. **I.-B. Kong and S.-W. Kim, “General algorithm of phase-shifting interferometry by iterative least-squares fitting,” Opt. Eng. **34**(1), 183–188 (1995). [CrossRef]

**11. **Z. Wang and B. Han, “Advanced iterative algorithm for phase extraction of randomly phase-shifted interferograms,” Opt. Lett. **29**(14), 1671–1673 (2004). [CrossRef] [PubMed]

**12. **A. Patil and P. Rastogi, “Approaches in generalized phase shifting interferometry,” Opt. Lasers Eng. **43**(3-5), 475–490 (2005). [CrossRef]

**13. **H. Guo, Y. Yu, and M. Chen, “Blind phase shift estimation in phase-shifting interferometry,” J. Opt. Soc. Am. A **24**(1), 25–33 (2007). [CrossRef] [PubMed]

**14. **X. F. Xu, L. Z. Cai, Y. R. Wang, X. F. Meng, W. J. Sun, H. Zhang, X. C. Cheng, G. Y. Dong, and X. X. Shen, “Simple direct extraction of unknown phase shift and wavefront reconstruction in generalized phase-shifting interferometry: algorithm and experiments,” Opt. Lett. **33**(8), 776–778 (2008). [CrossRef] [PubMed]

**15. **P. Gao, B. Yao, N. Lindlein, K. Mantel, I. Harder, and E. Geist, “Phase-shift extraction for generalized phase-shifting interferometry,” Opt. Lett. **34**(22), 3553–3555 (2009). [CrossRef] [PubMed]

**16. **J. Deng, H. Wang, D. Zhang, L. Zhong, J. Fan, and X. Lu, “Phase shift extraction algorithm based on Euclidean matrix norm,” Opt. Lett. **38**(9), 1506–1508 (2013). [CrossRef] [PubMed]

**17. **H. Guo and Z. Zhang, “Phase shift estimation from variances of fringe pattern differences,” Appl. Opt. **52**(26), 6572–6578 (2013). [CrossRef] [PubMed]

**18. **R. Juarez-Salazar, C. Robledo-Sánchez, C. Meneses-Fabian, F. Guerrero-Sánchez, and L. A. Aguilar, “Generalized phase-shifting interferometry by parameter estimation with the least squares method,” Opt. Lasers Eng. **51**(5), 626–632 (2013). [CrossRef]

**19. **J. Deng, L. Zhong, H. Wang, H. Wang, W. Zhang, F. Zhang, S. Ma, and X. Lu, “1-Norm character of phase shifting interferograms and its application in phase shift extraction,” Opt. Commun. **316**, 156–160 (2014). [CrossRef]

**20. **Q. Liu, Y. Wang, J. He, and F. Ji, “Phase shift extraction and wavefront retrieval from interferograms with background and contrast fluctuations,” J. Opt. **17**(2), 025704 (2015). [CrossRef]

**21. **J. Deng, D. Wu, K. Wang, and J. Vargas, “Precise phase retrieval under harsh conditions by constructing new connected interferograms,” Sci. Rep. **6**(1), 24416 (2016). [CrossRef] [PubMed]

**22. **Y. Xu, Y. Wang, Y. Ji, H. Han, and W. Jin, “Three-frame generalized phase-shifting interferometry by a Euclidean matrix norm algorithm,” Opt. Lasers Eng. **84**, 89–95 (2016). [CrossRef]

**23. **X. Xu, X. Lu, J. Tian, J. Shou, D. Zheng, and L. Zhong, “Random phase-shifting interferometry based on independent component analysis,” Opt. Commun. **370**, 75–80 (2016). [CrossRef]

**24. **K. Kinnstaetter, A. W. Lohmann, J. Schwider, and N. Streibl, “Accuracy of phase shifting interferometry,” Appl. Opt. **27**(24), 5082–5089 (1988). [CrossRef] [PubMed]

**25. **C. T. Farrell and M. A. Player, “Phase step measurement and variable step algorithms in phase-shifting interferometry,” Meas. Sci. Technol. **3**(10), 953–958 (1992). [CrossRef]

**26. **C. T. Farrell and M. A. Player, “Phase-step insensitive algorithms for phase-shifting interferometry,” Meas. Sci. Technol. **5**(6), 648–654 (1994). [CrossRef]

**27. **A. Albertazzi Jr., A. V. Fantin, D. P. Willemann, and M. E. Benedet, “Phase maps retrieval from sequences of phase shifted images with unknown phase steps using generalized N-dimensional Lissajous figures—principles and applications,” Int. J. Optomechatronics **8**(4), 340–356 (2014). [CrossRef]

**28. **C. Meneses-Fabian and F. A. Lara-Cortes, “Phase retrieval by Euclidean distance in self-calibrating generalized phase-shifting interferometry of three steps,” Opt. Express **23**(10), 13589–13604 (2015). [CrossRef] [PubMed]

**29. **F. Liu, Y. Wu, and F. Wu, “Correction of phase extraction error in phase-shifting interferometry based on Lissajous figure and ellipse fitting technology,” Opt. Express **23**(8), 10794–10807 (2015). [CrossRef] [PubMed]

**30. **F. Liu, Y. Wu, F. Wu, and W. Song, “Generalized phase shifting interferometry based on Lissajous calibration technology,” Opt. Lasers Eng. **83**, 106–115 (2016). [CrossRef]

**31. **F. Liu, J. Wang, Y. Wu, F. Wu, M. Trusiak, K. Patorski, Y. Wan, Q. Chen, and X. Hou, “Simultaneous extraction of phase and phase shift from two interferograms using Lissajous figure and ellipse fitting technology with Hilbert Huang prefiltering,” J. Opt. **18**(10), 105604 (2016). [CrossRef]

**32. **B. Kimbrough, “Correction of errors in polarization based dynamic phase shifting interferometers,” Int. J. Optomechatronics **8**(4), 304–312 (2014). [CrossRef]

**33. **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]

**34. **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]

**35. **J. Vargas, C. Sorzano, J. Estrada, and J. Carazo, “Generalization of the principal component analysis algorithm for interferometry,” Opt. Commun. **286**, 130–134 (2013). [CrossRef]

**36. **J. Vargas and C. Sorzano, “Quadrature component analysis for interferometry,” Opt. Lasers Eng. **51**(5), 637–641 (2013). [CrossRef]

**37. **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]

**38. **J. Deng, K. Wang, D. Wu, X. Lv, C. Li, J. Hao, J. Qin, and W. Chen, “Advanced principal component analysis method for phase reconstruction,” Opt. Express **23**(9), 12222–12231 (2015). [CrossRef] [PubMed]

**39. **K. Yatabe, K. Ishikawa, and Y. Oikawa, “Improving principal component analysis based phase extraction method for phase-shifting interferometry by integrating spatial information,” Opt. Express **24**(20), 22881–22891 (2016). [CrossRef] [PubMed]

**40. **K. Yatabe, K. Ishikawa, and Y. Oikawa, “Simple, flexible, and accurate phase retrieval method for generalized phase-shifting interferometry,” J. Opt. Soc. Am. A **34**(1), 87–96 (2017). [CrossRef] [PubMed]

**41. **M. Servin, M. Padilla, G. Garnica, and G. Paez, “Design of nonlinearly spaced phase-shifting algorithms using their frequency transfer function,” Appl. Opt. **58**(4), 1134–1138 (2019). [CrossRef] [PubMed]

**42. **K. Pearson, “On Lines and Planes of Closest Fit to Systems of Points in Space,” Philos. Mag. **2**(11), 559–572 (1901). [CrossRef]