SIP Toolbox
imxprofile - Draws intensity profiles of an already displayed image
Calling Sequence
-
[x,y,hprofile,vprofile]=imxprofile(matrix[,option,xscale,yscale,zscale,maximal_luminance])
Parameters
-
matrix:
is an image. It can be either a gray level or an indexed image.
If a color image is displayed, it's internally converted to a gray one to display
intensity profiles.
This image should be displayed before invoquing imxprofile.
-
option:
0 to draw the profiles on the image, 1 to draw the profiles in separated windows,
2 to draw the profiles on the image and the gaussian interpolation (used with laser beam images).
Default=0.
-
xscale, yscale:
A multiplication factor on one of the axis.
It allows to display coordinates directly in mm (after a calibration
to determine the conversion pixels - mm).
Default=1.
-
zscale:
A multiplication factor on the z axis.
It can be used to display gray levels in the 0-255 range instead of in the
0-1 range (for example).
Default=1.
-
maximal_luminance:
is useful to choose the scale at which hprofile and vprofile will
be displayed.
The default setting is to calculate a value such that the maximal value of the image
will be displayed
at a quarter of the image.
-
x or
y:
are the corresponding column and row in the image matrix.
-
hprofile or
vprofile:
Matrix containing the horizontal (or vertical) profile selected.
Description
This is an improved version of improfile: it's supposed to be more intuitive
and pleasant.
The function draws the values of pixels on a line and a row.
It can draw
profiles on the image and in separate windows.
People interested in determining the radius w of a laser beam
(in order to calculate its beam waist for example)
can try option=2.
Examples
a=gray_imread(SIPDIR+'images/tru.jpg');
imshow(a);
imxprofile(a);
//profiles in separate windows
xbasc();
imshow(a);
imxprofile(a,1)
//laser beam visualisation
b=imread(SIPDIR+'images/photonics/laser1.jpg');
xbasc();imshow(b,[]);
imxprofile(b,2);
Authors
-
Jocelyn DRUEL <jocelyn DOT druel1 AT libertysurf DOT fr>
-
Ricardo Fabbri <ricardofabbri AT users DOTsf DOT net>
Remarks
This function is still BETA. Scilab's display may be slow, or some
minor bugs may appear during the use of this function.
Availability
The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net
See Also
xgetpixel, improfile,