**3. Genetic algorithm applied to phase recovery**

The fringe demodulation problem is difficult to solve since many solutions are possible, even for a single noiseless fringe pattern.

The image on a fringe pattern *I x*(,) *y* does not change if (,) *x y* in Eq.(1) is replaced by another phase function (,) *<sup>x</sup> <sup>y</sup>* given by:

(a)

(b)

It is a genetic operator used to maintain genetic diversity from one generation of a population of algorithm chromosomes to the next. It is analogous to biological mutation. Mutation alters one or more gene values in a chromosome from its initial state. In mutation, the solution may change entirely from the previous solution. Hence GA can come to better solution by using mutation. Mutation occurs during evolution according to a user-definable mutation probability. This probability should be set low. If it is set to high, the search will

The classic example of a mutation operator involves a probability that an arbitrary bit in a genetic sequence will be changed from its original state. A common method of implementing the mutation operator involves generating a random variable for each bit in a sequence. This random variable tells whether or not a particular bit will be modified. This mutation procedure, based on the biological point mutation, is called single point mutation. Other types are inversion and floating point mutation. When the gene encoding is restrictive

The purpose of mutation in GAs is preserving and introducing diversity. Mutation should allow the algorithm to avoid local minima by preventing the population of chromosomes from becoming too similar to each other, thus slowing or even stopping evolution. This reasoning also explains the fact that most GA systems avoid only taking the fittest of the population in generating the next but rather a random (or semi-random) selection with a

The fringe demodulation problem is difficult to solve since many solutions are possible,

(,) *x y* in Eq.(1) is replaced by

as in permutation problems, mutations are swaps, inversions and scrambles.

Fig. 8. (a) One point crossover; (b) Two point crossover.

turn into a primitive random search.

weighting toward those that are fitter.

even for a single noiseless fringe pattern.

another phase function

**3. Genetic algorithm applied to phase recovery** 

The image on a fringe pattern *I x*(,) *y* does not change if

(,) *<sup>x</sup> <sup>y</sup>* given by:

**2.4 Mutation** 

$$
\hat{\varphi}(\mathbf{x}, \mathbf{y}) = \pm \varphi(\mathbf{x}, \mathbf{y}) \pm 2\pi k\_{\prime} \tag{2}
$$

A fringe pattern of *R*x*C* pixels dimension is segmented into a window overlapping set of sub-images of *R1*x*C1* pixels dimensions*,* and with origin coordinates at (*r,c*). The GA is used to carry out the optimization process, where a parametric estimation of a non linear function is proposed to fit the phase on the sub-images.

The fitness function is modelled by the next considerations: a) The similarity between the original fringe image and the genetic generated fringe image, and b) the smoothness in the first and second derivatives of the fitting function.

The fitting function is chosen depending on prior knowledge of the demodulation problem, but when no prior information about the shape of (,) *x y* is known, a polynomial fitting is adequate. The adequate dimensionality of the polynomial depends on the interferogram complexity, but if we only want to estimate the phase in a small region, the dimensionality of the function can be low.

A *r-degree* approximation is used so that the phase data can be modelled like:

$$\begin{aligned} p(\mathbf{a}, \mathbf{x}, \mathbf{y}) &= a\_0 + a\_1 \mathbf{x} + a\_2 \mathbf{y} + a\_3 \mathbf{x}^2 + a\_4 \mathbf{y}^2 + a\_5 \mathbf{x} \mathbf{y} \\ &+ a\_6 \mathbf{x}^2 \mathbf{y} + a\_7 \mathbf{x} \mathbf{y}^2 + a\_8 \mathbf{x}^3 + a\_9 \mathbf{y}^3 + \dots + a\_q \mathbf{y}^r \end{aligned} \tag{3}$$

#### **3.1 Decoding chromosomes**

As it was said earlier, the GA is used to find the function parameters, in this case, vector **a** . If we use this function, the chromosome can be represented by the vector:

$$\mathbf{a} = \begin{bmatrix} a\_0 & a\_1 \dots a\_q \end{bmatrix} \tag{4}$$

A *k-bit* long bit-string is used to codify an allele; then, the chromosome has *q*x*k* bits in length. We define the search space for these parameters. The bit-string codifies a range within the limits of each parameter. The decoded value of the *i-th* parameter is:

$$\sigma\_i = L\_i^B + \frac{\left(L\_i^{II} - L\_i^B\right)}{\mathbf{2}^k - \mathbf{1}} N\_{i\prime} \tag{5}$$

where *<sup>i</sup> <sup>a</sup>* is the *i-th* parameter real value, *<sup>B</sup> <sup>i</sup> <sup>L</sup>* is the *i-th* bottom limit, *<sup>U</sup> <sup>i</sup> L* is the *i-th* upper limit, and *Ni* is the decimal basis value of the bit-string .

*B <sup>i</sup> <sup>L</sup>* and *<sup>U</sup> <sup>i</sup> L* are redefined for each sub-image. The maximum value for each parameter is calculated taking into consideration the maximal phase value on that window. These maximum values can be expressed as:

$$L\_0^B = -\pi \quad \text{and} \quad L\_0^{II} = \pi \tag{6}$$

$$L\_i^{II} = -L\_i^B \tag{7}$$

Fringe Pattern Demodulation Using Evolutionary Algorithms 89

are the coordinates in the fringe images. ( *r c*, ) are the absolute coordinates of the origin coordinate of the sub-image, *f* is the function that is adjusted in the current window to

The fitness function is applied over each window and swept over the entire image. The path that the process follows can be an arbitrary choice. It is recommended that the window has between 40% and 60% overlapped area with previously demodulated data. This condition is required so the new demodulated phase can be coupled to the previously demodulated

(a) (b)

A fitness function ( ) *<sup>p</sup> U* **a** for each sub-image is used to obtain the fitness value for the *p-th*  chromosome in the population. It form could be diverse, but most of them have a term that compares the RMS error between the original fringe pattern and the fringe pattern obtained

Additional terms are added to the fitness functions to give restrictions on the proposed phase. In (Cuevas et al, 2006) fitness function has three criteria: similarity, smoothness and

*p p N*

*U I x y f x y*

2 1 1 , cos , ,

, , , 1,

*f x ry c f x ry c*

*f x ry c xy*

,, ,

1 1 2

**a a**

*R f x r y c f x r y c mx y*

( ) *<sup>p</sup> R* **a** is the total amount the restrictions add to the fitness function, for a given window whose origin is on ( *r c*, ); *m x*(,) *y* is a mask that indicates where, inside the image, exist the

*p p*

, , , ,1 ,

2

**a a** (15)

2

(16)

Fig. 9. (a) Fringe pattern subsampled. (b) Demodulated phase.

*rR cC*

*yr xc*

overlapped phase similarity with a previously estimated phase.

1

2

*p pp*

**a aa**

*p*

**a**

from the estimated phase (similarity):

*rR cC*

*yr xc*

approximate the phase term.

phases.

$$L\_i^{\text{LI}} = \frac{4\pi F}{R1\_i^m C1\_i^n} \tag{8}$$

where *F* is twice the maximum fringe number on the window:

