0% found this document useful (0 votes)
48 views

Fast Phase-Unwrapping Algorithm

Uploaded by

Nikhil Deshmukh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Fast Phase-Unwrapping Algorithm

Uploaded by

Nikhil Deshmukh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Fast phase-unwrapping algorithm

based on a gray-scale mask and flood fill

Anand Asundi and Zhou Wensen

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.

1. Introduction the locally unwrapped phase to construct a binary


Optical techniques such as three-dimensional pro- mask to be overlaid on the phase field. Any points
filometry, photoelasticity, and interferometry have whose second differences exceed some preset thresh-
the advantage of being noncontact, fast, and capable old are set in the binary mask and excluded from the
of providing whole-field information. They have al- unwrapping. Vrooman and Mass4 have shown that
ready been developed for measuring a wide range of dark speckles and dark areas result in a low modu-
physical parameters such as stress, vibration, dis- lation intensity. A binary mask based on the mod-
placement, and surface profile. In all these tech- ulation intensity is applicable to phase-shifted
niques the measured parameters are modulated in speckle interferograms. Vandenhouten and Grebe5
the form of a two-dimensional fringe pattern. De- also use the modulation intensity as a criterion to
modulation by use of fringe-pattern processing is build a binary mask in Fourier fringe analysis.
thus an essential and important procedure. The accuracy of the binary-mask methods is lim-
First a wrapped phase map whose principal values ited because they consider that all the valid points
range from 2p to p is calculated from the fringe have the same priority whether their modulation is
pattern. Phase unwrapping is then carried out to high or not. In this case, any failure can be carried
restore the unknown multiple of 2p to each pixel. across the field from valid points with a low modula-
Defects in the fringe patterns, such as phase discon- tion intensity when the threshold is set incorrectly.
tinuities, shadow, and noise, are major obstacles to Towers et al. described a noise-immune phase-
phase-unwrapping methods. Many masking algo- unwrapping algorithm based on a minimum span-
rithms have been proposed to exclude these invalid ning tree. The fringe is segmented into small
areas from unwrapping process. rectangular areas called tiles. This allows local data
The phase-unwrapping method, as described by on fringe consistency and density to be obtained. A
Goldstein et al. and Huntley,2 is to place cuts between confidence tree can then be formed to produce an
a pair of opposite residues to avoid unwrapping along optimal solution for the whole field, but a great
doubtful paths. Bone3 uses the second differences of amount of redundant sorting on constructing the
minimum spanning tree makes it time consuming.
Su et al.7,8 also described an improved algorithm to
limit error in local-minimum areas according to a
The authors are with the School of Mechanical and Production
gray-scale mask based on the modulation intensity.
Engineering, Nanyang Technological University, 639798 Singa-
pore. Although the algorithm was successful in construct-
Received 1 October 1997; revised manuscript received 5 Febru- ing a path for unwrapping with maximum confidence,
ary 1998. a great deal of sorting must be done on the edge to get
0003-6935y98y235416-05$15.00y0 the wrapped point with maximum modulation.
© 1998 Optical Society of America More recently, Li et al.9 presented a compromise al-

5416 APPLIED OPTICS y Vol. 37, No. 23 y 10 August 1998


The phase f~x, y! can be calculated by use of tra-
ditional phase stepping with N~N $ 3! images:
N

(I n sin~2pnyN!
f~x, y! 5 n51
N . (2)
(
n51
In cos~2pnyN!

The phase map f~x, y! calculated by Eq. ~2! is


wrapped into the principal range values from 2p to
p. By use of an unwrapping algorithm, the phase
Fig. 1. Optical geometry of the PMP system. map is automatically obtained in its natural range.
From the N phase-shifted intensities of the fringe
patterns, a fringe modulation M~x, y! is obtained as4

(H ( J
gorithm based on a binary mask and edge detection. N 2

Although the speed of the algorithm is improved by a M~x, y! 5 @In sin~2pnyN!#

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.

10 August 1998 y Vol. 37, No. 23 y APPLIED OPTICS 5417


tinue until it reaches the edge whose modulation is
less than or equal to the threshold modulation.
6. To start a new expansion, reduce the threshold
modulation by a step and move the points in queue
Q2 whose modulation is greater than the new thresh-
old modulation to queue Q1. The new expansion is
repeated.
7. Sometimes the threshold modulation is much
greater than the maximum modulation on the edge.
In this case, the new expansion will halt because
there is no starting point in queue Q1, even if you
reduce the threshold modulation once. To solve the
problem, sequentially reduce the threshold modula-
tion until there is at least one starting point in queue
Q1. Then continue the expansion until the flood-fill
modulation is less than or equal to the cutoff mod-
ulation Tc, that is, the whole valid field is un-
wrapped.

For a better understanding, a schematic diagram of


the process in shown in Fig. 3. Figure 3~a! shows
steps 1– 4. S is a starting point, and the edges Eab
and Eac separate region a from regions b and c, re-
spectively. The modulation in region a is greater
than the threshold modulation Tm, but the modula-
tion on edges Eab and Eac is less than Tm. Figure
3~b! shows the unwrapped ~shaded! regions from the
first round of expansion ~step 5!. Figure 3~c! shows
the next stage. When the threshold modulation Tm
is reduced by a step, some points on edges Eab and Eac
and in regions b and c are greater than the new
threshold modulation Tm. This causes regions b
and c to shrink to b9 and c9, as in step 7. The thresh-
old modulation is greater than the maximum modu-
lation on edges Ea9b9 and Ea9c9, and the threshold
Fig. 2. Flowchart of the flood-fill phase-unwrapping method.
modulation is further reduced until it is less than the
maximum modulation on the edges Ea9b9 and Ea9c9.
This procedure is the preparation for the new expan-
4. Put the starting point into queue Q1. sion.
5. Unwrap the point that pops up from queue Q1.
Then push the adjacent wrapped points in queue Q1 4. Experimental Results
whose modulation is greater than threshold modula- To compare the speed of different phase-unwrapping
tion. Push the other adjacent wrapped points to methods,6 – 8 we used the same data of a tooth plaster.
queue Q2. Repeat this step until the queue Q1 is Figure 4~a! shows the original image, and Fig. 4~b!
empty. This step is very similar to the technique of shows one of the five phase-shifted fringe patterns.
flood fill in computer science. Flood filling will con- As can be seen from Fig. 4~b!, there is a nearly one-

Fig. 3. Schematic diagram of the procedural steps of the proposed phase-unwrapping method.

5418 APPLIED OPTICS y Vol. 37, No. 23 y 10 August 1998


Fig. 4. Experimental results for a tooth plaster image: ~a! Original image of the tooth plaster. ~b! One of the fringe patterns. Block
A represents a discontinuous fringe area. ~c!, ~d! Two intermediate unwrapping steps. ~e! Three-dimensional surface of the tooth plaster.

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

10 August 1998 y Vol. 37, No. 23 y APPLIED OPTICS 5419


5. Conclusion
A fast phase-unwrapping algorithm based on a gray-
scale mask and flood filling has been presented. The
method not only attains high accuracy by means of
unwrapping from highly reliable areas to low-
reliability ones but also is quite fast. Although in
this paper the modulation distribution was obtained
by phase-shifting techniques, it is possible to obtain
the modulation distribution from just one fringe pat-
tern by the Fourier transform method.5 Therefore
phase unwrapping in the Fourier transform method
follows the same procedures as in phase-measuring
profilometry.

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!.

5420 APPLIED OPTICS y Vol. 37, No. 23 y 10 August 1998

You might also like