IMSHOW

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
EXAMPLE
REMARKS
BUGS AND SHORTCOMINGS
AUTHORS
AVAILABILITY
SEE ALSO

NAME

imshow - displays images in scilab graphic window

SYNOPSIS

imshow(Img)
imshow(Img,n)
imshow(Img,[low high])
imshow(Img,Map)
imshow(RGBImg)
imshow filename
imshow(Img, arg2 [, strf])

PARAMETERS

filename
A String, the image filename to be displayed. The extension determines the type of the image.
Img
MxN matrix, a grayscale (0-1 range) or pseudo-color/indexed (1-Ncolors range) image.
n
A scalar, the number of levels of gray to display Img.
[low high]
1x2 array corresponding to the grayscale range to be considered.
Map
Mx3 matrix containing the image colormap (for indexed images). Entries may range from 0 to 1
RGBImg
MxNx3 hypermatrix in 0-1 range.
strf
this is used to e.g. put axes around your image. See the plot2d help page. You may use this optional parameter in the assignment style, as in:
   imshow(img, strf='041')   //same as imshow but draw axes

DESCRIPTION

imshow(Img,n) displays Img using n gray levels. Img is an MxN matrix in 0 - (n-1) range. If n is omitted, it will be assumed to be 256.
imshow(Img,[low high]) displays Img using a grayscale within the specified range. Elements <= low will map onto black, Elements >= high will map onto white, and elements in between will map as a shade of gray. If an empty matrix '[]' is used, [low,high] will be assumed to be [mini(Img), maxi(Img)].
imshow(Img,Map) displays Img using the specified colormap.
imshow(RGBImg) displays the RGBImg MxNx3 (0-1) truecolor image.
imshow(filename) displays the image (filename) in scilab graphic. Any raster image format is accepted (see REMARKS section).

EXAMPLE

initial_dir = PWD;
chdir (SIPDIR + 'images');

a = rand(100,100);   // create random image
xbasc();
imshow(a);

imshow(a*255 + 1,hotcolormap(256));
imshow(a,[0.3 0.6]);
imshow(a,[]);
xbasc();
imshow('example.png');

chdir(initial_dir);

REMARKS

In theory, imshow(filename) will work with any raster image format. In practice, it has been tested only for BMP, GIF, JPEG, PNG, PCX, TIFF, XPM, and MIFF. Displaying other file formats will probably work, but this case have not been tested by the developers of the SIP toolbox.

BUGS AND SHORTCOMINGS

The display of truecolor images is somewhat inefficient.
Images are stored in double precision matrices. Hopefully, the next release will make usage of integer types.

AUTHORS

Ricardo Fabbri <rfabbri@if.sc.usp.br>

AVAILABILITY

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

SEE ALSO

imread, imwrite, imfinfo, xgetpixel