SIP Toolbox
imshow - Displays images in scilab graphic window
Calling Sequence
- imshow(Img)
- imshow(Img,n)
- imshow(Img,[low high])
- imshow(Img,Map)
- imshow(RGBImg)
- imshow filename
- imshow(Img, arg2 [, strf])
Parameters
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 the scilab graphical
window. Any raster image format is accepted (see Remarks section).
Examples
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 <ricardofabbri (AT) users DOT sf DOT net>
Availability
The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net
See Also
imread, imwrite, imfinfo, Matplot, xgetpixel,