PROCEEDINGS OF SPIE SPIEDigitalLibrary.org/conference-proceedings-of-spie Residue determined threshold phase unwrapping method Fang, Meiqi, Zhao, Hong, Jia, Pingping Meiqi Fang, Hong Zhao, Pingping Jia, "Residue determined threshold phase unwrapping method," Proc. SPIE 11351, Unconventional Optical Imaging II, 113511L (30 March 2020); doi: 10.1117/12.2554971 Event: SPIE Photonics Europe, 2020, Online Only Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use Residue determined threshold phase unwrapping method Meiqi Fang a, Hong Zhao b, # and Pingping Jia c State Key Laboratory for Manufacturing Systems Engineering, Xi'an Jiaotong University, Xi'an, Shaanxi, 710049, P. R. China. a yqfang@stu.xjtu.edu.cn, bzhaohong@mail.xjtu.edu.cn, cjpp8084@163.com # corresponding author Abstract. In this paper, we propose a robust phase unwrapping algorithm that can be applied to optic interferometry based on combing the theory of residues and local phase information to mask out the discontinuous regions in the unwrapping. Unlike previous methods, which require subjective appraisal to determine the threshold value of the second differences in a locally unwrapped phase empirically, this technique sets the threshold value in a straightforward way. The technique aims to minimize the loss of phase information produced by erroneous distinguished pixels, and simplifies the unwrapping process. Experimental results on complex discontinuous objects are presented to illustrate the validity of this technique. Keywords: Phase unwrapping, Phase measurement, Phase difference, Fringe analysis, Fringe projection profilometry. 1. Introduction Phase unwrapping is an essential technique command in various techniques that utilize phase information to obtain desired physical quantities, such as synthetic aperture radar [1], magnetic resonance imaging [2], digital holography [3] and fringe projection profilometry [4]. The problem is that, since existed techniques that used to extract phase information from the measured data involve periodic function calculations, only principal values of the phase lie in (-π, π] are returned [5]. Thus, these phase values are termed “wrapped”, and a phase unwrapping process is required to remove these created discontinuities and recover the true original phase. Phase unwrapping problem is trivial when the measured phase data is obtained in an idealized situation. However, when work with the data acquired from practical situations in the presence of noise or genuine discontinuities, phase unwrapping problem becomes difficult and even impossible. To solve these problems, one major effort based on determining specific paths to guide the unwrapping process in the wrapped phase image has been investigated [5-7]. By contrast with an alternative class of methods that estimate the phase data through fitting two-dimensional gradients [8], this category of path following unwrapping algorithms is so called “path dependent”. Among the path-following unwrapping methods, branch-cuts method that proposed by Goldstein et. all [7] is the most representative one. This approach is based on the theory of residues that aims to restrict the impact caused by noise to local isolated points or regions. Branch-cuts are constructed between the residues with opposite charges as barriers to prevent any path crossing it during the unwrapping process. Although this technique is known to be robust, only an approximate unwrapped phase can be achieved. Different criterion of residue matching will lead to different branch cuts, which are contradicted with the uniqueness of the desired physical quantity. To solve this contradiction problem aroused by lack of additional information from the local phase, Bone [9] proposed a more robust unwrapping technique by investigating the second differences of the locally unwrapped phase in the wrapped phase map to mask out the regions that corrupted by noise. The main limitation of this technique stems from the fact that threshold value of the second differences of the local phase cannot be determined automatically during the computer calculation, it has to be determined subjectively from the person who implemented this algorithm. More phase information would be lost if the threshold is set too high, whereas the erroneous points would not be masked out and may cause error propagation during the unwrapping process when a lower threshold is used. Unconventional Optical Imaging II, edited by Corinne Fournier, Marc P. Georges, Gabriel Popescu, Proc. of SPIE Vol. 11351, 113511L · © 2020 SPIE · CCC code: 0277-786X/20/$21 · doi: 10.1117/12.2554971 Proc. of SPIE Vol. 11351 113511L-1 Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use In this paper, we proposed an automatic phase unwrapping method based on investigating the connection between the second differences and the residues within the local wrapped phase map. Through estimating the second differences of the residues associated points, the threshold value is determined in automatically. One of the major advantages is that via this approach, the lost phase information associated with the physical quantity is minimized. Meanwhile, the experimentally determined threshold value of the local phase proposed by Bone [9] has been displaced, which give rise to a simplified implementation process of unwrapping. We described the details principle of the proposed method in section 2 and illustrated a set of experimental results on complex discontinuous objects to verify this approach in section 3. 2. Algorithm 2.1 The calculation of the second differences threshold To utilize the relationship between the second differences and the residues with a same wrapped phase map, we could first calculate each of them simultaneously. … (m, n 1) … (m 1, n ) (m, n ) (m, n 1) (m 1, n ) (m 1, n 1) … … Fig. 1. Calculation of the residues and the second differences in an image. The solid black dots represent the detected residues. Generally, the phase unwrapping problem can be modeled as (m, n) (m, n) 2 k (m, n), (1) where (m, n) is a two-dimensional discretized phase array of a wrapped phase, (m, n) is the original true phase need to be recovered, and k (m, n) is an array of integers chosen so that - < (m, n) . The residue, q (m, n ), can be then found by the relationship [5] 1 2 q (m, n ) Round 1 = Round 2 4 i m, n i 1 4 i m , n i 1 where the Round operator returns the nearest integer, (m, n) (m, n) , and i is the difference operator so that Proc. of SPIE Vol. 11351 113511L-2 Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use (2) is the wrapping operator satisfies 1 m, n m, n 1 m, n , 2 m, n m 1, n 1 m, n 1 , 3 m, n m 1, n m 1, n 1 , (3) 4 m, n m, n m 1, n . In parallel, the second differences of the local unwrapped phase of (m, n) could be performed by the following relationship [9] xx m , n m 1, n m , n = m , n m 1, n yy m , n m , n 1 m , n = m , n m , n 1 , (4) where is a simple unwrapping operation to remove any 2π steps between two adjacent points, and xx , yy are the second differences of the horizontal and vertical directions, respectively. Combining Eqs. (3) and (4), we can derive Threshold Mean2 xx q m, n +Mean2 yy q m, n , (5) where the Mean operator returns the mean value of the summation. Referring to Fig.1, This threshold only calculated for all the points associated with the detected residues in the field. 2.2 Unwrapping process Once the threshold value of the second differences is determined, a bit-map mask overlaid on the phase field can be constructed by selecting the points whose second difference exceed the determined threshold. Then the mask bit is set to exclude that point from the unwrapping. The mask is initially assumed to be false in the region to be unwrapped. Because the basic process conditions have been established, one can then use an algorithm that able to unwrap regions of arbitrary shape. So we used an algorithm that is essentially the same as that used by Bone [9]. The algorithm is based on the flood fill algorithm and the counterpart steps required to implement a simple phase unwrapping operation are as follows: Step 1. Select a starting pixel from the reset (the bit of the mask that set to false) regions. Step 2. Check each of the four neighbors of the point. If the bit in the bit map corresponding to a neighbor that is not set, add 2k to the phase of the point, with k chosen to ensure that the absolute phase difference from the center point (m, n) is / 2. Step 3. Perform Steps 1and 2 repeatedly unless all the isolated regions associated with the reset mark are unwrapped. After this last step, each of the identified regions in (m, n) will be successfully unwrapped. The remaining area of the masked out regions usually contains no useful phase information or is so strongly aliased that cannot be recovered. 3. Experimental Results The results of the application of our algorithm, based on the theory of Section 2, are shown in Fig 2. Figure 2(a) shows a wrapped phase map obtained by the phase stepping algorithm applied to the image of a fringe projection pattern projected on the surface of a plaster model of Venus. Proc. of SPIE Vol. 11351 113511L-3 Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use This wrapped phase map has noise and discontinuities because the fringe pattern is affected by factors such as regions of low luminosity, ambient noise, and the shadows caused by the angle between the located positions of the projector and the CCD camera. (a) (b) (c) (d) (e) (f) Fig. 2. Experimental results of the proposed algorithm: (a) The wrapped phase map of the Venus plaster model, (b) (c) the unwrapped phase results in 2D and 3D forms performed by the method [9] proposed by Bone, respectively. (d) residues determined mask with a threshold second difference of 0.43π, (e) (f) the unwrapped phase results in 2D and 3D forms performed by the proposed algorithm, respectively. Figure 2(b) and (c) show the results of the phase unwrapping operation over the phase map of Fig.2(a) performed by a Bone algorithm [9]. As can be observed, phase errors occur in this unwrapped phase map, which is not sufficiently recovered from the original wrapped phase. Proc. of SPIE Vol. 11351 113511L-4 Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use Figures 2(d-f) shows the results of the phase unwrapping process applied to the same phase map of Fig. 2(a), this time using the algorithm proposed in this paper. Figure 2(d) shows the mask determined by the threshold using the Eq. (5) in Section 2. It can be observed that they are positioned at locations where the steep gradients occurs, thus verified the efficiency of our algorithm for detecting and localizing those points that are critical for the phase unwrapping process. They are the minimum number of points that can cause phase information errors. The unwrapped results are shown in Figs. 2(e) and (f), respectively. By comparing Figs. 2(e) and (f) and 2(b) and (c), one can conclude that our algorithm enhanced the quality of the unwrapped results when compared with a Bone algorithm. The 3D profile determination of a plaster model represents a practical example of the potential application of our technique. 4. Conclusion In conclusion, the proposed algorithm has high immunity to noise and discontinuities with an automatic determined threshold value of the second differences. This is because of our approach uses the connection between the residues and the local phase information, always preventing the unnecessary loss of the phase information caused by an experimentally determined threshold value. This major advantage simplifies and facilitates the application of the proposed technique in practical situations when accurate unwrapped phase results are required. Funding. The project of National Natural Science Foundation of China (No.61975161). REFERENCES 1. H. Yu, and Y. Lan, “Robust Two-Dimensional Phase Unwrapping for Multibaseline SAR Interferograms: A TwoStage Programming Approach,” IEEE transactions on geoscience and remote sensing 54(9), 5217-5225 (2016). 2. H. Mamin, M. Kim, M. H. Sherwood, C. T. Rettner, K. Ohno, D. D. Awschalom and D. Rugar, “Nanoscale nuclear magnetic resonance with a nitrogen-vacancy spin sensor,” Science 339(6119), 557-560 (2013). 3. Y. Lee, Y. Ito, T. Tahara, J. Inoue, P. Xia, Y. Awatsuji, K. Nishio, S. Ura and O. Matoba, “Single-shot dualwavelength phase unwrapping in parallel phase-shifting digital holography,” Optics letters 39(8), 2374-2377 (2014). 4. J. Antonio Rayas, M. Leon-Rodriguez, A. Martinez, K. Genovese, O. M. Medina, R. R. Cordero, “Using a single-cube beam-splitter as a fringe pattern generator within a structured-light projection system for surface metrology,” Optical Engineering 56(4), (2017). 5. D. C. Ghiglia, and M. D. Pritt, Two-dimensional phase unwrapping: theory, algorithms, and software, Wiley New York: (1998). 6. M. A. Gdeisat, D. R. Burton, F. Lilley, M. Arevalillo-Herráez and M. M. M. Ammous, “Aiding phase unwrapping by increasing the number of residues in two-dimensional wrapped-phase distributions,” Applied optics 54(34), 10073-10078 (2015). 7. R. M. Goldstein, H. A. Zebker, and C. L. Werner, “Satellite radar interferometry: Two-dimensional phase unwrapping,” Radio Science 23(4), 713-720 (1988). 8. Liping Yan, Haiyan Zhang, Rui Zhang, Xin Xie, Benyong Chen, “A robust phase unwrapping algorithm based on reliability mask and weighted minimum least-squares method” Optics and Lasers in Engineering 112, 39-45 (2019). 9. D. J. Bone, “Fourier fringe analysis: the two-dimensional phase unwrapping problem,” Applied Optics 30(25), 3627–32 (1991). Proc. of SPIE Vol. 11351 113511L-5 Downloaded From: https://www.spiedigitallibrary.org/conference-proceedings-of-spie on 17 Oct 2020 Terms of Use: https://www.spiedigitallibrary.org/terms-of-use