<< unwrapl SIP - Scilab Image Processing Toolbox watershed >>

SIP - Scilab Image Processing Toolbox >> SIP - Scilab Image Processing Toolbox > unwrapp

unwrapp

Unwraps phased images by path following

Calling Sequence

[unwrapped_phase,jumps] = unwrapp(image,merit_function, ...
[line_start,column_start,threshold])

Parameters

image
The gray-level image containing the wrapped phase.
merit_function
The quality of each pixel is estimated: the result is stored in a "merit function" (mf). Some merit functions can be laplacien, variance... A good quality pixel has a low merit function.
line_start and column_start
The starting point to begin the path. The function will automatically search for the best point in a 15x15 neighbourhood.

If these parameters are not specified, the function will search the best point (=the point with the lowest merit function) in a sqarre around the center of the image.

threshold
If the difference between 2 pixels is higher than the threshold, then there's a phase jump.

Default = 0.5

Description

For an explanation on phased images, have a look at the help of the function unwrapl.

This function uses an algorithm of "path following" to unwrapp the phase: The idea is to unwrapp non ambiguous pixels first. Here are some details:

1) the quality of each pixel is estimated by a "merit function". Most often, the "merit function" will be variance (function "imvariance"), but you could try others functions like laplacien. A good quality pixel has a low merit function.

2) We begin from a point of good quality. It is called "integrator point".

3) we rely it to its best quality neighbour, which becomes the new "integrator point".

4) If the difference between phases of the 2 points is higher (or lower) than a threshold (=0.5 by default), then we consider there's a phase jump.

5) we continue until all points are treated.

How to ignore some points ? You can decide that some points are so unsure that you prefer to simply ignore them. This can be done by affecting them a merit function >= 3000.

Note about the "jumps" matrix: it is a matrix containing only the number of jumps needed to re-establish phase continuity: unwrapped_phase=image+jumps;

Examples

stacksize(4e7);

pw=imread(SIPDIR+'images/photonics/pyramide_wrapped.jpg'); //phase wrapped

mf=imvariance(pw);//calculate a "merit function"
//you could try also: mf=imconv(a,mkfilter('laplace1'));

[puw,jumps]=unwrapp(pw,mf);

xset("window",1);clf;xselect();imshow(normal(puw,1,0));
xtitle("unwrapped phase");
xset("window",2);clf;plot3d1(1:8:size(puw,'r'),1:8:size(puw,'c'),puw(1:8:$,1:8:$))

References

"techniques automatiques de raccordement de phase"

David VENET, Memoire de l'universite de Lausanne.

Authors

Availability

The latest version of the Scilab Image Processing toolbox can be found at

http://siptoolbox.sourceforge.net

See Also


<< unwrapl SIP - Scilab Image Processing Toolbox watershed >>