The color space, the thing.

Source: Internet
Author: User

This article is original works, reproduced please indicate the source

Welcome to my blog:http://blog.csdn.net/hit2015spring and http://www.cnblogs.com/xujianqing/

Only after a few years of preparation, the young artists should be exposed to color, not by color description, but as a means of expression of human emotion--Picasso

Color and the great invention of the creator, where the bread contains the subject and subject in a blog post can not be fully clarified, this blog is mainly about several color space, as a popular science class primer.

Human perception of color is a complex physiological and psychological phenomenon, which is far from being fully understood, but the physical properties of the color can be expressed by some experimental and theoretical support. Learning from junior High school physics, the color of an opaque object is determined by the nature of the light reflected by the object. For example, green leaves reflect the wavelength of 500~570nm.

The cone-shaped cells of the human eye are the sensors responsible for color vision. There are 600~700 in the human eye, they can be divided into 3 categories, respectively, feel Red (65%), Green (33%), blue Light (2%), although the proportion is small, but blue cone cells are more sensitive to blue light. So the color that is seen is the so-called red, green, blue combination of colors.

RGB color space

RGB color models are mainly hardware-oriented models, such as color monitors and a large class of color video cameras. This color model uses three primary colors superimposed to produce different colors. but the tri-primary color overlay does not produce all the colors. This model assigns 0~255,256 levels of gray values to each color channel so that a total number of colors can be produced. All of these colors are contained in a cube shown, where each point within the cube can be determined by the coordinates of three channels. The diagonal is a three-component color, which becomes a grayscale image with no color.

CMY and CMYK models

CMY model and RGB model have similar characteristics, it is also a color model for hardware equipment (color printer, copier), CMY represents cyan, dark red and yellow (pigment primary color) combination. These three colors are RGB two colors, with a different way to define. If cyan means white light, reflection is white light minus red, and white is a combination of red and green blue. So there is the conversion of RGB and CMY: Assume that all color values are normalized to (0,1).

Indicates that the cyan surface does not reflect red, the dark red does not reflect the green, the pure yellow does not reflect the blue. The same amount of pigment color combination can produce black, but in order to print the combination of black is often not very pure, so in order to produce real black, added a fourth color black, so there is a CMYK model.

HSI Color model

The RGB color model and the CMY model are ideal for hardware devices, and the RGB model can match the reality of the three primary colors of the human eye. Unfortunately, these color models are difficult to adapt to people's interpretation of color. His color space is a color model that adapts to the perception and description of the color of the human eye. It is an ideal tool for developing color-coded image processing methods that use Hue (H), saturation (S) intensity (I) to describe color. The HSI color model and the RGB color model conversion formula are as follows:

Given an RGB image, convert to his

Here:

The saturation level is as follows:

Strength Component:

Description: The angle is measured in red as the starting datum axis.

His to RGB space conversion: Here HSI is the normalized value between [0,1].

First, the H multiply, the tonal value is restored to [0,], the H is divided into three sectors for discussion,

RG Sector: ()

GB Sector:

Then calculate:

BR Sector:

Then calculate:

The knowledge of his space is complete! The general picture is an RGB model, the above conversion formula provides us with tools for processing images in his space.

Lab Space

Lab space is also a digital way to describe a person's visual sense of color, independent of the device, any color in nature can be expressed in the lab space, of course, any color in the RGB space can be found in the lab space corresponding values. In lab space, l represents brightness, a indicates a red green axis, a positive number is red, negative ends represent green, positive numbers for B represent yellow, and negative numbers represent blue.

Conversion from RGB to lab space is required through the intermediate variable xyz

Set the RGB three-channel values for a picture (R,G,B)

    1. The first time after a Gamma correction, which is used to edit the image in a non-linear tone, to improve the contrast of the image.

Where the gamma function is defined as:

    1. Calculation XYZ

where M is a matrix:

    1. Calculation LAB

      which 047,

Ohta Color Space

Ohta color space is the 1980 Ohta, such as the color space, the space of three color components, I1,I2,I3, as a set of orthogonal color feature set, they can also be converted from the RGB color space, three components are independent of each other.

The model can also be used to split the color image, which can get a good effect (yellow image background).

The color space, the thing.

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.