Color histogram
From Wikipedia, the free encyclopedia
In computer graphics and photography, a color histogram is a representation of the distribution of colors in an image, derived by counting the number of pixels of each of given set of color ranges in a typically two-dimensional (2D) or three-dimensional (3D) color space.
A histogram is a standard statistical description of a distribution in terms of occurrence frequencies of different event classes; for color, the event classes are regions in color space.
An image histogram of scalar pixel values is more commonly used in image processing than is a color histogram.
Contents |
[edit] Overview
Color histograms are flexible constructs 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 discretization of the colors in the image into a number of bins, and counting the number of image pixels in each bin. For example, a Red–Blue chromaticity histogram can be formed by first normalizing color pixel values by dividing RGB values by R+G+B, then quantizing the normalized R and B coordinates into N bins each; say N = 4, which might yield a 2D histogram that looks like this table:
red | |||||
0-63 | 64-127 | 128-191 | 192-255 | ||
blue | 0-63 | 43 | 78 | 18 | 0 |
64-127 | 45 | 67 | 33 | 2 | |
128-191 | 127 | 58 | 25 | 8 | |
192-255 | 140 | 47 | 47 | 13 |
Similarly a histogram can be made three-dimensional, though it is harder to display.[1]
The histogram provides a compact summarization of the distribution of data in an image. The color histogram of an image is relatively invariant with translation and rotation about the viewing axis, and varies only slowly with the angle of view.[2] By comparing histograms signatures of two images and matching the color content of one image with the other, the color histogram is particularly well suited for the problem of recognizing 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 for classification is that the representation is dependent of the color of the object being studied, ignoring its shape and texture. Color histograms can potentially be identical for two images with different object content which happens to share color information. Conversely, without spatial or shape information, similar objects of different color may be indistinguishable based solely on color histogram comparisons. 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 a red and white cup is no use when given an otherwise identical blue and white cup.
Further research into the relationship between color histograms data to the physical properties of the objects in an image has shown they can represent not only object color and illumination but relate to surface roughness and image geometry and provide improved estimate of illumination and object color.[3]
[edit] Applications of Color Histograms
In photography, color histograms in either 2D or 3D spaces are frequently used in digital cameras for estimating the scene illumination, as part of the camera's automatic white balance algorithm. In remote sensing, color histograms are typical features used for classifying different ground regions from aerial or satellite photographs. In the case of multi-spectral images, the histograms may be four-dimensional, or more. In Computer vision, color histograms can be used in object recognition.
Color Histograms are a commonly used as appearance-based signature to classify images for content-based image retrieval systems (CBIR).[4] By adding additional information to global color histogram signature, such as spatial information, or by dividing an image into regions and storing local histograms for each of these areas, the signature for each image becomes increasingly robust. Local color histograms are robust to partial occlusion and can be more efficient than global histograms for image retrieval in some cases.[5] For example, applying a weighted color histogram based on color ratios to local histograms, illumination-insensitive object extraction can be achieved.[6] Another techniques for increasing the robustness of color histograms is to incorporate directional edge information to retain spatial information.[5]
In one large scale image database application, over 15000 images could be queried in under two seconds by refining color histograms using a technique called color coherence vector.[7]
[edit] References
- ^ Nello Zuech and Richard K. Miller (1989). Machine Vision. Springer. ISBN 0442237375.
- ^ Shapiro, Linda G. and Stockman, George C. "Computer Vision" Prentice Hall, 2003 ISBN 0130307963
- ^ Anatomy of a color histogram; Novak, C.L.; Shafer, S.A.; Computer Vision and Pattern Recognition, 1992. Proceedings CVPR '92., 1992 IEEE Computer Society Conference on 15-18 June 1992 Page(s):599 - 605 doi:10.1109/CVPR.1992.223129
- ^ The Capacity of Color Histogram Indexing, Stricker, M.; Swain, M.; Computer Vision and Pattern Recognition, 1994. Proceedings CVPR '94., 1994 IEEE Computer Society Conference on 21-23 June 1994 Page(s):704 - 708 doi:10.1109/CVPR.1994.323774
- ^ a b Edge color histogram for image retrieval. Seong-O Shim; Tae-Sun Choi; Image Processing. 2002. Proceedings. 2002 International Conference on Volume 3, 24-28 June 2002 Page(s):957 - 960 vol.3 doi:10.1109/ICIP.2002.1039133
- ^ Robust object extraction with illumination-insensitive color descriptions, Hashizume, C.; Vinod, V.V.; Murase, H.; Image Processing, 1998. ICIP 98. Proceedings. 1998 International Conference on 4-7 Oct. 1998 page(s):50 - 54 vol.3 doi:10.1109/ICIP.1998.998995
- ^ Histogram refinement for content-based image retrieval, Pass, G.; Zabih, R.; Applications of Computer Vision, 1996. WACV '96., Proceedings 3rd IEEE Workshop on 2-4 Dec. 1996 Page(s):96 - 102 doi:10.1109/ACV.1996.572008
[edit] See also
[edit] External links
- 3D Color Inspector/Color Histogram, by Kai Uwe Barthel. (Free Java applet.)