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

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

unwrapl

Unwraps phased images linearly

Calling Sequence

[unwrapped_phase, phase_jumps] = unwrapl(image[,threshold,step,direction])

Parameters

unwrapped_phase
is a matrix containing the unwrapped phase. Its values are not in 0-1 range, but depend of the number of phase jumps which were made You have to normalize it to 0-1 if you want to visualize it.
phase_jumps
is a matrix containing the jumps of phase. It contains positive and negative values.
image
The gray-level image containing the wrapped phase.
threshold
If the difference between the value of two succesive pixels is higher than the threshold, we consider that there's a jump of phase in the image. Default=0.5
step
Try to be a little noise immune by not allowing another jump in the phase if the distance from the previous is less than the value of step. Default=0.
direction
"h" to scan the image row by row, "v" to scan columnwise. Default="h"

Description

Phased images are obtained in various interferometry domains. The phase (coded in gray levels) is represented as the altitude of each pixel. Because the phase is modulo (2*pi or 1 when working with gray levels), the absolute altitude is not known.

This function unwraps a phased image (gray levels) in the simplest manner: linearly. It works this way:

Very simple and quite fast algorithm. But very noise sensitive. Images to treat should be of excellent quality.

For those not familiar with phase unwrapping, I tried to write a very detailed example.

Examples

stacksize(1e7); // images are memory-expensive

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

xset("window",0); //create a 1st window to display the original image
clf;xselect();imshow(pw);
xtitle("original wrapped phase")

//we try to show the object in 3D:
//because of phase jumps, it's not very good
xset("window",1);//the best of all: in a 3rd window, show the object in 3D
clf;xselect();
//we take 1 point on 4 to draw the object (faster and more beautifull than
//drawing all the points)
plot3d1(1:4:size(pw,'r'),1:4:size(pw,'c'),pw(1:4:$,1:4:$));
xtitle("original wrapped phase in 3D")

//now we unwrap the phase linearly:
//In this example we don't need any additionnal parameters
//because the image is of good quality.
//be a little patient for this operation
puw=unwrapl(pw);//phase unwrapped

//and we show the result
xset("window",2);//show the unwrapped phase in 2D: we have to put it in the 0-1 range
//to display it properly
clf;xselect();imshow(normal(puw));
xtitle("unwrapped phase");

xset("window",3);//we can now show the original object in 3D
clf;xselect();
// Again, we take 1 point on 4 to draw the object
plot3d1(1:4:size(puw,'r'),1:4:size(puw,'c'),puw(1:4:$,1:4:$));
xtitle("unwrapped phase in 3D");

Bibliography

An easy introduction to these problems can be found in "Methods for 2-D phase unwrapping in Matlab" by Jiri Novak.

A more complete one: "Phase unwrapping algorithms for radar interferometry: residue-cut, least-squares, and synthesis algorithms" by Zebker and Lu (Journal of Optical Society America, vol 15, n3, march 98)

Authors

Availability

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

http://siptoolbox.sourceforge.net

See Also


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