$$F = \mathbf{2} \cdot \max \left( F\_{\mathbf{x'}} F\_{\mathbf{y'}} \sqrt{F\_{\mathbf{x}}^2 + F\_{\mathbf{y}}^2} \right) \tag{9}$$

*Fx* and *Fy* are the maximum fringe numbers in the *x* and *y* directions. *m* is the relative grade for *x* of the *i-th* term, and *n* is the relative grade for *y* of the *i-th* term.

For the special case 0 *a ( i* 0 *),* the limits are considered to be between and . 0 *a* is eliminated from parameter vector **a** to redefine a new vector **a** :

$$\mathbf{a'} = \begin{bmatrix} a\_0 & a\_1 \dots a\_q \end{bmatrix} \tag{10}$$

so, *p*(,,) **a** *x y* can be expressed as:

$$p\left(\mathbf{a}, \mathbf{x}, y\right) = p\left(\mathbf{a}', \mathbf{x}, y\right) + a\_0 \tag{11}$$

and replacing Eq. 11 into Eq 1:

$$I(\mathbf{x}, y) = a(\mathbf{x}, y) + b(\mathbf{x}, y) \cos \left( p(\mathbf{a}', \mathbf{x}, y) + a\_0 \right) \tag{12}$$

Additionally, 0 *a* can be expressed as 0 0 *a la* 2 , *l* is an integer, and, 0 *<sup>a</sup>* <sup>2</sup> so Eq. 12 becomes:

$$I(\mathbf{x}, y) = a(\mathbf{x}, y) + b(\mathbf{x}, y) \cos \left( p(\mathbf{a}', \mathbf{x}, y) + a\_0' + 2\pi l \right) \tag{13}$$

The cosine function is periodical with period 2, so:

$$I(\mathbf{x}, y) = a(\mathbf{x}, y) + b(\mathbf{x}, y) \cos \left( p(\mathbf{a}', \mathbf{x}, y) + a\_0' \right) \tag{14}$$

Eq. 14 demonstrates that limits for 0 *a* within a range of 2 are enough to represent the phase of the fringe pattern.

In the next section, it will be seen that 0 *a* can be separated from **a** and calculate it independently. Mutation and crossover operators can be applied only over **a** , and then add the calculated value for 0 *a* to **a** , and recover vector **a** .

#### **3.2 Fitness function**

The GA, as was described in section 2, is an optimization procedure. Fitness function is always positive, and the optimal point is one minimum value. A negative sign transforms a problem from minimization to maximization. In a given generation, the maximal and minimal values or the fitness values are searched, and they are used to linearly adjust the dynamic range from 0 to A. The values are now positive, and are called aptitude. *x* and *y*

4 1 1

(8)

 and . 0 *a* is

(13)

are enough to represent the

so Eq. 12

2 2 2 max , , *F FF F F <sup>x</sup> <sup>y</sup> <sup>x</sup> <sup>y</sup>* (9)

0 1 *<sup>q</sup> aaa* **<sup>a</sup>** (10)

<sup>0</sup> *p* **a a** ,, ,, *x y p x y a* (11)

*I x* , , , cos , , *y a x y b x y p x y a*<sup>0</sup> **a** (12)

<sup>0</sup> *I xy axy bxy p xy a* , , , cos , , **<sup>a</sup>** (14)

, *l* is an integer, and, 0 *<sup>a</sup>* <sup>2</sup>

*i m n i i*

*Fx* and *Fy* are the maximum fringe numbers in the *x* and *y* directions. *m* is the relative

<sup>0</sup> *I xy axy bxy p xy a l* , , , cos , , 2 **<sup>a</sup>**

, so:

In the next section, it will be seen that 0 *a* can be separated from **a** and calculate it independently. Mutation and crossover operators can be applied only over **a** , and then add

The GA, as was described in section 2, is an optimization procedure. Fitness function is always positive, and the optimal point is one minimum value. A negative sign transforms a problem from minimization to maximization. In a given generation, the maximal and minimal values or the fitness values are searched, and they are used to linearly adjust the dynamic range from 0 to A. The values are now positive, and are called aptitude. *x* and *y*

*<sup>F</sup> <sup>L</sup> R C* 

*U*

grade for *x* of the *i-th* term, and *n* is the relative grade for *y* of the *i-th* term.

For the special case 0 *a ( i* 0 *),* the limits are considered to be between

eliminated from parameter vector **a** to redefine a new vector **a** :

so, *p*(,,) **a** *x y* can be expressed as:

and replacing Eq. 11 into Eq 1:

phase of the fringe pattern.

**3.2 Fitness function** 

becomes:

Additionally, 0 *a* can be expressed as 0 0 *a la* 2

The cosine function is periodical with period 2

Eq. 14 demonstrates that limits for 0 *a* within a range of 2

the calculated value for 0 *a* to **a** , and recover vector **a** .

where *F* is twice the maximum fringe number on the window:

are the coordinates in the fringe images. ( *r c*, ) are the absolute coordinates of the origin coordinate of the sub-image, *f* is the function that is adjusted in the current window to approximate the phase term.

The fitness function is applied over each window and swept over the entire image. The path that the process follows can be an arbitrary choice. It is recommended that the window has between 40% and 60% overlapped area with previously demodulated data. This condition is required so the new demodulated phase can be coupled to the previously demodulated phases.

Fig. 9. (a) Fringe pattern subsampled. (b) Demodulated phase.

A fitness function ( ) *<sup>p</sup> U* **a** for each sub-image is used to obtain the fitness value for the *p-th*  chromosome in the population. It form could be diverse, but most of them have a term that compares the RMS error between the original fringe pattern and the fringe pattern obtained from the estimated phase (similarity):

$$\text{CL}\left(\mathbf{a}^{p}\right) = \sum\_{y=r}^{r+R1} \sum\_{x=c}^{c+C1} \left[ I\_N\left(\mathbf{x}, y\right) - \cos\left(f\left(\mathbf{a}^{p}, x, y\right)\right) \right]^2 \tag{15}$$

Additional terms are added to the fitness functions to give restrictions on the proposed phase. In (Cuevas et al, 2006) fitness function has three criteria: similarity, smoothness and overlapped phase similarity with a previously estimated phase.

$$R\left(\mathbf{a}^{p^{\mathrm{p}}}\right) = \sum\_{y=r}^{r+R1} \sum\_{\mathbf{x}=c}^{c+C1} \begin{bmatrix} \lambda\_1 \left[ \left( f\left(\mathbf{a}^{p^{\mathrm{p}}}, \mathbf{x} - r, y - c\right) - f\left(\mathbf{a}^{p^{\mathrm{p}}}, \mathbf{x} - 1 - r, y - c\right) \right)^2 \\ + \left( f\left(\mathbf{a}^{p^{\mathrm{p}}}, \mathbf{x} - r, y - c\right) - f\left(\mathbf{a}^{p^{\mathrm{p}}}, \mathbf{x} - r, y - 1 - c\right) \right)^2 \end{bmatrix} \begin{bmatrix} \mathbf{x}(\mathbf{x}, y) \\ \mathbf{y}(\mathbf{x}, y) \end{bmatrix} \tag{16}$$

( ) *<sup>p</sup> R* **a** is the total amount the restrictions add to the fitness function, for a given window whose origin is on ( *r c*, ); *m x*(,) *y* is a mask that indicates where, inside the image, exist the

Fringe Pattern Demodulation Using Evolutionary Algorithms 91

and the synthesized fringe pattern is calculated, and those chromosomes that generated a more similar fringe pattern to the original, will have a higher probability of being selected.

As it was said earlier, parameter 0 *a* can be calculated so that mutation and crossover are

*<sup>U</sup> AaB aC aD a*

*A , B , C ,* and *D* are constants for any value given to 0 *a* . 0 *a* is chosen to be the value that

0

*US f a*

the problem is finding the minimum. There are several methods to find it, like the Newton method, the Fibonacci search, the steepest descent method, etc. The search domain in Eq. 20 is well defined and small enough, so an exhaustive search can easily found the desired value

*f xy f x y*

,, ,, 1

, , , 1,

*f x yf x y*

,, 1 ,, 1

, 1, , 1,

The weighted sum of the discrete approximation (squared differences) of the first and second derivatives is calculated. The goal is to achieve smooth solutions in the first and second derivatives. This term contributes in a negative way to the maximization fitness

*p p*

**a a**

*f xy f xy*

*p p*

**a a**

*p p*

**a a**

*f xy f xy*

*p p*

**a a**

] . If we define the function:

0

*a*  2

2

2

2

2

sin cos cos 2 sin 2

00 0 0

(19)

(20)

(21)

only applied to **a** . 0 *a* is spliced onto **a** to recover parameter vector **a** .

The missing parameter, 0 *a* , is obtained from the fringe similarity criterion by:

 

**a a**

2 , cos , 2 , sin ,

**a**

 

sin 2 ,

*N N*

*A I xy B I xy*

 

0

*a*

*S*

where

and

*C*

*D*

in the domain [

makes

of 0 *a*

0

*US a*

0

b. Smoothness criterion:

**a**

 ,

cos 2 .

1

2

process, so the chromosome decreases its fitness value.

fringe pattern*, n x*(,) *y* indicates the overlapping zone between the phase of a given window, , and the total phase, .

The third term, associated with <sup>2</sup> , allow the GA to extrapolate the trend of the adjacent demodulated regions into the actual window. As a consequence, the GA can demodulate interferograms that are noisy and are subsampled.

In WFPD (Cuevas et al, 2006) the fitness function has three criteria: similarity, smoothness and overlapped phase similarity with a previously estimated phase. It is eliminated third criterion, this simplified fitness function can make robust the phase retrieval in one window from demodulation errors in another window. The phase in different windows can be demodulated in parallel. The resulting phase segments are splicing sequentially. Noise filtering and fringe normalization are solved using alternative low-pass filtering techniques. We suppose a smooth phase with continuity in first and second derivatives.

A fitness function ( ) *<sup>p</sup> U* **a** for each sub-image is used to obtain the fitness value for the *p-th*  chromosome in the population, it can be written as:

$$\begin{split} \mathcal{U}\left(\mathbf{a}^{p}\right) &= -\sum\_{y=r}^{r+R1} \sum\_{x=c}^{c+C1} \left[ \left[ I\_{N}\left(x,y\right) - \cos\left(f\left(\mathbf{a}^{p},x,y\right)\right) \right]^{2} \right. \\ & \quad \times \left[ \left( f\left(\mathbf{a}^{p},x,y\right) - f\left(\mathbf{a}^{p},x-1,y\right) \right)^{2} \right. \\ & \quad + \left( f\left(\mathbf{a}^{p},x,y\right) - f\left(\mathbf{a}^{p},x,y-1\right) \right)^{2} \right] \\ & \quad \times \left[ \left( f\left(\mathbf{a}^{p},x+1,y\right) - f\left(\mathbf{a}^{p},x-1,y\right) \right)^{2} \right. \\ & \quad \left. + \left( f\left(\mathbf{a}^{p},x,y+1\right) - f\left(\mathbf{a}^{p},x,y-1\right) \right)^{2} \right] \right] \text{m}(x,y) . \end{split} \tag{17}$$

where , , *p p f* **a a** *x y p x y* , 1 and <sup>2</sup> are the regularization terms used to penalize high first and second phase derivatives, and to assure the smoothness of the phase. *m x*(,) *y* is a binary mask which defines the valid and invalid data image area. 1 and <sup>2</sup> values are chosen empirically, and are dependent on window size and fringe pattern regional frequency contents. Typical values are 0.005 to 0.07 for 1 and 0.00025 to 0.002 for 2 for a 7x7 , 9x9 or 11x11 size window.

The following terms were used in the fitness function:

a. Fringe similarity criterion:

$$\left[I\_N(\mathbf{x}, \mathbf{y}) - \cos\left(f\left(\mathbf{a}^{\mathcal{P}}, \mathbf{x}, \mathbf{y}\right)\right)\right]^2\tag{18}$$

The fringe pattern is considered to be normalized on the range [-1,1], or a binary version of the original. There are several methods in the literature for the normalizing of binary threshold fringe patterns [16]. The normalized genetic fringe image is calculated using the cosine of the fitting function. The sum of the squared differences between original fringes

fringe pattern*, n x*(,) *y* indicates the overlapping zone between the phase of a given window,

demodulated regions into the actual window. As a consequence, the GA can demodulate

In WFPD (Cuevas et al, 2006) the fitness function has three criteria: similarity, smoothness and overlapped phase similarity with a previously estimated phase. It is eliminated third criterion, this simplified fitness function can make robust the phase retrieval in one window from demodulation errors in another window. The phase in different windows can be demodulated in parallel. The resulting phase segments are splicing sequentially. Noise filtering and fringe normalization are solved using alternative low-pass filtering techniques.

A fitness function ( ) *<sup>p</sup> U* **a** for each sub-image is used to obtain the fitness value for the *p-th* 

1 1 2

2

, cos , ,

2

(17)

<sup>2</sup> are the regularization terms used to penalize high

**<sup>a</sup>** (18)

1 and

1 and 0.00025 to 0.002 for

<sup>2</sup> values are

2 for a

2

2

*f xy f x y*

,, ,, 1

*p p*

**a a**

, , , 1,

*p p N*

*U I xy f xy*

**a a**

*f x yf x y*

first and second phase derivatives, and to assure the smoothness of the phase. *m x*(,) *y* is a

chosen empirically, and are dependent on window size and fringe pattern regional

 <sup>2</sup> , cos , , *<sup>p</sup> I xy f xy <sup>N</sup>*

The fringe pattern is considered to be normalized on the range [-1,1], or a binary version of the original. There are several methods in the literature for the normalizing of binary threshold fringe patterns [16]. The normalized genetic fringe image is calculated using the cosine of the fitting function. The sum of the squared differences between original fringes

, 1, , 1,

*f xy f xy mxy*

,, 1 ,, 1 , .

*p p*

**a a**

binary mask which defines the valid and invalid data image area.

*p p*

**a a**

*f xy f xy*

*p p*

**a a**

<sup>2</sup> , allow the GA to extrapolate the trend of the adjacent

We suppose a smooth phase with continuity in first and second derivatives.

*rR cC*

*yr xc*

interferograms that are noisy and are subsampled.

chromosome in the population, it can be written as:

1

2

1 and

frequency contents. Typical values are 0.005 to 0.07 for

The following terms were used in the fitness function:

where , , *p p f* **a a** *x y p x y* ,

7x7 , 9x9 or 11x11 size window.

a. Fringe similarity criterion:

, and the total phase, .

The third term, associated with

and the synthesized fringe pattern is calculated, and those chromosomes that generated a more similar fringe pattern to the original, will have a higher probability of being selected.

As it was said earlier, parameter 0 *a* can be calculated so that mutation and crossover are only applied to **a** . 0 *a* is spliced onto **a** to recover parameter vector **a** .

The missing parameter, 0 *a* , is obtained from the fringe similarity criterion by:

$$\begin{aligned} \frac{\partial I L\_{\!
u}}{\partial a\_{0}} &= A \sin \left(a\_{0}\right) + B \cos \left(a\_{0}\right) - C \cos \left(2a\_{0}\right) - D \sin \left(2a\_{0}\right) \\ \text{where} \\ A &= \sum 2I\_{N} \left(x, y\right) \cos \left(\mathbf{a}'\right), \\ B &= \sum 2I\_{N} \left(x, y\right) \sin \left(\mathbf{a}'\right), \\ C &= \sum \sin \left(2\mathbf{a}'\right), \\ \text{and} \\ D &= \sum \cos \left(2\mathbf{a}'\right). \end{aligned} \tag{19}$$

*A , B , C ,* and *D* are constants for any value given to 0 *a* . 0 *a* is chosen to be the value that makes 0 *US a* in the domain [ ,] . If we define the function:

$$f\left(a\_0\right) = \left(\frac{\partial \mathcal{U}\_S}{\partial a\_0}\right)^2\tag{20}$$

the problem is finding the minimum. There are several methods to find it, like the Newton method, the Fibonacci search, the steepest descent method, etc. The search domain in Eq. 20 is well defined and small enough, so an exhaustive search can easily found the desired value of 0 *a*

b. Smoothness criterion:

0

$$\begin{aligned} &\lambda\_1 \left[ \left( f\left( \mathbf{a}^{p^\prime}, \mathbf{x}, y \right) - f\left( \mathbf{a}^{p^\prime}, \mathbf{x} - \mathbf{1}, y \right) \right)^2 \right] \\ &+ \left( f\left( \mathbf{a}^{p^\prime}, \mathbf{x}, y \right) - f\left( \mathbf{a}^{p^\prime}, \mathbf{x}, y - \mathbf{1} \right) \right)^2 \right] \\ &\lambda\_2 \left[ \left( f\left( \mathbf{a}^{p^\prime}, \mathbf{x} + \mathbf{1}, y \right) - f\left( \mathbf{a}^{p^\prime}, \mathbf{x} - \mathbf{1}, y \right) \right)^2 \right] \\ &+ \left( f\left( \mathbf{a}^{p^\prime}, \mathbf{x}, y + \mathbf{1} \right) - f\left( \mathbf{a}^{p^\prime}, \mathbf{x}, y - \mathbf{1} \right) \right)^2 \right] \end{aligned} \tag{21}$$

The weighted sum of the discrete approximation (squared differences) of the first and second derivatives is calculated. The goal is to achieve smooth solutions in the first and second derivatives. This term contributes in a negative way to the maximization fitness process, so the chromosome decreases its fitness value.

Fringe Pattern Demodulation Using Evolutionary Algorithms 93

where *k* is a constant that indicates in which generation 0 *Ti T* ( ) /3 . The process of

In the GA, a Crossover probability *Pc* is given to exchange the genetic information between two chromosomes, so that if a randomly generated number is smaller than it, the chromosomes are mixed to produce two new individuals, and if the number is bigger that *Pc* , the two original chromosomes are added to the new population. In the phase recovery from a fringe pattern, a two point crossover was used, where two crossover points are randomly generated, In this case, it is required to swap the central segments between

Mutation is the best known mechanism to produce variations. Alleles of the chromosomes are randomly replaced by others in a random way. Mutation is treated like a background

In GA, a mutation probability *Pm* is defined. For each position, a random number is generated, and if it is smaller than *Pm* , the allele is changed for another. In a binary

GA convergence depends mainly on population size. With a large population, convergence is achieved in a smaller number of iterations, but the processing time is increased . To stop the GA process, different convergence measures can be employed. The maximum number of

As it was mentioned before, phase demodulation is achieved through window segmentation of the fringe pattern. The GA demodulates the phase inside each window, independently from others, so this process can be made in parallel. It is supposed that the demodulated phase field in each window is differentiated from the corresponding real phase field only by the concavity and the DC bias. Then, a splicing procedure is required to connect different GA fitted phase windows and determine the whole phase field (,) *x y* . The splicing

1. The demodulated phase from the first window is used as the initial reference.

 max max 1 max *i i i*

. (26)

iterations is chosen at *B* . The algorithm can be stopped when a relative error

process is carried out in a sequential way (e.g., row by row).

chromosome code, a *'0'* is changed for *'1'* and a *'1'* is changed for *'0'* .

selection and crossover is repeated until an entire new population is obtained.

**3.4 Crossover operator** 

chromosomes.

**3.5 Mutation operator** 

**3.6 GA convergence** 

than a predefined limit

**3.7 Splicing process** 

It is described as follows:

operator to ensure variety in the population.

: exp / *Ti T i k <sup>o</sup>* (25)

is smaller

This term is necessary because of the use of a polynomial function. We use a high degree polynomial interpolation, and oscillations are present on the estimated phase; they can introduce errors into the demodulation process. 1 and 2 are chosen to minimize these oscillations.

#### **3.3 Selection operator**

Chromosomes are evaluated using the fitness function. The result of the evaluation is their fitness value. Fitness value of the entire population is stretched in the range 0 to A. In each generation, the minimum and maximum fitness values are obtained to produce a normalized fitness value:

$$\left(NFv\left(i\right)\_{\mathcal{C}} = \left(FV\left(i\right)\_{\mathcal{C}} - \min\left(i\right)\right)\frac{A}{\max\left(i\right) - \min\left(i\right)}\right\}\tag{22}$$

where ( ) *NFv i <sup>c</sup>* is the normalized fitness value in the *i-th* generation for the *c-th* chromosome, and *min*(*i*) and *max*(*i*) are the minimum and maximum values of ( ) *FV i <sup>c</sup>* , the fitness value for a member in the *i-th* generation.

The normalized fitness value is used to calculate the probability selection *Ps* of a given chromosome. In order to represent a sexual reproduction, pairs of chromosomes are used to produce a new population. Two chromosomes are randomly selected with a *Ps* that is proportional to its normalized fitness value.

For the *c-th* chromosome, a random number *<sup>s</sup> r* is generated. If *s s r P* , the chromosome is selected. Two chromosomes are picked this way, and the crossover operator is applied over them to create two new chromosomes for the new population.

*Ps* can be calculated in many ways. The easiest is the Roulette Wheel method, which *Ps* is calculated by:

$$P(i)\_S = \frac{NFv(i)\_S}{\sum\_S NFv(i)\_S} \tag{23}$$

The Roulette wheel method has the disadvantage of being able to produce a premature convergence, so a Boltzmann selection method was used to avoid this inconvenient:

$$P(i)\_S = \frac{\exp\left[\left\lceil NFv(i)\_S \right\rceil \right] T(i)}{\sum\_S \exp\left[\left\lceil NFv(i)\_S \right\rceil \right] T(i)},\tag{24}$$

where *T i*( ) *T*(*i*) is the temperature in the *i-th* generation. *T*(0) is a large value, so *Ps* is similar for all chromosomes in the initial generation. *T* is decreased over the generations, so the *Ps* for the best adapted is progressively higher than for the least adapted. In this way, there is the opportunity to explore all the space of solution, so the probability of falling into a local minimum is lowered. *T* is varied by:

$$T\left(i\right) = T\_o \exp\left(-i\left/k\right)\tag{25}$$

where *k* is a constant that indicates in which generation 0 *Ti T* ( ) /3 . The process of selection and crossover is repeated until an entire new population is obtained.

#### **3.4 Crossover operator**

92 Advanced Topics in Measurements

This term is necessary because of the use of a polynomial function. We use a high degree polynomial interpolation, and oscillations are present on the estimated phase; they can

Chromosomes are evaluated using the fitness function. The result of the evaluation is their fitness value. Fitness value of the entire population is stretched in the range 0 to A. In each generation, the minimum and maximum fitness values are obtained to produce a

> min max min *C C*

where ( ) *NFv i <sup>c</sup>* is the normalized fitness value in the *i-th* generation for the *c-th* chromosome, and *min*(*i*) and *max*(*i*) are the minimum and maximum values of ( ) *FV i <sup>c</sup>* , the

The normalized fitness value is used to calculate the probability selection *Ps* of a given chromosome. In order to represent a sexual reproduction, pairs of chromosomes are used to produce a new population. Two chromosomes are randomly selected with a *Ps* that is

For the *c-th* chromosome, a random number *<sup>s</sup> r* is generated. If *s s r P* , the chromosome is selected. Two chromosomes are picked this way, and the crossover operator is applied over

*Ps* can be calculated in many ways. The easiest is the Roulette Wheel method, which *Ps* is

*NFv i*

*NFv i*

*S*

The Roulette wheel method has the disadvantage of being able to produce a premature

 exp ( ) ( ) exp ( ) ( ) *<sup>S</sup>*

where *T i*( ) *T*(*i*) is the temperature in the *i-th* generation. *T*(0) is a large value, so *Ps* is similar for all chromosomes in the initial generation. *T* is decreased over the generations, so the *Ps* for the best adapted is progressively higher than for the least adapted. In this way, there is the opportunity to explore all the space of solution, so the probability of falling into

*S*

convergence, so a Boltzmann selection method was used to avoid this inconvenient:

*<sup>s</sup> P i*

*S*

*P i*

 *S*

*NFv i T i*

*NFv i T i s*

*S*

(23)

, (24)

*<sup>A</sup> NFv i FV i i*

1 and *i i* , (22)

2 are chosen to minimize these

introduce errors into the demodulation process.

fitness value for a member in the *i-th* generation.

proportional to its normalized fitness value.

a local minimum is lowered. *T* is varied by:

them to create two new chromosomes for the new population.

oscillations.

calculated by:

**3.3 Selection operator** 

normalized fitness value:

In the GA, a Crossover probability *Pc* is given to exchange the genetic information between two chromosomes, so that if a randomly generated number is smaller than it, the chromosomes are mixed to produce two new individuals, and if the number is bigger that *Pc* , the two original chromosomes are added to the new population. In the phase recovery from a fringe pattern, a two point crossover was used, where two crossover points are randomly generated, In this case, it is required to swap the central segments between chromosomes.

#### **3.5 Mutation operator**

Mutation is the best known mechanism to produce variations. Alleles of the chromosomes are randomly replaced by others in a random way. Mutation is treated like a background operator to ensure variety in the population.

In GA, a mutation probability *Pm* is defined. For each position, a random number is generated, and if it is smaller than *Pm* , the allele is changed for another. In a binary chromosome code, a *'0'* is changed for *'1'* and a *'1'* is changed for *'0'* .

#### **3.6 GA convergence**

GA convergence depends mainly on population size. With a large population, convergence is achieved in a smaller number of iterations, but the processing time is increased . To stop the GA process, different convergence measures can be employed. The maximum number of iterations is chosen at *B* . The algorithm can be stopped when a relative error is smaller than a predefined limit :

$$\varepsilon = \left| \frac{\max(i) - \max(i-1)}{\max(i)} \right|. \tag{26}$$

#### **3.7 Splicing process**

As it was mentioned before, phase demodulation is achieved through window segmentation of the fringe pattern. The GA demodulates the phase inside each window, independently from others, so this process can be made in parallel. It is supposed that the demodulated phase field in each window is differentiated from the corresponding real phase field only by the concavity and the DC bias. Then, a splicing procedure is required to connect different GA fitted phase windows and determine the whole phase field (,) *x y* . The splicing process is carried out in a sequential way (e.g., row by row).

It is described as follows:

1. The demodulated phase from the first window is used as the initial reference.

Fringe Pattern Demodulation Using Evolutionary Algorithms 95

1. From the original image, we obtain the image that shows the gradient. This image is obtained by correlating image *I x*(,) *y* of *R C*x dimensions with the Sobel operators.

*Sx*

*Sy*

At each point, the magnitude of the gradient is obtained:

used to perform the segmentation of image *M*(,) *x y* using:

filter of dimensions *N N*x is defined as:

The correlation is defined as:

frequency content.

*F x*(,) *y* is thresholded in three zones:

(29)

(30)

(33)

(35)

121 000 121

*k k* , ,,

2. A median filter is used to detect the zones where fringe frequency increases. A median

/2 /2

*N N*

*iN jN*

, <sup>x</sup>

*Mxy N N* 

/2 /2

3. The image obtained by means of this process shows brighter zones in the regions with high frequency. This image is segmented into three regions of low, medium and high

The brightest point, *max( M )* , and the darkest point, *min( M )* , are located. Their values are

, min , max min *Mxy M Fxy <sup>M</sup> <sup>M</sup>*

 

*Mxy M M M*

, min 0 0.3 <sup>0</sup> max min

, min 2 1 0.7 max min

*Mxy M M M*

, min , 1 0.7 0.3 max min

*Mxy M FT x y M M*

*C x <sup>y</sup> I i <sup>j</sup> Sxi y j* (31)

,

*Ix iy j*

2 2 *S SS x y* (32)

(34)

*i j*

2. From the GA current fitted phase window (,) ( ,,) *<sup>p</sup> x y f* **a** *x y* , i a second phase field is calculated (,) *x y* with a negative concavity) as (,) (,) *x y x y* , or (,) ( ,,) *<sup>p</sup> x y f* **a** *x y* . 3. Two DC bias are calculated, one for (,) *x y* and one for (,) *x y* using:

$$\frac{\sum\_{\mathbf{x}, y \in N} \left( \Phi(\mathbf{x}, y) - \phi(\mathbf{a}^{\mathcal{P}}, \mathbf{x}, y) \right)}{A} \text{and } DC\_2 = \frac{\sum\_{\mathbf{x}, y \in N} \left( \Phi(\mathbf{x}, y) - \phi'(\mathbf{a}^{\mathcal{P}}, \mathbf{x}, y) \right)}{A},\tag{27}$$

where *N* is the overlapped neighbourhood region, and *A* is the overlapped area (pixel2) of *N* .

4. The RMS error for the two alternative phase window fields, (,) *x y* and (,) *x y* , compared against (,) *x y* is calculated as:

$$RMS\_1 = \frac{\sum\_{\mathbf{x}, \mathbf{y} \in \mathcal{N}} \left( \Phi(\mathbf{x}, y) - \phi\left(\mathbf{a}^p, \mathbf{x}, y\right) - DC\_1\right)^2}{A} \text{ and } RMS\_2 = \frac{\sum\_{\mathbf{x}, \mathbf{y} \in \mathcal{N}} \left( \Phi(\mathbf{x}, y) - \phi'\left(\mathbf{a}^p, \mathbf{x}, y\right) - DC\_2\right)^2}{A} \tag{28}$$


#### **4. Adjustable genetic algorithm**

In previous works, the window has a fixed dimension. The *RMS* error for a given window varies due to frequency content of the image, the window size and the values given in the smoothness criterion. High frequency zones are best demodulated using small windows; the demodulating process in low frequency zones is better when using a large window. In fact, using a small window in low frequency zones introduces unnecessary noise due to the splicing process for a certain region. This frequency estimator is used again to determine the best demodulation path; beginning in low frequency regions, it develops across increasing complexity regions. As a result, regions that are easily demodulated can be used to guide the splicing of higher difficulty regions.

Finally, a modification on the GA is presented to determine the smoothness criterion automatically. In a previous work, some values to 1 and 2 were proposed to be used for certain window values. In this work, this smoothness criterion is calculated by the GA itself, adding two genes to the chromosome; this codifies this criterion in real numbers. As a result, the GA calculates the coefficient vector of the polynomial and the smoothness parameters needed for the correct estimation of the phase at the same time. This modification allows one to have an algorithm that depends less on external characterization.

#### **4.1 Local frequency estimator**

In this section, a method to classify regions on the image according to their frequency content is described. This process is necessary to determine the size of the window needed to demodulate a certain region. A given fringe pattern is segmented into two, three or more regions.

1. From the original image, we obtain the image that shows the gradient. This image is obtained by correlating image *I x*(,) *y* of *R C*x dimensions with the Sobel operators.

$$S\_{\chi} = \begin{vmatrix} +1 & 0 & -1 \\ +2 & 0 & -2 \\ +1 & 0 & -1 \end{vmatrix} \tag{29}$$

$$S\_y = \begin{bmatrix} +1 & +2 & +1 \\ 0 & 0 & 0 \\ -1 & -2 & -1 \end{bmatrix} \tag{30}$$

The correlation is defined as:

94 Advanced Topics in Measurements

and

where *N* is the overlapped neighbourhood region, and *A* is the overlapped area (pixel2) of

**a a**

, , 1 2

4. The RMS error for the two alternative phase window fields,

, , 1 2

and

*DC*<sup>2</sup> ) is spliced onto the demodulated phase field .

*xy N xy N*

*xy N xy N*

5. The phase described by the function with the minimum *RMS* error value (

(,) *x y* and one for

*A A*

2 2

*x y x y DC x y x y DC*

*p p*

**a a**

, ,, , ,,

*A A*

6. If there are more windows to splice, the next window in the sequence is labelled as the current window and goes to step 2. Otherwise, the splicing process is finished.

In previous works, the window has a fixed dimension. The *RMS* error for a given window varies due to frequency content of the image, the window size and the values given in the smoothness criterion. High frequency zones are best demodulated using small windows; the demodulating process in low frequency zones is better when using a large window. In fact, using a small window in low frequency zones introduces unnecessary noise due to the splicing process for a certain region. This frequency estimator is used again to determine the best demodulation path; beginning in low frequency regions, it develops across increasing complexity regions. As a result, regions that are easily demodulated can be used to guide

Finally, a modification on the GA is presented to determine the smoothness criterion

certain window values. In this work, this smoothness criterion is calculated by the GA itself, adding two genes to the chromosome; this codifies this criterion in real numbers. As a result, the GA calculates the coefficient vector of the polynomial and the smoothness parameters needed for the correct estimation of the phase at the same time. This modification allows one to have an algorithm that depends less on external characterization.

In this section, a method to classify regions on the image according to their frequency content is described. This process is necessary to determine the size of the window needed to demodulate a certain region. A given fringe pattern is segmented into two, three or more

1 and , ,, , ,,

*xy xy xy xy*

*p p*

 

1 2

*x y f* **a** *x y* , i a second phase field is

(,) *x y* using:

 (,) (,) *x y x y* , or (,) ( ,,) *<sup>p</sup>* 

> 

  (,) *x y* and

2 were proposed to be used for

*x y f* **a** *x y* .

, (27)

(28)

*DC*1 or

(,) *x y* ,

2. From the GA current fitted phase window (,) ( ,,) *<sup>p</sup>*

(,) *x y* with a negative concavity) as

*DC DC*

compared against (,) *x y* is calculated as:

*RMS RMS*

**4. Adjustable genetic algorithm** 

the splicing of higher difficulty regions.

**4.1 Local frequency estimator** 

regions.

automatically. In a previous work, some values to

calculated

*N* .

3. Two DC bias are calculated, one for

$$\mathcal{C}\_{k}\left(\mathbf{x},\mathbf{y}\right) = \sum\_{i} \sum\_{j} I\left(i,j\right) S\_{k}\left(\mathbf{x}+i,\mathbf{y}+j\right) \tag{31}$$

At each point, the magnitude of the gradient is obtained:

$$\left|\mathbf{S}\right| = \sqrt{\mathbf{S}\_x^2 + \mathbf{S}\_y^2} \tag{32}$$

2. A median filter is used to detect the zones where fringe frequency increases. A median filter of dimensions *N N*x is defined as:

$$M(\mathbf{x}, y) = \frac{\sum\_{i=-N/2}^{N/2} \sum\_{j=-N/2}^{N/2} I(\mathbf{x} + i, y + j)}{N \mathbf{x} N} \tag{33}$$

3. The image obtained by means of this process shows brighter zones in the regions with high frequency. This image is segmented into three regions of low, medium and high frequency content.

The brightest point, *max( M )* , and the darkest point, *min( M )* , are located. Their values are used to perform the segmentation of image *M*(,) *x y* using:

$$F(\mathbf{x}, y) = \frac{\left[M(\mathbf{x}, y) - \min(M)\right]}{\max(M) - \min(M)}\tag{34}$$

*F x*(,) *y* is thresholded in three zones:

$$FT(x,y) = \begin{cases} 0 & 0.3 > \frac{\left[M(x,y) - \min(M)\right]}{\max(M) - \min(M)} \ge 0\\ 1 & 0.7 > \frac{\left[M(x,y) - \min(M)\right]}{\max(M) - \min(M)} \ge 0.3\\ 2 & 1 \ge \frac{\left[M(x,y) - \min(M)\right]}{\max(M) - \min(M)} \ge 0.7 \end{cases} \tag{35}$$

Fringe Pattern Demodulation Using Evolutionary Algorithms 97

f. The points surrounding (,) *x y* are scanned while varying index *i* and index *j* from -1

*S x i y j* 

g. Beginning on S1, a non-empty stack is searched. The point (,) *x y* on top of that stack *Si*

*n n Cn xy Lxy*

 

h. If *n RC* x steps 'f' and 'g' are repeated. Points stored in *C n*( ) indicate the

GAs have great possibilities to develop robust algorithms, varying their internal parameters according to the task to be performed. In this paper, we propose using GAs to adjust the

The original image is shown in fig. 10. A media filter is applied onto the gradient image,

Maximum and minimum values are localized, and the image is discretized into three main

When the demodulation window is positioned in a given region, the size window is varied to obtain a better adjustment. The last stage is to introduce these regions into the

A quality map is used to determine the demodulation path. Low frequency regions are demodulated first by adding the discretized map of frequencies to the original image. A

filling algorithm is used to determine the demodulation path using this quality map.

 

if 1, 1 0 , *IFT x i y j*

*Lx y*

,

1 , , 1

(39)

(40)

to +1, and their coordinates stored in their corresponding stacks:

is brought out. The next actions are performed:

**4.3 Genetic algorithms internal parameters automatic adjust** 

yielding high values in regions with high fringe density.

regions. A given window size is assigned to each region (Fig 11).

demodulation path to follow.

internal parameters of this algorithm.

**4.3.1 Regularization terms** 

Fig. 10. Original image.

demodulation process.

Each zone indicates the relative level of frequency content in *I x*(,) *y* . *F x*(,) *y* and *FT x*(,) *y* are used to obtain the demodulation map, and to indicate the window size suited for a certain region.

#### **4.2 Quality map and demodulation path**

The windows where the polynomial is adjusted are extracted from *I x*(,) *y* following the fringes, like in the phase tracker method. To achieve this result, in a previous work a quality map is obtained from *I x*(,) *y* by thresholding it on *Q* levels, and using a filling algorithm to obtain a continuous path along the fringes.

In this work, we propose a method to obtain a different quality map. It is desirable that the demodulation path fulfils more conditions other than following the fringes. The conditions proposed are:


We postulate that criterions b and c are identical, so the problem is reduce to incorporating the second criterion into the quality map.

To achieve this goal, *F x*(,) *y* is used. *F x*(,) *y* is added to *I x*(,) *y ,* and the new image *IF x*(,) *y* is used to obtain the quality map, by thresholding it on *Q* levels.

$$\text{IF}\left(\mathbf{x},\mathbf{y}\right) = I\left(\mathbf{x},\mathbf{y}\right) + F\left(\mathbf{x},\mathbf{y}\right) \tag{36}$$

$$IFT\left(x, y\right) = Q \frac{\left[IF\left(x, y\right) - \min\left(IF\right)\right]}{\max\left(IF\right) - \min\left(IF\right)}\tag{37}$$

IFT is used to generate a new demodulation path that begins on low frequencies and follows the fringes until it reaches high frequencies.

The algorithm used to generate the demodulation path is :


$$\begin{array}{c} n \leftarrow 0\\ \mathsf{C}(n) \leftarrow (\mathsf{x}, y) \\ L(\mathsf{x}, y) \leftarrow 1 \end{array} \tag{38}$$

Each zone indicates the relative level of frequency content in *I x*(,) *y* . *F x*(,) *y* and *FT x*(,) *y* are used to obtain the demodulation map, and to indicate the window size suited for a

The windows where the polynomial is adjusted are extracted from *I x*(,) *y* following the fringes, like in the phase tracker method. To achieve this result, in a previous work a quality map is obtained from *I x*(,) *y* by thresholding it on *Q* levels, and using a filling algorithm to

In this work, we propose a method to obtain a different quality map. It is desirable that the demodulation path fulfils more conditions other than following the fringes. The conditions

We postulate that criterions b and c are identical, so the problem is reduce to incorporating

To achieve this goal, *F x*(,) *y* is used. *F x*(,) *y* is added to *I x*(,) *y ,* and the new image *IF x*(,) *y*

, min , max min *IF x y IF*

IFT is used to generate a new demodulation path that begins on low frequencies and follows

d. An array of stacks [ 1 2 *SS S* , ,, *<sup>Q</sup>* ] is defined. All stacks have *R C*x dimensions. The initial point is placed on the stack corresponding to its value. i.e. if *IFT x y* (,) 1 , then

e. An array of coordinates *C n*( ) of *R C*x dimensions is defined. The coordinates of the first point are stored in it. An index n is defined, and its value is set to '0'. *L x*(,) *y* is set to '1':

> *n Cn xy Lxy*

 

 

0 , , 1

a. An array with al point labelled with some level (quality map *IFT x*(,) *y* ) is needed b. In the frequency map, *F x*(,) *y* , the minimum frequency area is searched, and the point

c. A matrix *L x*(,) *y* of *R R*x dimensions is defined. All its values are set to '0'.

*IF x* ,,, *y I x y F x y* (36)

(38)

*IFT x y Q IF IF* (37)

b. Follow the frequency contents from low frequencies to high frequencies. c. Sequentially demodulate regions with increasing levels of difficulty.

is used to obtain the quality map, by thresholding it on *Q* levels.

certain region.

proposed are:

a. Follow the fringes.

**4.2 Quality map and demodulation path** 

obtain a continuous path along the fringes.

the second criterion into the quality map.

the fringes until it reaches high frequencies.

that is *min( F )* is chosen.

The algorithm used to generate the demodulation path is :

coordinates (,) *x y* are stored in stack *S*<sup>1</sup> .

f. The points surrounding (,) *x y* are scanned while varying index *i* and index *j* from -1 to +1, and their coordinates stored in their corresponding stacks:

$$\begin{aligned} \text{if} \quad &L\left(\mathbf{x} + \mathbf{1}, y + \mathbf{1}\right) = \mathbf{0} \\ \text{S}\_{\text{IFT}\left(\mathbf{x} + \mathbf{i}, y + \mathbf{j}\right)} &\leftarrow \left(\mathbf{x} + \mathbf{i}, y + \mathbf{j}\right) \end{aligned} \tag{39}$$

g. Beginning on S1, a non-empty stack is searched. The point (,) *x y* on top of that stack *Si* is brought out. The next actions are performed:

$$\begin{array}{c} n \leftarrow n+1\\ \mathsf{C}(n) \leftarrow (x,y) \\ L(x,y) \leftarrow 1 \end{array} \tag{40}$$

h. If *n RC* x steps 'f' and 'g' are repeated. Points stored in *C n*( ) indicate the demodulation path to follow.

#### **4.3 Genetic algorithms internal parameters automatic adjust**

GAs have great possibilities to develop robust algorithms, varying their internal parameters according to the task to be performed. In this paper, we propose using GAs to adjust the internal parameters of this algorithm.

#### **4.3.1 Regularization terms**

The original image is shown in fig. 10. A media filter is applied onto the gradient image, yielding high values in regions with high fringe density.

Fig. 10. Original image.

Maximum and minimum values are localized, and the image is discretized into three main regions. A given window size is assigned to each region (Fig 11).

When the demodulation window is positioned in a given region, the size window is varied to obtain a better adjustment. The last stage is to introduce these regions into the demodulation process.

A quality map is used to determine the demodulation path. Low frequency regions are demodulated first by adding the discretized map of frequencies to the original image. A filling algorithm is used to determine the demodulation path using this quality map.

Fringe Pattern Demodulation Using Evolutionary Algorithms 99

The algorithm needs surfaces that are continuous on the first and second derivatives, so, regions in the original dolphin figure that do not fulfill these requirements are cut from the

(a) (b)

Fig. 15. (a) Result of binarize fig 14; (b) Fringe pattern associated with the demodulated phase.

(a) (b)

Fig. 16. (a) Phase demodulated from fig. 15(a); (b) Phase smoothed using a media filter 7x7.

The resulting image is binarized to reduce noise interference in the demodulation process.

The demodulated phase is smoothed using a 7x7 media filter, after using a contrast

Fig. 14. Image after noise filtering using a median filter.

This binarized image is fed to the algorithm.

enhancement and a low pass filter.

mask.

Fig. 11. Gradient (a) smoothed with a 9x9 window (media filter) (b) Classification on high, medium and low frequencies.

Fig. 12. (a) Quality map, 15 levels; (b) Demodulation path that follows fringes and increased frequency regions.

### **5. Results**

The proposed algorithm is used to demodulate a shadow moiré image taken from a modeled figure of a dolphin. The noise in the original shadow moiré is filtered through the use of a median filter. This filter is used only on an area determined by a mask that indicates the allowed area on which to perform the demodulation process.

Fig. 13. (a) Fringe pattern shadow moiré; (b) Mask *m x*(,) *y .* 

(a) (b) (c)

Fig. 11. Gradient (a) smoothed with a 9x9 window (media filter) (b) Classification on high,

(a) (b)

Fig. 12. (a) Quality map, 15 levels; (b) Demodulation path that follows fringes and increased

The proposed algorithm is used to demodulate a shadow moiré image taken from a modeled figure of a dolphin. The noise in the original shadow moiré is filtered through the use of a median filter. This filter is used only on an area determined by a mask that indicates

(a) (b)

the allowed area on which to perform the demodulation process.

Fig. 13. (a) Fringe pattern shadow moiré; (b) Mask *m x*(,) *y .* 

medium and low frequencies.

frequency regions.

**5. Results** 

The algorithm needs surfaces that are continuous on the first and second derivatives, so, regions in the original dolphin figure that do not fulfill these requirements are cut from the mask.

Fig. 14. Image after noise filtering using a median filter.

Fig. 15. (a) Result of binarize fig 14; (b) Fringe pattern associated with the demodulated phase.

Fig. 16. (a) Phase demodulated from fig. 15(a); (b) Phase smoothed using a media filter 7x7.

The resulting image is binarized to reduce noise interference in the demodulation process. This binarized image is fed to the algorithm.

The demodulated phase is smoothed using a 7x7 media filter, after using a contrast enhancement and a low pass filter.

Fringe Pattern Demodulation Using Evolutionary Algorithms 101

Cuevas FJ, Servin M, Rodríguez-Vera R (1999) *Depth recovery using radial basis functions.* Opt

Cuevas FJ, Servin M, Stavroudis ON, Rodríguez-Vera R (2000). *Multi layer neural* 

Cuevas F.J., Mendoza F., Servin M., Sossa-Azuela J.H. (2006*) Window fringe pattern* 

Cuevas FJ, Sossa-Azuela JH, Servin M (2002) *A parametric method applied to phase recovery from a fringe pattern based on a genetic algorithm.* Opt Commun 203:213–223. Fernández A, Kaufmann GH, Doval AF, Blanco-Garcia J, Fernández JL (1998) *Comparison of* 

Ghiglia, D.C., and Romero, L.A., *Robust two dimensional weighted and unweighted phase* 

Goldberg D (1989) *Genetic algorithms: search and optimization algorithms*. Addison-Wesley,

Holland JH (1975) *Adaptation in natural and artificial systems*. University of Michigan Press,

Juan Antonio Quiroga, José Antonio Gómez-Pedrero, Ángel Garća-Botella, *Algorithm for* 

Juan Antonio Quiroga, Manuel Servin, *Isotropic n-dimensional fringe pattern normalization* ,

L.E. Toledo & F.J. Cuevas, Optical *Metrology by Fringe Processing on Independent* 

Larkin KG, Bone DJ, Oldfield MA (2001) *Natural demodulation of two-dimensional fringe* 

Malacara D, Servin M, Malacara Z (1998) *Interferogram analysis for optical testing*. Marcel

Noé Alcalá Ochoa, A.A. Silva-Moreno, *Normalization and noise-reduction algorithm for fringe* 

Quiroga JA, Gómez-Pedrero JA, García-Botella A (2001) Algorithm *for fringe pattern* 

Servin M, Rodriguez-Vera R (1993) *Two dimensional phaselocked loop demodulation of* 

Servin M, Marroquín JL, Cuevas FJ (2001) *Fringe-follower regularized phase tracker for demodulation of closed-fringe interferograms*. J Opt Soc Am A 18:689–695. Servin M, Quiroga JA, Cuevas FJ (2001) *Demodulation of carrier fringe pattern by the use of non-*

Ichioka Y, Inuiya M (1972) *Direct phase detecting system.* Appl Opt 11:1507–1514.

*network applied to phase and depth recovery from fringe patterns*. Opt Commun 181:239–

*demodulation by multi-functional fitting using a genetic algorithm*. Opt. Commun.

*carrier renoval methods in the analysis of TV holography fringes by the Fourier* 

*unwrapping that uses fast transforms and iterative methods*, J. Opt. Soc. Am. A, 11, 107-

*fringe pattern normalization,* Optics Communications, Volume 197, Issues 1-3, 15

Optics Communications, Volume 224, Issues 4-6, 1 September 2003, Pages 221-

*Windows Using a Genetic Algorithm*, Springer Verlag Experimental Mechanics 48, pp

*patterns in general background of the spiral phase quadrature transform.* J Opt Soc Am A

Communication 163:270–277.

*transformmethod*. Opt Eng 37:2899–2905.

259.

261:231-239.

117, 1994.

Michigan.

227.

559-569.

18:1862–1870.

Dekker, New York.

*patterns*, Optics Communications 270: 161-168.

*recursive digital phase locked loop*. Opt Commun 200:87–97.

*normalization*. Opt Communications 197:43.

*interferogram*. J Mod Opt 40:2087–2094.

Reading, MA.

September 2001, Pages 43-51
