Name

histogram - calculate a histogram of the image pixel values

Usage

h = histogram(image [, mask, nbins, hmin, hmax])

Input

input
input image
mask
optional binary mask, if provided, histogram will be calculated only for image areas for which mask values are larger/equal than 0.5
nbins
number of bins. Optional. If not given, number of bins is set to x dimension of the image.
hmin, hmax

Optional. If provided, the histogram will be calculate only for hmin>pixel value<hmax.

Output

h
a list containining 2*nbins elements. First nbins elements contain histogram values, second nbins element contain bin values.

Author / Maintainer

Pawel A. Penczek

Keywords

category 1
MORPHOLOGY
category 2
SPATIAL

Files

statistics.py

Maturity

stable
works for most people, has been tested; test cases/examples available.

Bugs

None. It is perfect.

histogram (last edited 2013-07-01 13:12:46 by localhost)