4
Noise reduction in phase maps with 2p phase jumps by means of the heat equation Ce ´ sar Daniel Perciante A new algorithm for filtering noise in phase maps that contain 2p discontinuities is presented. The algorithm is based on a thermal model that uses the heat equation to perform low-pass filtering. A similar approach is used in image processing for filtering noise, but the edges are generally distorted because of their inherent high frequencies. A solution that consists in redefining the spatial derivatives is proposed here. Simulation results are presented and discussed. © 2001 Optical Society of America OCIS codes: 100.5070, 350.5030. 1. Introduction Fringe analysis is an important procedure that has applications in many areas, such as optical metrology and interferometry. In all these techniques a two- dimensional fringe pattern is obtained that is related to the magnitude to be measured. The phase infor- mation contained in these fringes can be extracted by several methods, including phase stepping 1 and Fou- rier methods. 2 In general, only the phase modulo 2p is obtained. Thus the resultant values lies from 2p to p rad and are referred to as wrapped-phase values, as can be written mathematically as f~ x, y! 5 F~ x, y! 1 2pk~ x, y!, (1) where f~ x, y! represents the true phase distribution, k~ x, y! is an integer-valued function, and F~ x, y!~the result of the measurement! is the modulo 2p version of f~ x, y!. The process of phase unwrapping, that is, eliminat- ing the 2p discontinuities, must be completed before any other measurement of physical parameters is made. Therefore efficient phase-unwrapping algo- rithms are of fundamental importance for automatic fringe analysis. Several phase-unwrapping algorithms have been presented in the literature. 3–9 When noise is present some of the algorithms fail or are not so efficient as they would be without the presence of noise, so the image should be filtered before an unwrapping algorithm is applied. One approach that has good results is filtering with a trigonomet- ric transform. 10 Such a transformation is based on application of the sine and cosine mapping of the phase function such that the 2p discontinuities are suppressed. Under these conditions the trans- formed phase map can be filtered to reduce noise. By use of an inverse transform a new phase map is obtained. This approach has some problems. As the filter is nonlinear, a frequency response func- tion cannot be defined; therefore the spectrum of the input data is modified in an unknown way. This distortion depends on the data itself. Also, determining the frequency spectra of the noise change in the transformation as a result of the non- linearities involved and therefore determining the optimum parameters of the filter in each case are complex tasks that are done in a manual and inter- active way. It must be clear that “data” here refer to the unwrapped surface, which corresponds to the wrapped surface that is being processed. In this paper a new filtering scheme in which the heat equation is used to remove noise from discon- tinuous surfaces is presented. Several methods that utilize diffusion equations have been used in image processing for filtering noise. See Ref. 11. The ma- jor advantages of this method compared with the method mentioned above are that the one presented here is linear and the frequency response is well known. Therefore, if the bandwidth of the experi- mental data is known or at least can be estimated, the parameters of the filter can be chosen to reduce the noise without affecting the data or by affecting the data in a known way. The author ~e-mail: dpercia@fing.edu.uy! is with the Grupo de Optica Aplicada, Instituto de Fı ´sica, Facultad de Ingenierı ´a, J. Herrera y Reissig 565, 11300 Montevideo, Uruguay. Received 25 May 2000; revised manuscript received 2 October 2000. 0003-6935y01y050652-04$15.00y0 © 2001 Optical Society of America 652 APPLIED OPTICS y Vol. 40, No. 5 y 10 February 2001

Noise Reduction in Phase Maps with 2 π Phase Jumps by Means of the Heat Equation

Embed Size (px)

Citation preview

j

a

Noise reduction in phase maps with 2p phaseumps by means of the heat equation

Cesar Daniel Perciante

A new algorithm for filtering noise in phase maps that contain 2p discontinuities is presented. Thealgorithm is based on a thermal model that uses the heat equation to perform low-pass filtering. Asimilar approach is used in image processing for filtering noise, but the edges are generally distortedbecause of their inherent high frequencies. A solution that consists in redefining the spatial derivativesis proposed here. Simulation results are presented and discussed. © 2001 Optical Society of America

OCIS codes: 100.5070, 350.5030.

1. Introduction

Fringe analysis is an important procedure that hasapplications in many areas, such as optical metrologyand interferometry. In all these techniques a two-dimensional fringe pattern is obtained that is relatedto the magnitude to be measured. The phase infor-mation contained in these fringes can be extracted byseveral methods, including phase stepping1 and Fou-rier methods.2 In general, only the phase modulo 2pis obtained. Thus the resultant values lies from 2pto p rad and are referred to as wrapped-phase values,s can be written mathematically as

f~x, y! 5 F~x, y! 1 2pk~x, y!, (1)

where f~x, y! represents the true phase distribution,k~x, y! is an integer-valued function, and F~x, y! ~theresult of the measurement! is the modulo 2p versionof f~x, y!.

The process of phase unwrapping, that is, eliminat-ing the 2p discontinuities, must be completed beforeany other measurement of physical parameters ismade. Therefore efficient phase-unwrapping algo-rithms are of fundamental importance for automaticfringe analysis.

Several phase-unwrapping algorithms have beenpresented in the literature.3–9 When noise ispresent some of the algorithms fail or are not so

The author ~e-mail: [email protected]! is with the Grupo deOptica Aplicada, Instituto de Fısica, Facultad de Ingenierıa,J. Herrera y Reissig 565, 11300 Montevideo, Uruguay.

Received 25 May 2000; revised manuscript received 2 October2000.

0003-6935y01y050652-04$15.00y0© 2001 Optical Society of America

652 APPLIED OPTICS y Vol. 40, No. 5 y 10 February 2001

efficient as they would be without the presence ofnoise, so the image should be filtered before anunwrapping algorithm is applied. One approachthat has good results is filtering with a trigonomet-ric transform.10 Such a transformation is based onapplication of the sine and cosine mapping of thephase function such that the 2p discontinuities aresuppressed. Under these conditions the trans-formed phase map can be filtered to reduce noise.By use of an inverse transform a new phase map isobtained. This approach has some problems. Asthe filter is nonlinear, a frequency response func-tion cannot be defined; therefore the spectrum ofthe input data is modified in an unknown way.This distortion depends on the data itself. Also,determining the frequency spectra of the noisechange in the transformation as a result of the non-linearities involved and therefore determining theoptimum parameters of the filter in each case arecomplex tasks that are done in a manual and inter-active way. It must be clear that “data” here referto the unwrapped surface, which corresponds to thewrapped surface that is being processed.

In this paper a new filtering scheme in which theheat equation is used to remove noise from discon-tinuous surfaces is presented. Several methods thatutilize diffusion equations have been used in imageprocessing for filtering noise. See Ref. 11. The ma-jor advantages of this method compared with themethod mentioned above are that the one presentedhere is linear and the frequency response is wellknown. Therefore, if the bandwidth of the experi-mental data is known or at least can be estimated,the parameters of the filter can be chosen to reducethe noise without affecting the data or by affectingthe data in a known way.

at

d

asC

Eu

tsaic

ip

2. Theoretical Background

Let us consider a plane surface whose temperature isT~x, y, t!. It is well known that the heat transferinside the surface is modeled by the equation12

k¹2T 2]T]t

5 0, (2)

where k is the thermal conductivity of the material.The system described by Eq. ~2! is a linear spatial

filter whose input and output signals are T~x, y, 0!and T~x, y, t!, respectively. In what follows, thetransfer function of this system is found. Let ustake the spatial Fourier transform in Eq. ~2!. Weobtain

2k~vx2 1 vy

2!T 2]T]t

5 0, (3)

where T is the spatial Fourier transform of function Tand vx,y are spatial frequencies. Thus we can trivi-lly find the transfer function of the filter by solvinghe ordinary differential equation @Eq. ~3!#. The

transfer function then is

H~vx, vy! 5 exp@2kt~vx2 1 vy

2!#. (4)

Equation ~4! describes a Gaussian spatial low-passfilter whose parameters depend on the constant kinvolved in the thermal model and on the time whenEq. ~2! is applied.

In this study a phase map is modeled as the tem-perature of a plane surface.

3. Description of the Algorithm

When the surface to be filtered has discontinuities,the algorithm described above encounters a problem.It is true that there is a noise reduction, but what isobtained finally is a smoother version of the initialsurface in which the discontinuities have disap-peared because of their inherent high frequencies.The solution to this problem consists in redefining thespatial derivatives. To do so, let us first define themodulo 2p operator as

m~j! 5 j 2 2p Round~jy2p!, (5)

where the function Round~u! gives the closest integernumber to the real number n. A map of m is shownin Fig. 1.

