(4) Color image to grayscale map and hue, saturation and other concepts related to the definition

Source: Internet
Author: User

The following definitions are from Gonzales-"Digital Image Processing"

RGB color Model: The image consists of three component images, one component image per primary color. When fed into an RGB monitor, these three images are mixed on the screen to create a composite color image.

HSI color model: RGB model of the color system is ideal for hardware implementation, and the human eye is strongly aware of red, green, blue, the fact that the three primary colors can be well matched. Unfortunately, the RGB model and other similar color models do not adapt well to the actual human interpretation of the color (1). When people look at a colored object, we use its hue, saturation, and brightness to describe it, which is the HSI color model.

(1) The cause and the sensitivity of the human eye photosensitive cells to a variety of primary colors (65% is sensitive to red light, 33% is sensitive to green, 2% is sensitive to blue light, but blue vertebral cells are more sensitive to Blu-ray). For more information, see "chromaticity".

Hue (H): Describes a color attribute of a solid color (pure yellow, pure red, or pure orange). When we say that an object is red, yellow, it refers to its hue.

Saturation (S): Refers to the relative purity of a color or the amount of white light mixed in a color, which refers to a measure of the degree to which a solid color is diluted by white. The pure spectral color is fully saturated. Saturation is inversely proportional to the amount of white light added.

Brightness (I): is a description of a supervisor, in fact it is not measurable. It embodies the concept of colorless strength and is one of the key factors to describe the color sensation.

Brightness is not measurable, also because the human eye is a subjective concept, in the HSI model, the luminance value i = (R + G + B)/3. This is a good reason to understand, because on the RGB monitor, color is generated by three colors of the intensity of electronic lamps, we think of each electronic lamp as a torch, then the brightness of the torch is determined by the total number of torches, RGB is the value of the various components, so unified to the same can use its weighted average to describe the brightness.

Grayscale: The so-called grayscale color, refers to pure white, pure black and a series of the two from black to white transition color. In the RGB color model, the r=g=b of the grayscale color.

The RGB color image is converted to grayscale, which is achieved by calculating the equivalent grayscale or luminance value y of each RGB pixel. One principle of transformation is to ensure that the final gray image and the original color image subjectively have the same brightness.

In the simplest case, y can take a weighted average of the RGB three components.

Y = AVG (R, g, b) = (r + G + B)/3;

In fact, because red and yellow appear brighter than blue, this results in a darker red-and-yellow area of the converted grayscale image, while the blue area is brighter. You can therefore use the weighted sum of the color components to calculate the equivalent luminance values.

Y = Lum (R, G, b) = WR * R + WG * G + WB * B;

Common weights are derived from analog color signal coding

WR = 0.299 WG = 0.587 WB = 0.114

Use WR = 0.3 WG = 0.59 WB = 0.11 value for color conversion effects as follows:

Note: The above weights are developed by means of a TV signal, which is the only one of the linear RGB component values, that is, a signal that does not contain gamma (gamma) correction. However, in many cases, the RGB component value is non-linear, in this case, in order to apply the above weights to get the correct brightness, the RGB component must first be linearized. Another solution is to estimate gray values without linearization, which requires a set of different weights to be used to sum the nonlinear components weighted.

(4) Color image to grayscale map and hue, saturation and other concepts related to the definition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.