using Genetic Algorithms
F. J. CUEVAS
Investigaciones en Óptica, A.C, Department of Optical Metrology,
Loma del bosque
115, Col. Lomas del Ca
mpestre, León 37150, Guanajuato,
The Fringe Processing on Independent Windows method (FPIW) finds a parametric
function that estimates the phase of a given segmented region that comes
from the fringe pattern.
The genetic algorithm is applied on a set of partially overlapping windows extracted from the
original fringe pattern. The independent phases obtained by the GAs are used to reconstruct the
whole phase field.
The different section
s can be joined used different techniques, like comparing
the rms value of the phases or the rms value of phase first derivative.
Finally, the use of gradient descent to refine the results given by the GA is explored
In optical metrolo
gy, a fringe pattern carries information embedded in its phase
pattern would have open or closed fringes. A robust technique to
obtain the phase for both cases
is phase shifting , but then four, six or more images are needed. Transient even
ts are so fast
that it is not possible to take more than one interferogram.
If the interferogram has open fringes, there are many techniques that could be applied, like the
Fourier Method , the synchronous method  or the Phase Locked Loop method 
techniques can not be applied to a single interferogram with closed fringes.
Multiple solutions are possible for a single closed
fringes pattern. Novel methods have been
proposed, such as the regularized phase tracker (RPT) and the two
HT) [5,6]. Regularization techniques establish a cost function using two
considerations about the estimated phase: a) similarity between the cosine of the estimated phase
and the fringe pattern, and b) a smooth phase, but the
y can easily fall on a local minimum, and
are sensitive to noise.
GAs [7,8,9] are optimization algorithms that simulate natural evolution. GAs do not search for
the best solution to a given problem, yet they can discover highly precise functional solutions
and are very useful for nonlinear optimization problems, or in the presence of multiple
a variation in the WFPD method by Cuevas et. al.  to demodulate complicated
fringe patterns using a GA to fit a polynomial on sub
ges. The Fringe Processing on
Independent Windows method (FPIW) is applied on a set of partially overlapping windows
extracted from the original fringe pattern. The independent phases obtained by the GAs are used
to reconstruct the whole phase field, addi
ng splicing phases from adjacent windows.
fined using gradient descent, and
we present two different ways to do the splicing process.
Genetic Algorithms were first proposed and analyzed by John Holland . A GA is a special
ase of evolutionary algorithms (EA), which involve the reproduction, random variation,
competition and selection of contending individuals in a population .
The individual structures to be evolved are called chromosomes. Chromosomes are the
that is manipulated by the GA. A chromosome is formed by genes
the value in each
gene is called an allele. A given allele could be a bit or a real value number. Chromosomes codify
a given solution in the domain of the function to be optimized, and this so
lution is decoded in the
Equation (2) shows the chromosome for
individual in any given generation. This individual
codifies an estimated phase given by a
Before the first gen
eration, a random population
is generated; random values are given to
the alleles in each chromosome. Each individual is evaluated and is given a fitness value. A new
is generated applying the operators of selection, crossover and muta
Some of these individuals are randomly selected, with a probability that is a function of their
fitness value. Fitness values for the demodulation process are given by the fitness function given
by Equation (
The probability of selection of each individual is given by the Boltzmann selection Equation
). Boltzmann selection avoids premature convergence.
increases the variety of chromosomes inside the population. The information in some segments
of the chromosomes is exchanged with the information in the same segment of another selected
mosome, with a given probability
determines what percentage of the population will
be mixed, and typical values are around 0.9. A random number is generated, and if it is above
chromosomes are added to the new population without changes. If the
number is below
information is exchanged. One or more points are randomly chosen over the chromosome, and
they determine two or more segments where even or odd segments are exchanged (Fig.ure 1).
Two point crossover.
To avoid premature convergence and explore new regions in the function domain, a mutation
operator is applied on the new chromosomes. A gene is altered with a probability
decreased with each generation.
If the allele is binary, the b
it is exchanged by its complement. If
the allele is a real number, a random quantity, which could be positive or negative, is added to the
Recovering the Phase Field
To demodulate a complex interferogram, the image is segmented in partia
windows. The GA demodulates the phase inside each window. The next step is to add the phase
from different windows to recover the entire phase field. The phases from two adjacent windows
are differentiated by the concavity and the DC bias.
The overlapping between windows must be 0.4 to 0.6. The values from each phase are used
over the overlapping area to calculate the DC bias between the two phases, as it appears on
), where OA’ is the measure of the overlapping area.
are calculated, for the function as it was demodulated by the GA, and for the
negative of the same function (positive and negative concavity). The chosen version is that which
minimizes the RMS error
of the phase map.
The GA was tested using
computer generated interferograms.
t is necessary to apply the
segmented window approximation, to follow the complexity of the phase map.
The fringe image
is a complicated one with closed fringes and under
The phase and fringe pattern for this equation are shown in Fig.
. The resolution of this
image is 50x20. A 9x9 window was moved over the fringes with an overlapping region between
40% and 60% of the window.
Original Fringe image.
The population has 500 chromosomes. Boltzmann selection and a two point crossover
operator were used. The parameters were set up in the values given: λ
The population was evolved duri
ng 300 generations and then the best chromosome was
chosen like the vector
that best estimates the phase on these windows. Then the phase was
spliced with the previous estimated phase stored in
the phase map using Equation (5
) to calculate
the DC bias.
The phase estimated by the GA is shown on Fig.
. A media filter was applied over the phase
map to smooth the patch’s edges. The RMS error is 0.265 rad.
Phase map demodulated from 7(b).
Fringe pattern from (a).
A new t
echnique to estimate the phase in a complicated fringe image is presented. It is based on
avoiding the overlapping similarity criterion from the fitness function in the WFPD method. An
algorithm to splice the independent phases from all windows is presente
The new technique shown in this paper is based on the assumption that it is not necessary to
know the phase on the neighbours to estimate the phase in a given window. This made it possible
to eliminate the overlapping similarity criterion in the fitness
function, and instead only take into
account the smoothness of a given solution, given a fitness function that is easy to evaluate and
that is independent from the phase on other windows. This condition makes the algorithm
presented in this paper robust t
o demodulation errors from other windows. The demodulation
process can be done in parallel.
This algorithm was tested with computer generated interferograms with wide frequency
content, closed fringes and under
sampled fringes, and it was able to demodulat
e the phase on
The proposed algorithm to splice the different phases is able to reconstruct the phase map,
with the sole condition that the phases to be joined do not present oscillations in their overlapping
areas. But even in cases where th
ese oscillations appear, the algorithm can correct the phase in
the regions by adjusting
We acknowledge the support of the Consejo Nacional de Ciencia y Tecnología de México,
Consejo de Ciencia y Tecnología del Estado de Guanajuato and Centro de Investigaciones en
Óptica, A.C. To Guillermo Garnica for its invaluable te
Malacara D., Servin M., Malacara Z. (1998) Interferogram Analysis for Optical testing, Marcel Dekker, New
Takeda M., Ina H., Kobayashi S. (1982) Fourier
transform method of fringe
pattern analysis for computer
topography and interferometry. J. Opt. Soc. Am., 72:156.
Ichioka, Y., Inuiya, M. (1972) Direct phase detecting system. Appl. Opt., 11:1507
Servin, M., Rodriguez
Vera, R (1993) Two dimensional phase locked loop demodulation of in
Mod. Opt., 40:2087
Servin M., Marroquín J.L., Cuevas F.J. (2001) Fringe
follower regularized phase tracker for demodulation of
fringe interferograms. J. Opt. Soc. Am. A, 18:689
Larkin K.G., Bone D.J., Oldfield M
.A. (2001) Natural demodulation of two
dimensional fringe patterns in
general background of the spiral phase quadrature transform. J. Opt. Soc. Am. A, 18:1862
Cuevas F.J., Mendoza F., Servin M., Sossa
Azuela J.H. (2006) Window fringe pattern demodulation by multi
functional fitting using a genetic algorithm. Opt. Commun. 261:231
Cuevas F.J., Sossa
Azuela J.H., Servin M. (2006) A parametric method appl
ied to phase recovery from a fringe
pattern based on a genetic algorithm. Opt. Commun. 261:231
Goldberg D. (1989) Genetic Algorithms: Search and Optimization Algorithms, Addison
Wesley Publishing, MA.
Holland J.H.(1975) Adaptation in natural
and Artificial Systems. University of Michigan Press. Michigan.
Bäck, Fogel, Michalewicz (2000) Evolutionary computation. Institute of Physics publishing, Bristol and