When one is working with wrapped phase maps,the usual definition of the derivative encountersproblems in those points that are close to the 2pdiscontinuities. To avoid this problem, let us definethe modulo 2p spatial derivative of a function f ~x! as

dpf ~x!

dx5 lim

dx30

m@ f ~x 1 dx! 2 f ~x!#

dx. (6)

Let us substitute Eq. ~1! into Eq. ~6! and use theefinition of the operator m~ !:

]pF~x, y!

dx5 lim

dx30

m@F~x 1 dx, y! 2 F~x, y!#

dx

5 limdx30

f~x 1 dx, y! 2 f~x, y!

dx

5]f~x, y!

dx. (7)

Equation ~7! shows that the modulo 2p spatial deriv-tive of the wrapped surface is equal to the usualpatial derivative of the unwrapped surface.learly, the same result holds for the variable y.With the definition of a spatial derivative given in

q. ~6!, a modulo 2p Laplacian operator can be nat-rally defined as

¹p2T 5

]p2T

]x2 1]p

2T]y2 , (8)

and Eq. ~2! becomes

k¹p2T 2

]T]t

5 0. (9)

Equation ~7! demonstrates that applying the spa-tial filter defined by Eq. ~9! to a wrapped surface isequivalent to applying the filter defined by Eq. ~2! tohe corresponding unwrapped surface because thepatial derivative terms are equal. Therefore, if wepply Eq. ~9! to a wrapped surface, we are implement-ng a Gaussian filter that is indirectly applied to theorresponding unwrapped surface.

So the algorithm proposed here consists in numer-cally solving Eq. ~9! by use of the wrapped and noisyhase map as the initial condition ~T0!. To do so, we

can use the finite-difference method.13

Let us define Ti, jn 5 T~iDx, jDy, nDt!, where i, j, and

n are integer numbers and Dx, Dy, and Dt are finiteincrements of the coordinates x, y, and t, respectively.

Fig. 1. Modulo 2p operator m~j! defined in Eq. ~4!.

10 February 2001 y Vol. 40, No. 5 y APPLIED OPTICS 653

sv

oaptr

d

6

Therefore the derivatives in Eq. ~9! can be approxi-mated by

]T]t

>1Dt

~Ti, jn 2 Ti, j

n21!,

]p2T

]x2 >1

Dx2 m@m~Ti11, jn21 2 Ti, j

n21! 2 m~Ti, jn21

2 Ti21, jn21!#,

]p2T

]y2 >1

Dy2 m@m~Ti, j11n21 2 Ti, j

n21! 2 m~Ti, jn21

2 Ti, j21n21!#.

Note that the operator m~ ! has been used in theapproximations of the spatial derivatives accordingto the definition given in Eq. ~6!.

Substituting into Eq. ~9!, we obtain that

Tn 5 F~Tn21!, (10)

where Tn is a matrix whose elements are Ti, jn and

F~ ! is a matrix function. Using T0 as an initial con-dition to iterate with Eq. ~10!, we obtain a smooth~filtered! version of that surface without losing the 2pdiscontinuities.

From Eq. ~4! it is clear that the filter bandwidthdepends on the parameter k of the thermal model andon the time when Eq. ~2! is applied. So it is relatedto the Dt increment and the number of iterations ofthe numerical scheme. Therefore one must choosethe parameters of the filter such as to be able to selectthe bandwidth of the spatial low-pass filter.

4. Experiments and Results

To test the proposed filter, I simulated a noisy surfacewith discontinuities of 2p by adding a random vari-able normally distributed of spectral power s2 to amooth surface. The values of the constants in-olved in the algorithm were Dx 5 Dy 5 0.1, Dt 5

0.01, k 5 200, and s 5 0.6.Figures 2~a! and 2~b! show the original surface and

the noisy surface, respectively. Figure 2~c! showsthe result of filtering after the first iteration; Fig.2~d!, after four iterations. It can be clearly seen thatthe amount of noise is reduced drastically such that,if the reconstruction of the phase map is needed, anysimple unwrapping algorithm could be used.

For the surface of this example, the simplest un-wrapping algorithm ~i.e., adding a multiple numberof 2p to each point of the surface row by row! wasused to test the results of the proposed filter. Theresult was that the unwrapping algorithm failed be-fore filtering and that after filtering the result wascorrect.

The noise power ~NP! after each iteration was cal-culated as

