Fast Phase-Unwrapping Algorithm
Fast Phase-Unwrapping Algorithm
Phase-unwrapping algorithms, an active and interesting subject in recent years, are important in a great
number of measurement applications. Active research is being undertaken to develop reliable and
high-speed procedures. The current process uses a gray-scale mask and the flood-fill concept from image
processing for phase unwrapping. The algorithm unwraps phase from an area with higher reliability to
one with lower reliability. In addition to robustness, the speed of the algorithm proposed is much faster
than conventional routines. The experimental results of different algorithms are compared by analysis
of a tooth plaster and a photoelastic specimen. © 1998 Optical Society of America
OCIS codes: 100.2650, 050.5080.
(I n sin~2pnyN!
f~x, y! 5 n51
N . (2)
(
n51
In cos~2pnyN!
(H ( J
gorithm based on a binary mask and edge detection. N 2
H( J)
factor of almost 2, in certain cases the binary mask n51
N 2 1y2
makes it less accurate.
The main difference between the present ap- 1 @In cos~2pnyN!# . (3)
n51
proach and those described above is that a gray-
scale mask based on the modulation intensity, not a Substituting Eq. ~1! into Eq. ~3! yields
binary mask, is used to maintain high reliability
and a flood-fill unwrapping method is used to N
achieve high speed. The modulation of the field is M~x, y! 5 B~ x, y!. (4)
2
quantized and normalized in the range from 0 –255.
First, a preset cutoff threshold is used to exclude The modulation function M~x, y! is thus propor-
invalid areas from the unwrapping process. Then tional to B~ x, y!, the amplitude of the fringe pattern.
unwrapping fills an area from a given starting point Obviously, the modulation in the shadows is low.
in which the modulation of all points is greater than Discontinuities, found in sudden-change areas, cor-
the flood-fill threshold of the starting point. The respond to high-frequency components, and their sig-
flood-fill threshold is then reduced a step. The nals are reduced after passing through the low-pass
flood-filled area will expand until the modulation on filter of CCD camera. Although the modulations in
the edge is less than or equal to the new flood-fill the spatial domain at noisy points may be high, the
threshold. The above procedures are repeated un- randomized noise at each phase shift can be partially
til all valid areas are filled. Because phase un- balanced out in the temporal domain. Therefore a
wrapping is completed from a region of high higher value of B~ x, y! means a better signal-to-noise
modulation to those of low modulation, the algo- ratio and thus greater modulation. The modulation
rithm is quite accurate. Furthermore, the algo- parameter M~x, y! is an ideal parameter to guide the
rithm is time saving because of elimination of the phase-unwrapping process from a highly reliable
tedious sorting procedure. The algorithm is shown area to an area of low reliability.
to be experimentally reliable and faster than those
of Refs. 7–9. 3. Fast Algorithm Based on a Gray-Scale Mask and
Flood Fill
A flowchart for the proposed PMP fast algorithm
2. Fundamental Concept based on a gray-scale mask and flood fill is as follows
~Fig. 2!:
A typical system geometry for phase-measuring pro-
filometry10 ~PMP! is shown in Fig. 1. A sinusoidal
1. Compute the wrapped phase and intensity mod-
grating pattern is projected onto a three-dimensional
ulation.
diffused object, and the distorted image is recorded by
2. Preset a cutoff threshold Tc to exclude invalid
a CCD camera. The grating is then translated by a
areas. Set a threshold modulation Tm and a start-
fraction of the pitch. The terms P1 and P2 are the
ing point S ~Ts . Tm!. The starting point S must be
points of projection and imaging, respectively. The
in the area of interest with high modulation.
intensity for a single frame is then given as
3. Set up two empty queues. Queue Q1 contains
points whose modulations are greater than threshold
In 5 A~ x, y! 1 B~x, y!cos@f~x, y! 1 2pnyN#, (1) modulation; in other words, the points in queue Q1
can be unwrapped and are in a flood-filled area.
Queue Q2 contains points whose modulations are less
where In is the n-frame sampling intensity, A~x, y! than or equal to the threshold modulation, that is, the
represents the background intensity, and B~ x, y! is points in queue Q2 are not unwrapped at this time
the amplitude of the fringe pattern. and will form the edge of the flood-fill area.
Fig. 3. Schematic diagram of the procedural steps of the proposed phase-unwrapping method.
integer fringe discontinuity on the front tooth plaster puter for 256 3 256 data points. The reliability
mark block A; an unwrapping error will occur if un- method7,8 takes 140 s, and the edge method 9 takes
wrapping passes through these discontinuous areas. 55 s. All methods provide the same results, but the
Figures 4~c! and 4~d! show two intermediate unwrap- current method is the fastest.
ping stages from which it is clear that unwrapping A standard circular photoelastic polariscope with a
did not pass through these discontinuous areas di- tensile specimen with a circular hole8 is used for an-
rectly but made a detour around them. The white other demonstration. One of the five phase-shifting
area indicates the unwrapped pixels. Figure 4~e! patterns 512 3 512 data points is shown in Fig. 5~a!,
shows the reconstructed three-dimensional surface of and a gray-scale display of the unwrapped phase is
the tooth plaster. shown in Fig. 5~b!. The computational time of the
The computational time of the current method is current method is approximately 20 s. The reliabil-
approximately 4 s on a Pentium Pro 200-MHz com- ity method7,8 takes approximately 40 min, and the
References
1. R. M. Goldstein, H. A. Zebker, and C. L. Werner, “Satellite
radar interferometry two dimensional phase unwrapping,” Ra-
dio Sci. 23, 713–720 ~1988!.
2. J. M. Huntley, “Noise-immune phase unwrapping algorithm,”
Appl. Opt. 23, 3268 –3270 ~1989!.
3. D. J. Bone, “Fourier fringe analysis: the two-dimensional
phase unwrapping problem,” Appl. Opt. 30, 3627–3632 ~1991!.
4. H. A. Vrooman and A. A. M. Mass, “Image processing algo-
rithms for the analysis of phase-shifted speckle interference
patterns,” Appl. Opt. 30, 1636 –1641 ~1991!.
5. R. Vandenhouten and R. Grebe, “Phase reconstruction and
unwrapping from holographic interferograms of partially ab-
sorbent phase objects,” Appl. Opt. 34, 1401–1406 ~1995!.
6. D. P. Towers, T. R. Judge, and P. J. Bryanston-Cross, “Auto-
matic interferogram analysis techniques applied to quasi-
heterodyne holography and ESPI,” Opt. Lasers Eng. 14, 239 –
281 ~1991!.
7. X.-Y. Su and W. Zhou, “Complex object profilometry and its
application for dentistry,” in Clinical Application of Modern
Imaging Technology II, L. J. Cerullo, K. S. Heiferman, H. Liu,
Fig. 5. Experimental results for a photoelastic specimen: ~a!
H. Podbieska, A. O. Wist, and L. J. Zamorano, eds., Proc. SPIE
Fringe pattern of photoelasticity. ~b! Gray-scale display of the
2132, 484 – 489 ~1994!.
unwrapped phase.
8. X.-Y Su, A. Asundi, and M. R. Sajan, “Phase unwrapping in
photoelasticity,” in International Conference on Experimental
Mechanics: Advances and Applications, F. S. Chau and C. T.
edge method9 takes 12 min. The larger the fringe Lim, eds., Proc. SPIE 2921, 338 –342 ~1997!.
9. J.-L. Li, X.-Y. Su, and J.-T. Li, “Phase unwrapping algorithm
pattern is, the longer the queue of unwrapped points
based on reliability and edge detection,” Opt. Eng. 36, 1685–
on the edge. In particular, fringe patterns with spot 1690 ~1997!.
noise make the edge more irregular. So the reliabil- 10. V. Srinivasan, H. C. Liu, and M. Halioua, “Automated phase-
ity method and the edge method are limited to measuring profilometry of 3-D diffuse objects,” Appl. Opt. 23,
smaller fringe patterns. 3105–3108 ~1984!.