Tuesday, June 28, 2011

Histplot in Scilab 5.3.2 using SIVP

I have found the command in determining the histogram of a grayscale image. It is imhist command in SIVP. This tutorial is for Scilab 5.3.2. I have copied the help from the scilab help.

Name
imhist - get the histogram of an image
Calling Sequence
[counts, cells] = imhist(im)
[counts, cells] = imhist(im, bins)
[counts, cells] = imhist(im, bins [,width [,color]])
Parameters

im
An image, which can be a boolean, uint8, int8, uint16, int16, int32 or double image
bins
The number of bins of the histogram. If bins is not specified, the function will used default value which determined by the image type: 2 for boolean, 2^8 for uint8 and int8, 2^16 for uint16 and int16, 2^16 for int32(2^32 will need huge computer memory), and 10 for double.
width
This argument will be sent to the bar function. It is a real scalar, defines the width(a percentage of the available room) for the bar(default: 0.8,i.e. 80%)
color
This argument will be sent to bar function. It is a string(default: 'blue'), specifying the inside color bar.
counts
the returned histogram
cells
the intervals for bins
---------------------------------------------------------------------------------------------------------------
So here it is. Just place it with the bar function to get a histogram figure.

No comments:

Post a Comment