NP~n! 51N (

i(

j~Ti, j

n 2 Ti, j!2,

54 APPLIED OPTICS y Vol. 40, No. 5 y 10 February 2001

where Ti, j is the original phase map without noiseand, as defined above, Ti, j

n is the result of the algo-rithm after the nth iteration and N is the number ofpixels in the image. Simulation results show thatNP is reduced several times after a few iterations,depending on the amount of noise and the parame-ters of the algorithm. For example, for Fig. 2 the NPwas reduced five times after four iterations.

Even though the results are good, it must be pointedout that this algorithm works well when the surface tobe filtered has discontinuities of known magnitude ~2pin this case!. When intrinsic discontinuities ~i.e., cor-responding to step variations in the phase object beingstudied! are present, these are also filtered, which isnot desirable. One possible way to avoid this problemis to use anisotropic diffusion11 in combination withthe approach presented here, but the efficiency of thismethod is left for further research.

5. Conclusions

A new algorithm for filtering phase maps that hasdiscontinuities of 2p and uses the heat equation hasbeen presented. This equation is usually used inimage processing for filtering noise, but the problemwith doing this is that discontinuities ~edges! are dis-torted. It has been demonstrated here that, whenthe jumps are of known magnitude ~2p in this case!,ne can ignore them by redefining the spatial deriv-tives. The major advantage over other algorithmsresented in the literature is that this one is linear, sohe frequency response is well known. The algo-ithm has been tested and results have been shown.

The author thanks Jose A. Ferrari for his adviceuring the writing of this manuscript.

Fig. 2. ~a! Original simulated phase map. ~b! Noisy phase mapobtained by addition of a normal distributed random variable. ~c!Result of the filtering process after the first iteration. ~d! Resultafter the fourth iteration.

7. G. Fornaro, G. Franceschetti, and R. Lanari, “Interferometric

References1. E. Frins, W. Dultz, and J. A. Ferrari, “Polarization-shifting

method for step interferometry,” Pure Appl. Opt. 7, 53–60~1998!.

2. M. Takeda, H. Ina, and S. Kobayashi, “Fourier-transformmethod of fringe-pattern analysis for computer-based topog-raphy and interferometry,” J. Opt. Soc. Am. 72, 156–160~1982!.

3. D. C. Ghiglia and L. A. Romero, “Robust two-dimensionalweighted and unweighted phase unwrapping that uses fasttransforms and iterative methods,” J. Opt. Soc. Am. A 11,107–117 ~1994!.

4. J. L. Marroquin, M. Tapia, R. Rodriguez-Vera, and M. Servin,“Parallel algorithms for phase unwrapping based on Markovrandom fields models,” J. Opt. Soc. Am. A 12, 2578–2585 ~1995!.

5. H. A. Zebker and Y.-P. Lu, “Phase unwrapping algorithms forradar interferometry: residue-cut, least-squares, and synthe-sis algorithms,” J. Opt. Soc. Am. A 15, 586–598 ~1998!.

6. G. Paez and M. Strojnik, “Fringe analysis and phase recon-struction from modulated intensity patterns,” Opt. Lett. 22,1669–1671 ~1997!.

SAR phase unwrapping using Green’s formulation,” IEEETrans. Geosci. Remote Sens. 34, 720–727 ~1996!.

8. A. Collaro, G. Franceschetti, F. Palmieri, and M. S. Ferreiro,“Phase unwrapping by means of genetic algorithms,” J. Opt.Soc. Am. A 15, 407–418 ~1997!.

9. L. Guerriero, G. Nico, G. Pasquariello, and S. Stramaglia,“New regularization scheme for phase unwrapping,” Appl.Opt. 37, 3053–3058 ~1998!.

10. R. Seara, A. A. Goncalves, Jr., and P. B. Uliana, “Filteringalgorithm for noise reduction in phase-map images with 2pphase jumps,” Appl. Opt. 37, 2046–1050 ~1998!.

11. B. M. Ter Haar Romeny, ed., Geometry-Driven Diffusion inComputer Vision ~Kluwer Scientific, Dordrecht, The Nether-lands, 1994!.

12. F. P. Incropera and D. P. De Witt, Fundamentals of Heat andMass Transfer ~Wiley, New York, 1990!, Chap. 5.

13. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P.Flannery, Numerical Recipes in C ~Cambridge U. Press, Cam-bridge, UK, 1996!, Chap. 19.

10 February 2001 y Vol. 40, No. 5 y APPLIED OPTICS 655