In this article, I will introduce how the human eye recognizes color, color space, and color conversion. I hope that after reading this article, you can answer the following two questions:

  1. How do the human eye perceive color?
  2. Why is the color of the same image displayed on different display devices inconsistent?

history

In 1802, scientist Thomas Young hypothesized that there were three types of photoreceptors in the human eye (now called cones), each of which was sensitive to a specific frequency of visible light, and each of which responded to a specific frequency of light when a mixture of different frequencies hit the retina. This results in mixed color perception, which is known as the 3-color theory. Later, another scientist, Hermann von Helmholtz, built on the three-color theory. In 1850, Hermann von Helmholtz proposed: The three types of cones can be classified as short-wavelength, medium-wavelength and long-wavelength preferences based on their response to the wavelength of light hitting the retina, and the relative strength of the signals detected by the three cones is interpreted by the brain as a visible color. There was no concept of color space at this time.

Color space was probably proposed by Hermann Grassmann, and the concept of color space was divided into two stages: The first stage: He proposed the idea of vector space, which made it possible to express geometry in terms of n-dimensional space algebra, but at this time there was no formal definition of vector space. Under the concept of vector space, Hermann Grassmann published in 1853 a theory of how colors mix, known as Grassmann’s Law. Grassmann pointed out for the first time that light set has cone structure in infinite dimensional linear space, therefore, the quotient set of light cone inherits the light cone structure, so that color can be expressed as convex cone in three-dimensional linear space, called color cone

color

In optics theory, color is related to physical biology. It is the visible light that reaches the human eye through the interaction of the surrounding environment, and is transformed into the result of electrical pulses that the human brain can process through a series of physical and chemical changes, and finally forms the perception of color. It should be noted here that color is human perception, and human perception of color is not only related to the physical nature of light, but also related to psychological factors and other factors, and is also affected by the surrounding environment.

Visible light

Visible light refers to electromagnetic waves that can be captured by the human eye and form color perception in the human brain, which is only a small part of the overall electromagnetic spectrum. Below is the spectrum of electromagnetic waves and visible light on the spectrum

The visible spectrum does not contain all the colors that the human eye can distinguish. For example, pink does not appear in the visible spectrum. These colors are called synthetic colors and can be obtained by monochromatic combinations of different wavelengths

The human eye

Human eye in the optical system is similar to the camera system, the outermost layers of the cornea as the human eye optical system, at the same time, the light is focused on the lens to protect the human eye other internal structure, the light through the through the pupil, iris pupil opening size control light receiving amount, the human eye pupil is similar to the iris of the camera, the lens is convex lens, The ciliary muscle regulates the focal length of the lens, allowing the person to focus on what they are looking at. Finally, light reaches the retina, where light-sensing cells respond to light. For myopic people, distant light entering the eye can not focus on the retina, so it can not see clearly

The perception of color comes from the response of light to photoreceptors in the retina. Let’s look at the photoreceptors in the retina

There are two main types of light-sensing cells in the retina of the human eye: rod cells and cone cells. There are 75 to 150 million rods, 60 to 70 million cones. Rods is considered unable to perceive color information, it is gray visual vision in general, when light is weaker, in the night, for example, we can see a gray world, this is the contribution of rods, but under the condition of strong light, such as in the daytime, the rods of visual stimuli already super saturation, therefore not contribute to human visual perception.

In this article, I’m going to focus on cone cells. Cones only produces stimulation reaction to bright light, in the eyes of three types of cones, their distribution showed different sensitivity to different wavelengths of visible light, according to the cones to long wavelength, different sensitivity of wavelength and short wavelength of visible light, the three types of cells known as L cones respectively, M cones and S cones, The number of S-cone cells was much smaller than that of the other two types of cone cells. Here are the light sensitivity curves of the three types of cells

We can see that these three types of cones are sensitive to all wavelengths of visible light, but have different sensitivity to different wavelengths of visible light. When certain types of cone cells in the retina become less sensitive to light, the result is less accurate color recognition and less ability to distinguish between different colors

The distribution and number of these three types of cone cells varies greatly from person to person. Here are 12 pictures of 12 different people, and we can see the difference in the distribution of cone cells in the eyes of 12 different people at a glance.

For example, the guy on the top right has a lot of cones in his eye that are sensitive to red (L-type cells), but the guy on the bottom left has a lot of cones in his eye that are sensitive to green (M-type cells). So it makes sense to say that the world is different for everyone

Perception of color

