Imhist
Imhist
Syntax
imhist(I)
imhist(I, n)
imhist(X, map)
[counts,x] = imhist(...)
Description
Note The maximum value on the y-axis may be automatically reduced, so outlier spikes do
not dominate. To show the full range of y-axis values, call imhist with the following syntax:
[counts,x] = imhist(...)
Then call stem:
stem(x,counts)
Remarks
For intensity images, the n bins of the histogram are each half-open
intervals of width A/(n−1). In particular, for intensity images that are not
int16, the pth bin is the half-open interval
where x is the intensity value. For int16 intensity images, the pth bin is the
half-open interval
where x is the intensity value. The scale factor A depends on the image
class. A is 1 if the intensity image is double or single, A is 255 if the
intensity image is uint8, and A is 65535 if the intensity image is uint16 or
int16.
Class Support
Examples
I = imread('pout.tif');
imhist(I)