M-File Help: ihist | View code for ihist |
Image histogram
ihist(im, options) displays the image histogram. For an image with multiple planes the histogram of each plane is given in a separate subplot.
H = ihist(im, options) is the image histogram as a column vector. For an image with multiple planes H is a matrix with one column per image plane.
[H,x] = ihist(im, options) as above but also returns the bin coordinates as a column vector x.
'nbins' | number of histogram bins (default 256) |
'cdf' | compute a cumulative histogram |
'normcdf' | compute a normalized cumulative histogram, whose maximum value is one |
'sorted' | histogram but with occurrence sorted in descending magnitude order. Bin coordinates X reflect this sorting. |
[h,x] = ihist(im); bar(x,h);
[h,x] = ihist(im, 'normcdf'); plot(x,h);
© 1990-2012 Peter Corke.