UNWRAPP

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
EXAMPLE
REFERENCES
AUTHORS
AVAILABILITY
SEE ALSO

NAME

unwrapp - unwraps phased images by path following

SYNOPSIS

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

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, column_start
The starting point to begin the path: if not entered, the function will search the best point (=the point with the lowest merit function) in a sqarre around the center of the image.

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 (=127.5 for 8bit images), 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+256*jumps;

EXAMPLE

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'));

// this will take a few minutes
[puw,jumps]=unwrapp(pw,mf);

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

REFERENCES

David VENET: "techniques automatiques de raccordement de phase" Memoire de l'universite de Lausanne:

AUTHORS

Jocelyn DRUEL <jocelyn.druel1@libertysurf.fr>

AVAILABILITY

The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net

SEE ALSO

unwrapl, imvariance, imphase