Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Color histogram
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overview== Color histograms are flexible constructs that can be built from images in various [[color space]]s, whether [[RGB color space|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. A two-dimensional histogram of red-blue chromaticity divided into four bins (''N''=4) may yield a histogram similar to this table: {| class="wikitable" align="center" |- align="center" | colspan="2" rowspan="2" | | colspan="4" style="background:red; color:white;"| Red |- align="center" | 0-63 | 64-127 | 128-191 | 192-255 |- align="center" | rowspan="4" style="background:blue; color:white;"| Blue | 0-63 | 43 | 78 | 18 | 0 |- align="center" | 64-127 | 45 | 67 | 33 | 2 |- align="center" | 128-191 | 127 | 58 | 25 | 8 |- align="center" | 192-255 | 140 | 47 | 47 | 13 |} A histogram can be N-dimensional. Although harder to display, a three-dimensional color histogram for the above example could be thought of as four separate red-blue histograms, where each of the four histograms contains the red-blue values for a bin of green (0-63, 64-127, 128-191, and 192-255). The histogram provides a compact summarization of the distribution of data in an image. A 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.<ref>[[Linda Shapiro|Shapiro, Linda G.]] and Stockman, George C. "Computer Vision" Prentice Hall, 2003 {{ISBN|0-13-030796-3}}</ref> By comparing histogram signatures of two images and matching the color content of one image with the other, a 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. '''1. What is a histogram?''' A histogram is a graphical representation of the number of pixels in an image. In a more simple way to explain, a histogram is a bar graph, whose X-axis represents the tonal scale (black at the left and white at the right), and Y-axis represents the number of pixels in an image in a certain area of the tonal scale. For example, the graph of a luminance histogram shows the number of pixels for each brightness level (from black to white), and when there are more pixels, the peak at the certain luminance level is higher. '''2. What is a color histogram?''' A color histogram of an image represents the distribution of the composition of colors in the image. It shows different types of colors appeared and the number of pixels in each type of the colors appeared. The relation between a color histogram and a luminance histogram is that a color histogram can be also expressed as “three luminance histograms”, each of which shows the brightness distribution of each individual red/green/blue color channel.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)