page_title: Color histogram
section_title: Example 1
hierarchical_section_title: Color histogram / Examples / Example 1
caption_attribution_description: English: An odd-eyed cat
context_page_description: In image processing and photography, a color histogram is a representation of the distribution of colors in an image. For digital images, a color histogram represents the number of pixels that have colors in each of a fixed list of color ranges, that span the image's color space, the set of all possible colors.
  The color histogram can be built for any kind of color space, although the term is more often used for three-dimensional spaces like RGB or HSV. For monochromatic images, the term intensity histogram may be used instead. For multi-spectral images, where each pixel is represented by an arbitrary number of measurements, the color histogram is N-dimensional, with N being the number of measurements taken. Each measurement has its own wavelength range of the light spectrum, some of which may be outside the visible spectrum.
  If the set of possible color values is sufficiently small, each of those colors may be placed on a range by itself; then the histogram is merely the count of pixels that have each possible color. Most often, the space is divided into an appropriate number of ranges, often arranged as a regular grid, each containing many similar color values.
context_section_description: Given the following image of a cat (an original version and a version that has been reduced to 256 colors for easy histogram purposes), the following data represents a color histogram in the RGB color space, using four bins. 
  Bin 0 corresponds to intensities 0-63 
  Bin 1 is 64-127 
  Bin 2 is 128-191 and Bin 3 is 192-255.
caption: A picture of a cat
exif: {"Image ExifOffset": "26", "Thumbnail JPEGInterchangeFormat": "74", "Thumbnail JPEGInterchangeFormatLength": "4908", "EXIF ColorSpace": "sRGB"}