imhist — get the histogram of an image
[counts, cells] = imhist(im) [counts, cells] = imhist(im, bins) [counts, cells] = imhist(im, bins [,width [,color]])
uint8, int8, uint16, int16, int32 or double image.
bins is not specified, the function will used default value which determined by the image type: 2 for boolen, 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.
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%).
bar function. It is a string (default: 'blue'), specifing the inside color bar.
imhist return the histogram of an image. If more than 2 arguments are give, the histogram will be shown in a figure.
If step is the step of scalar cells (cells(i+1)=cells(i)+step),
the i'th bin is half-open interval (cells(i)-step/2, cells(i)+step/2] for i > 1,
and [cells(1)-step/2, cells(1)+step/2] for i=1.
If more than 2 arguments are given, the function will call bar(cells, counts, ...) and send rest arguments to bar function to display the histogram.