Histogram

Histogram plots the histogram of the input image: the number of pixels that have each value. The higher the curve, the more pixels have that value. If you enter a “window”, only the pixels inside it are counted.

The input can have any number of bands, with byte or integer data. A curve is plotted for each band, with its own color for the first 6 bands; any further bands are black. The plots appear in a separate window:

If another module is connected after Histogram, the image is passed on unchanged. For a quick histogram of a region, you can also right-click a window in Show and choose Histogram; see Show – The Display Window.

Example

A 50 × 50 pixel, 8-bit image of writing

The histogram of that image

This 50 × 50 pixel image has 8-bit values from 0 to 255. The histogram shows that most of the pixels are light gray, with some mid-gray or darker pixels. This makes sense: most of the pixels are the brighter background, and only a few are the writing. Of the 2,500 pixels in the image, 81 have the value 203.