| [mmwatershed] [Up] [mmlabel] | Measurements |
| User Feedback |
Finds the histogram of the image f and returns the result in the vector h. For binary image the vector size is 2, for gray-scale uint8 and uint16 images, the vector size is the maximum pixel value plus one. h[0] gives the number of pixels with value 0.
f=uint8([0, 1, 1, 2, 2, 2, 5, 3, 5])
h=mmhistogram(f)
print h
[1 2 3 1 0 2]
f=mmreadgray('lenina.tif')
mmshow(f)
h=mmhistogram(f)
mmplot([[[], h, '', 'impulses']])
![]() |
![]() |
|
| f | [[[], h, '', 'impulses']] |

| [mmwatershed] [Up] [mmlabel] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |