**2π**discontinuities. The difference between the correct phase and the wrapped phase is the phase wrapping map. A new method for phase unwrapping is presented by identifying the phase wrapping map as a sequence of binary valued intermediate wrapping maps and iteratively removing them producing the correct phase by phase-wrapped unfolding. A path-following algorithm is presented to exemplify the phase wrapped unfolding method.

## 1.

## Introduction

Phase extraction methods are used in different coherent signal processing areas, such as optical and microwave interferometry,^{1} magnetic resonance imaging,^{2} synthetic aperture radar,^{3} and Fourier transform optical coherent tomography,^{4} among others. In these areas, the signal modulates a harmonic function and phase extraction algorithms are used to recover the signal. The recovered signal within the principal branch of the harmonic function exhibits a series of discontinuities, which need to be removed to obtain the real signal. This process, known as phase unwrapping, is the final phase extraction step. We collect these discontinuities in a wrapping map, normally overlooked based on the principle that the proposed methods aim to recover the real phase map knowing its expected continuity properties. Since phase unwrapping was first showed in optical interferometry phase extraction,^{5}^{,}^{6} there have been extensive studies to recover the correct phase map. Because of the presence of noise, signal discontinuities, and undersampling, phase unwrapping is considered to be one of the most difficult problems in mathematics and engineering.^{7} To date, there are two main approaches to the phase unwrapping problem, which can be classified in path following methods of minimum-norm methods.^{8}9.^{–}^{10} Independent of the approach, a definite solution for phase unwrapping remains an open problem.

On this note, an alternative solution to the phase unwrapping problem focusing on the properties of the phase wrapping map instead of the real phase signal properties is presented.

## 2.

## Phase Unfolding

Phase extraction methods retrieve a wrapped phase from a harmonic function confined in the main branch of the function, which is normally a $2\pi $ band in either [$\mathrm{0,2}\pi $) or [$-\pi ,\pi $). Because phase is a relative quantity, we can focus only on the [$\mathrm{0,2}\pi $) band without loss of generality. In order to obtain an insight on the phase unwrapping problem instead of looking at the problem as the final step in a phase extraction methods as is customary, let us look at the problem from the solution point of view. In other words, starting from the correct phase map $U$ [Fig. 1(a)], the wrapped phase ${U}_{w}$ is obtained [Fig. 1(b)] by adding multiples of $2\pi $ [Fig. 1(c)] to contain ${U}_{w}$ in the [$\mathrm{0,2}\pi $) band. The form of the integer-valued correcting field [Fig. 1(c)], or phase wrapping map $M$, is dependent on the properties of $U$.

The aim of the phase unwrapping methods aforementioned is to add a correct multiple of $2\pi $ to the wrapped phase such that a continuous unwrapped phase map is reconstructed. These methods focus on the properties of the expected phase map $U$ and the challenge is to restore a function free of the $2\pi $ jumps.

As mentioned, instead of focusing in the properties of $U$, here we investigate the properties of the phase wrapping map $M$. To be more precise, focus on an alternative construction of $M$. To do such and bearing in mind that if the phase map $U$ is sampled with scaled harmonic functions with a multiple of $2\pi $ periodicity, in principle, we can obtain the correct solution after an adequate phase unwrapping procedure. Considering using powers of two multiples of $2\pi $ (${2}^{n}\pi $) is of particular interest. By using this approach, an insight on the phase wrapping map is obtained and it is found that it can be properly decomposed by simpler phase wrapping maps.

The first task is to obtain the minimum power of two multiples of $2\pi $, which contains $U$. This is, look for $N$, which is the minimum integer such that