Through the cones of light sensitive curve we can know the response of some wavelengths of monochromatic light cones for is how much, because there are three kinds of cones, then we can get these three kinds of cones, respectively for the same spectral response as a result, we can get three, that is to say, for any kind of visible light spectrum, and eventually to see the number three, These three numbers are what people ultimately perceive as colors,

There are integrals in the figure above, because most light in life is composite light, which is composed of multiple monochromatic light with different wavelengths. Therefore, it is necessary to calculate the response value of each wavelength in the spectrum and the sensitive curve, and then integrate. Here’s a spectrum:

Integrating the spectrum with the light sensitive curve, we can get three numbers. At some time, two different spectra may get two sets of the same S, M and L after integrating with the light sensitive curve. This phenomenon is called metachromatism. Heterochromatism allows us not to worry about what the original spectrum looked like, but to make sure that the values of S, M, and L are the same as the original values in order to reproduce the color, right

Now let’s take a look at how we perceive color: light rays (spectra) enter the eye, strike the retina, and are detected by three types of cone-shaped cells, forming three numbers, which are sent to the brain, and the person thinks they see a color

Color space

I mentioned heterochromia, which means that given any color I can get it by mixing it with other colors. So how do you mix?

CIE RGB color space

Given a set of primary colors, such as the common R, G and B primary colors, I multiply the three colors by an intensity and then mix them together to get a color. Then, I use the intensity of the three primary colors to represent the resulting color, for example: Adjust the intensity of red to 0.2, green to 0.4, and blue to 0.7, and the resulting color will be (0.2, 0.4, 0.7).

In the trichromatic plus color system, it allows us to match any given color by linear combination of basic colors. It is very simple to choose A set of primary colors, such as red, green and blue, and then choose any color A, and modify the intensity of red, green and blue to mix them together so that the mixed color looks like color A. According to linear properties, we can get the following formula:

A = rR + gG + bB

But there are certain colors, no matter how much you change the intensity of the primary color, it’s not going to mix, because you can’t subtract it from the additive system, it’s going to be at least zero, so somebody wants to add a color to the left side of the equation as opposed to subtracting a color from the right side, and that equals the left and right sides, right

In this series of experiments, two scientists tested the colors on the left side according to the order of visible spectrum one by one, and obtained the data of mixing and superposition of monochromatic light, which is the color matching function. Then they defined the CIE RGB color space, and the color matching curve of the CIE RGB color space is shown below

This graph shows how many RGB primary color combinations are required to match monochromatic light of a given wavelength. Select any wavelength on the X axis, and then make a straight line perpendicular to the X axis. This line will intersect with the three curves, and the y-coordinate value of the intersection point is the value of the RGB primary color required

CIE XYZ color space

Since there is no negative light intensity, the CIE Committee constructed the CIE YXZ color space by defining three hypothetical primary colors according to the CIE RGB color space. So CIE XYZ is artificial, it is derived from the CIE RGB color space by linear transformation, and its color matching curve is as follows:

The CIE XYZ and CIE RGB conversion matrices are as follows:

Y stands for brightness, fixed the value of Y and visualized the colors CIE XYZ could represent into a 2-dimensional plane as follows:

The CIE XYZ color space contains all colors that the human eye can see. It is a device-independent color space that accurately represents colors regardless of the specific device. In addition to CIE XYZ being a device-independent color space, there are other color Spaces that are also device-independent, such as CIE LAB.

RGB color space /CMYK color space

RGB color space uses the Cartesian coordinate system to define colors. It is the most widely used color space. Almost all electronic display devices are RGB color space, but RGB color space does not refer to a specific color space. It is the general term for any additive color space based on an RGB color model, which is an additive model that can be obtained by mixing red, green, and blue with varying intensity on a black background. Color space belongs to RGB space: sRGB, Adobe RGB, etc. Compared with sRGB, Adobe RGB can represent a wider gamut of colors

CMYK color space is based on the CMYK color model, which is commonly used in the printing industry. CMYK represents cyan, magenta, yellow and black, respectively. Theoretically: Black can be mixed with cyan, magenta and yellow, but because the ink usually contains impurities, the resulting black is often dark brown or dark gray, and in order to save printing costs so directly defined black. CMYK color model is a subtractive color model, and there are many different CMYK color Spaces according to different ink, media and printing characteristics

Here the concept of color model and color space appears at the same time, and the two are different. A color model is a mathematical model that uses a set of data, usually three or four numbers, to describe colors. Color space describes the measurable color value within a certain range. Its basic function is to describe the ability of display device to reproduce color information.

