Jump to content

Color histogram

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Asc99c (talk | contribs) at 17:52, 18 February 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer graphics, a color histogram is a representation of an image derived by counting the 'color' of each pixel. The idea was proposed by Michael Swain and Dana Ballard in 1991 and is primarily used in situations where speed of processing is a factor in the choice of algorithm, or where a specific object, rather than a more abstract class of objects is required to be identified; as noted by Swain and Ballard, ?It may not be helpful to model coffee cups as being red and white, but yours may be.?

Color histograms are a flexible construct that can be built from images in various color spaces, whether RGB, rg-chromaticity or any other color space of any dimension. A histogram of an image is produced first by discretising the colors in the image into a number of bins, and counting the number of image pixels in each bin:

 red
0-6364-127128-191192-255
blue 0-634378180
64-1274567332
128-19112758258
192-255140474713

This provides a far more compact overview of the data in an image than knowing the exact value of every pixel. The color histogram of an image is invariant with translation and rotation about the viewing axis, and varies only slowly with the angle of view. This makes the color histogram particularly suited to recognising an object of unknown position and rotation within a scene. Importantly, translation of an RGB image into the illumination invariant rg-chromaticity space allows the histogram to operate well in varying light levels.

The main drawback of histograms is that the representation is solely dependant of the color of the object being studied. There is no way to distinguish a red and white cup from a red and white plate. Put another way, histogram-based algorithms have no concept of a generic 'cup', and a model of our red and white cup is no use when given an otherwise identical blue and white cup.