First, let’s take a detour into color mixing. The two types of color mixing that color spaces use are additive and subtractive, where additive color mixing describes the color created from adding different wavelengths of light together while subtractive color mixing corresponds to the color created from subtracting wavelengths of light. Subtractive color mixing is the more intuitive mixing for humans, since it corresponds to the mixing of physical substances, such as paint. This is due to how humans perceive color; an apple is seen as red because the apple absorbs all wavelengths of light except for red, which is reflected. When we mix physical substances of different colors, each substance will absorb some wavelength the other paint reflects, leaving us with fewer wavelengths than we started with, hence the term subtractive color mixing.

[2] Additive color mixing [3] Subtractive color mixing
Revisiting the RGB color space with more context: the sRGB color space is a color space based on the RGB color model, which is an additive color model that mixes red, green, and blue light to produce an array of colors. The three color channels each range from 0 to 255. Although the RGB color model is based on the way humans perceive color with three kinds of photoreceptor cells, this model is unable to represent every color the human eye can see, especially the highly saturated colors. In [5], the gray region is the range of colors a human can see, while the smaller triangle is the range of colors representable by the RGB model.
In comparison, the LAB color space is useful for picking out subtle differences in color. LAB encodes lightness in one channel (L) and color in the other two channels, with A ranging from green to red and B ranging from blue to yellow. This color space is a much more accurate approximation of how humans see colors, since it is based on the opponent color model of human vision (red/green and yellow/blue form opponent pairs). In addition, it is a larger color space compared to RGB, covering the entire range of human color perception.
Another color space is the YCrCb color space, which is good for data compression. Y is the luminance (brightness) component, Cr describes the red chroma component and Cb describes the blue chroma component. Humans are more sensitive to black and white information, which YCrCb separates into the Y component and is usually stored in high resolution. In contrast, humans are less sensitive to the Cr and Cb chroma components, so they don’t need to be as accurate and thus can be compressed for more efficient processing.
[8] HSV color model

RGB value [255, 102, 102] RGB value [255, 0, 0] RGB value [153, 0, 0]
HSV value [0°, 60%, 100%] HSV value [0°, 100%, 100%] HSV value [0°, 100%, 60%]
In conclusion, there are many color spaces available for image processing, with some of the commonly used ones being RGB, LAB, YCrCb, and HSV. Depending on the application, a certain color space may be more useful compared to the other spaces; for example, the HSV color space is very useful for our ant tracking pipeline since we are trying to single out regions corresponding to the hue red. OpenCV allows us to easily convert from one color space to another.
Further reading:
This site has some sliders for RGB and HSV color models.
More on HSV versus HCL: Why I Love HSV and Why It's Totally Useless
Additional color spaces and their uses
Media Credits:
[1] Photo by Peter Halasz https://flic.kr/p/4n9P7n
[2] Image by Wikipedia user Pko source
[3] Public domain image source
[4] Image by Wikipedia user SharkD source
[5] Image by Wikipedia user Dicklyon source
[6] Image by Wikipedia user Nilsjohan source
[7] Image by Wikipedia user Simon Eugster source
[8] Image by Wikipedia user SharkD source
[9] Image by Wikipedia user SharkD source


No comments:
Post a Comment