After determining this number, consider wrapping planes in subpowers of two multiples of $2\pi :{2}^{N-1}\pi $, ${2}^{N-2}\pi ,\dots ,4\pi $, $2\pi $ (Fig. 2) in such a way that iterative wrapping maps ${M}_{1},{M}_{2},\dots ,{M}_{N-1}$, ${M}_{N}$ [Figs. 3(b), 3(d), 3(f), and 3(h)] are obtained by wrapping the immediate previous wrapped function ($U+{M}_{1}\xb7{2}^{N-1}\pi +{M}_{2}\xb7{2}^{N-2}\pi +\dots +{M}_{n}\xb7{2}^{N-n}\pi $) by the next subpower of two multiples of $2\pi $. By doing so the $n$’th wrapping map has binary values: zero or ${2}^{N-n+1}\pi $. Notice that by construction, the position, but not necessarily the sign, of the phase jumps for each wrapping map is contained in the next one. Thus, the following intermediate wrapped functions are constructed [Figs. 3(a), 3(c), 3(e), and 3(g)]:

## (3)

$$\{\begin{array}{l}{U}_{w,0}=U;|{U}_{w,0}|\le {2}^{N}\pi \\ \text{\hspace{0.17em}}{U}_{w,1}={U}_{\mathrm{w},0}-{M}_{1}\xb7{2}^{N-1}\pi ;|{U}_{w,1}|={2}^{N-1}\pi \\ \begin{array}{c}\vdots \\ \begin{array}{c}{U}_{w,N-2}=\mathrm{U}-\cdots -{M}_{N-2}\xb74\pi \\ ={U}_{\mathrm{w},\mathrm{N}-3}-{M}_{N-2}\xb74\pi \end{array};\phantom{\rule[-0.0ex]{1em}{0.0ex}}|{U}_{w,N-2}|=4\pi \\ \text{\hspace{0.17em}}\begin{array}{c}{U}_{w}=\mathrm{U}-\cdots -{M}_{N-1}\xb72\pi \\ ={U}_{\mathrm{w},\mathrm{N}-2}-{M}_{N-1}\xb72\pi \end{array};\phantom{\rule[-0.0ex]{1em}{0.0ex}}|{U}_{w}|=2\pi \end{array}\end{array}\mathrm{.}$$The wrapping map down to the main branch ($2\pi $) is therefore the sum of the binary intermediate wrapping maps.

Using this approach instead of finding the correct multiple of $2\pi $ for phase unwrapping, the solution is reduced to reconstruct each step backward. In other words, instead of unwrapping the phase, we iteratively unfold the phase.

where ${\varphi}_{n}={2}^{N-n}\pi $. Unfolding the phase consists on finding and removing iteratively ${M}_{n}$. The benefit is that the partial wrapping map ${M}_{n}$ consists of only zeroes and ones.In spite of the apparent advantage using this binary approach, the unfolding problem is as complex as the unwrapping approach. This complexity is made evident by manipulating an intermediate wrapped function ${U}_{w,n}$ placed on top of itself, thus mimicking one unfolding step. Using this construction, it is found that each point has two possible solutions (Fig. 4):

## (7)

$${U}_{w,n-1}^{II}={U}_{w,n-1}-2\text{\hspace{0.17em}}\text{\hspace{0.17em}}{M}_{n}{\varphi}_{n}+\text{\hspace{0.17em}}\text{\hspace{0.17em}}{\varphi}_{n}.$$## 3.

## Path-Following Phase Unfolding Algorithm

Different approaches for unfolding the phase have been explored. Here, a straightforward path following method is presented. In order to implement the basic path following phase unfolding process, notice that if the intermediate phase wrapped function ${U}_{n}$ is shifted by ${\varphi}_{n}/2$, the following folding step produces the same wrapped function ${U}_{n+1}$. This property is used to simplify the unfolding process. Thus, the path following phase unfolding process can be performed by splitting the task down into the following steps:

1. Start with an intermediate wrapped function ${U}_{w,n}={U}_{w,n-1}+{M}_{n}{\varphi}_{n}$ and roll the phase within its [$0,{\varphi}_{n}$] domain by ${\varphi}_{n}/2$. This is done by adding ${\varphi}_{n}/2$ to values lower than half the step amplitude (${\varphi}_{n}$) and subtracting ${\varphi}_{n}/2$ to the upper half values [Figs. 5(a) and 5(b)]. The resulting intermediate wrapped phase is ${U}_{w,n-1}+{O}_{n}{\varphi}_{n}$, where ${O}_{n}$ is the correspondent phase wrapping map for the ${\varphi}_{n}/2$ shifted ${U}_{w,n}$ function.

2. Subtract the previous two functions [Fig. 5(c)]:

## (8)

$$({U}_{w,n-1}-{O}_{n}{\varphi}_{n})-({U}_{w,n-1}-{M}_{n}{\varphi}_{n})=({M}_{n}-{O}_{n}){\varphi}_{n}\phantom{\rule{0ex}{0ex}}={M}_{n+1}{\varphi}_{n}-{\varphi}_{n}/2$$This is a binary function, which by construction contains the position of the unknown phase jumps of ${M}_{n}$. It also contains intercalated the phase jumps of ${O}_{n}$

3. Initialize an unfolding variable ${S}_{w}$ to zero.

4. Starting from the first sample of the left, calculate the difference in the function resulting from Eq. (8) between the current sample ($j$) and its direct adjacent right-hand neighbor ($j+1$). Only pay attention to nonzero differences.

5. For the nonzero difference points identified in step 4, if the difference between adjacent values of ${U}_{n}$ added to ${S}_{w}$ is larger than ${\varphi}_{n}/2\{{U}_{n}(j)-{U}_{n}(j+1)+{S}_{w}>{\varphi}_{n}/2?$}:

a. if ${S}_{w}$ is zero, assign $sg{n}_{w}{\phi}_{n}$ to it.

b. if ${S}_{w}$ is nonzero, assign zero to it.

This step selects between the two possible paths ${M}_{n}$ or ${O}_{n}$.

6. In parallel to steps 4 and 5, starting from the first sample on the left, add ${S}_{w}$ to ${U}_{w,n}$ (${U}_{w,n-1}={U}_{w,n}+{S}_{w}$).

7. Continue steps 4, 5, and 6 to the right-hand samples until all the samples have been processed. This concludes an unfolding step and ${U}_{w,n-1}$ has been obtained.

8. Double the value of ${\varphi}_{n}$ (${\varphi}_{n-1}=2{\varphi}_{n}$) and repeat steps 1 through 7 using the obtained ${U}_{w,n-1}$.

9. Continue until the difference in Eq. (8) is constant and/or smaller than a given threshold ($\varphi /4$ for instance) and exit in step 2.

Using this procedure after $N-1$ iterations, in which the final value of $\varphi $ is ${2}^{N}\pi $, the correct phase map $U$ is recovered. The algorithm performs the unfolding procedure by locating phase jumps on a binary function ${M}_{n+1}$ governed by Eq. (8). Therefore, in contrast to regular phase unwrapping techniques instead of searching for discontinuities on a stepwise continuous function ${U}_{n}$ at each point to execute the unwrapping decision like ice walking the unfolding decision is made only on abrupt changes in ${M}_{n+1}$ in a cliff hopping manner.

Phase unfolding produces $N-1$ times more operations than phase unwrapping methods but has the advantage that the number of discontinuity correcting decisions is reduced to the phase jumps clearly identified on ${M}_{n+1}$ [Eq. (8)], which decrease on each iteration. Phase unfolding also has the same restrictions than conventional phase unwrapping: is limited by signal noise, under sampling beyond Shannon–Nyquist limit and discontinuities in the wrapped signal. Furthermore, the first iteration in the unfolding algorithm requires an additional downfolding the wrapped phase to half of the main branch [Fig. 3(h)], thus increasing the sampling limitations to fulfill the Shannon–Nyquist limit. On the other hand, errors due to false wrapping do not propagate as it does in the path following phase unwrapping because of the local phase jump detection in Eq. (7).

As an example of the phase unfolding algorithm, a unitary circle function closely related to third order spherical aberration with $15\pi $ amplitude is analyzed (Fig. 6). Figure 6(a) shows the expected result of a phase extraction method confined in the [$\mathrm{0,2}\pi $) band. In this case, $N$ is 4 (${2}^{4}\pi >15\pi >{2}^{3}\pi $), therefore unfolding phase unwrapping is achieved in three steps as shown. On each consecutive step [Figs. 6(b)–6(d)], the phase unfolds as a folding cup opening until the correct phase map $U$ is recovered in Fig. 6(d).

For the simple path following the method demonstrated, phase unfolding presents some advantages with respect to phase unwrapping, namely the correct identification of phase jumps, a decrease number of discontinuity correcting decisions and splitting the problem to binary maps [Eq. (5)]. It also presents disadvantages such as tighter limitation in the sampling period and the number of computational steps. Both approaches are similarly sensitive to signal noise or discontinuities in the signal. Comparable computational time has been observed using either approach. Further research is required to incorporate simultaneously the properties of both the real phase map $U$ and the phase wrapping map $M$ in phase unwrapping or unfolding algorithms. Additional studies also need to be conducted to fully determine the effect of the wrapping map decomposition [Eqs. (4) and (5)] on either path following or minimum norm unwrapping methods.

## 4.

## Conclusions

In conclusion, an alternative method for phase unwrapping, named phase unfolding, has been presented by exploring the properties of the phase wrapping map decomposed in a series of binary intermediate wrapping maps. An effective iterative algorithm for path following phase unfolding was also presented, identifying some advantages and disadvantages with respect to standard phase unwrapping.

## Acknowledgments

The author would like to thank Dr. Blas M. Rodriguez-Lara for fruitful discussions. This work was partially funded by grant CONACyT CB-2011-01-168558.

## References

M. A. Schofield and Y. Zhu, “Fast phase unwrapping algorithm for interferometric applications,” Opt. Lett. 28(14), 1194–1196 (2003).OPLEDP0146-9592http://dx.doi.org/10.1364/OL.28.001194Google Scholar

L. Ying, “Phase unwrapping,” in Wiley Encyclopedia of Biomedical Engineering, and M. Akay, Ed., John Wiley & Sons, Hoboken, New Jersey (2006).Google Scholar

B. Osmanoglu et al., “On the importance of path for phase unwrapping in synthetic aperture radar interferometry,” Appl. Opt. 50(19), 3205–3220 (2011).APOPAI0003-6935http://dx.doi.org/10.1364/AO.50.003205Google Scholar

N. A. Nassif et al., “In vivo high-resolution video-rate spectral-domain optical coherence tomography of the human retina and optic nerve,” Opt. Express 12(3), 367–376 (2004).OPEXFF1094-4087http://dx.doi.org/10.1364/OPEX.12.000367Google Scholar

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).JOSAAH0030-3941http://dx.doi.org/10.1364/JOSA.72.000156Google Scholar

K. Itoh, “Analysis of the phase unwrapping algorithm,” Appl. Opt. 21(14), 2470–2470 (1982).APOPAI0003-6935http://dx.doi.org/10.1364/AO.21.002470Google Scholar

D. Ghiglia and M. Pritt, Two-Dimensional Phase Unwrapping Theory, Algorithms and Software, John Wiley & Sons, Hoboken, New Jersey (1998).Google Scholar

V. V. Volkov and Y. Zhu, “Deterministic phase unwrapping in the presence of noise,” Opt. Lett. 28(22), 2156–2158 (2003).OPLEDP0146-9592http://dx.doi.org/10.1364/OL.28.002156Google Scholar

M. Servin et al., “Phase unwrapping with a regularized phase-tracking system,” Appl. Opt. 37(10), 1917–1923 (1998).APOPAI0003-6935http://dx.doi.org/10.1364/AO.37.001917Google Scholar

H. Y. H. Huang et.al., “Path-independent phase unwrapping using phase gradient and total-variation (TV) denoising,” Opt. Express 20(13), 14075–14089 (2012).OPEXFF1094-4087http://dx.doi.org/10.1364/OE.20.014075Google Scholar