RGB /CMYK color Spaces are device-specific color Spaces defined relative to reference Spaces, usually CIE XYZ or CIE LAB. Both sRGB and Adobe RGB are based on the RGB color model, but they have different mapping functions relative to the reference color space, so their gamut is different.

I mentioned earlier that the CIE XYZ color space contains all the colors that the human eye can see. All possible color ranges represented by a color space are called gamut, and different color Spaces have different gamut. Let’s look at the gamut of RGB and CMYK relative to CIE XYZ

The color gamut of sRGB, Adobe RGB, and SWOP CMYK is a subset of the CIE XYZ color gamut. Ideally, if the color space of a display can contain all the colors in the CIE XYZ color space, Then this monitor is the best, but the reality is that most monitors have only a small fraction of the CIE XYZ color gamut in their color space, and the sRGB color space is still widely used in computer monitors so far. Because printing and computer displays use different color Spaces, the hues seen on a computer screen differ somewhat from those seen in print, mainly because of the different gamut of colors that can be represented by the two color Spaces.

Color management

Color management refers to the process of converting color information from one color space to another on the premise of minimum color distortion. The goal is to make the translated image as similar as possible to the original image.

Color management often occurs in electronic display devices. For example, you take a photo with your mobile phone, and then you send the photo to your friend, who uses his mobile phone to view your photo, and color management occurs in this process. Another example: you upload a picture in moments, and your friends view the picture on their phone, and color management occurs in the process. Before introducing color management, let me introduce a real-life example:

For example, if you go to a hotpot restaurant and eat hot pot, the hotpot restaurant classifies the hot pot into: Slightly spicy, spicy, medium spicy and hot, how many different measure corresponding chili, hotpot restaurant has its own standard, due to the sensitivity of the different people to spicy is different, so the spicy hotpot restaurant for you may be in the hot, in order to eat to make you satisfied with the degree of hot pot, you eat in the store a series of different degree of hot pot, and then made a measure table, As follows:

After you go to the hotpot restaurant to eat hot pot, you would bring this form to the attendant say spicy, and return this form to the waiter, waiter will help you to translate them slightly spicy hotpot restaurant, the chef only puts a pepper in the hot pot, do a slightly spicy hot pot, pot that would fit your taste

In general, the process involves: 1. Standardizing the heat based on the number of chillies; 2. Determine each person’s sensitivity to the pepper and create a spiciness chart; 3. Convert one person’s mild heat into another person’s mild heat. These three processes are also applied to color management. The following figure shows the flow of converting colors between RGB color space and CMYK space:

Characterized: Equipment characterization. Each color management device needs its own color properties file, which describes how the device-related color space should be converted to and from the standard color space (typically CIE XYZ or CIE LAB). The color properties file acts like the hotpot restaurant example’s hotpot hotpot comparison table. You can try to modify the color properties file of your computer monitor, and you will find that the color of your screen will change

Standardized: Color space, usually CIE XYZ or CIE LAB

Translation: Converting colors from the color space of one device to the color space of another device is usually performed by the Color Management module (CMM).

Take the process of converting from RGB color space to CMYK color space. First get the color property file of both, and then convert its RGB value to the color value in the standard color space according to the definition in the RGB color property file. Finally, the values in the standard color space are converted into four values C, M, Y and K of the target.

If the gamut of the original device’s color space is larger than the gamut of the target device’s color space, then some colors in the original device’s color space will be out of the target device’s color space. This situation is called gamut mismatch, and gamut mismatch occurs in almost every color transformation. Each time a gamut mismatch occurs, the CMM uses rendering intents to determine how the gamut should be handled. The common rendering intents are: absolute chroma, relative chroma, perception, and saturation, each of which maintains one color attribute at the expense of the other. Perceptual and relative chroma rendering intents are probably the most useful rendering intents in digital photography. The following figure shows the difference between perceptual intent and relative chromaticity rendering intent

The relative chromaticity rendering intention maps the colors of the superchromatic field to the nearest hue in the target space, and the perceptual rendering intention maintains a smooth color gradient by compressing the entire gamut. How you choose your rendering intent depends on the content of the image and its intended use. A larger color space is used in an image. If the image is converted to a smaller color space, the converted image will not necessarily be much different from the original image

Write in the back

Human eyes’ perception of color and color conversion is a very complex process. I hope you can have a basic understanding of these contents through this article