Written in the beginning
This paper is mainly composed of the following major plates:
-
Some interesting visual effects and explanations
-
Application of color and vision in various disciplines
-
Color vision in optometry, psychology
-
Color vision for art Design
-
Color vision in optics and computer science
This article will focus on the fifth part of optics, computer science and color vision. Readers can choose the content they are interested in.
This article is called a miscellany because it deals with interdisciplinary knowledge.
Interesting visual phenomena and their interpretation
1.1 Interesting visual phenomena
A1. Is there really a difference in the purple on both sides
A2. Are the balls different colors
A3. On closer inspection, if the stripes are removed, the image is actually grayscale, but because of the colored stripes, it looks like the clothes have color
B1. Does the color of the clothes change by itself?
B2. Are these shoes grey and green or pink and white?
B3. Blue and black or platinum?
B4. What colour are the pills you see
B5. Do you think the colors of A and B in the picture below are different
C1. You’ve probably done this before. Blind spot experiment. Close your left eye (or right eye) and look at the circle on the right (or cross on the left) 15-25cm away from the screen.
C2. This is an interesting blind spot experiment that you probably haven’t tried before. Close your right eye, look at the cross with your left eye, and find the right distance.
D1. stare at the black dot in the center of the heart for at least 30 seconds. Then look quickly at a blank piece of paper or a wall.
D2. When you blink, do you see any black dots flashing in the white dots out of your peripheral vision
1.2 Disclosure and explanation
A1: Lateral inhibition
Mach band effect, Hermann grid, munch white effect and other optical illusions belong to the category of color misperception, which are caused by the lateral inhibition of vision. The human retina is made up of many small light-sensitive nerve cells, and it is impossible to activate a single light-sensitive cell. Activation of one cell always affects neighboring cells. The scientists found that stimulation of one light-sensitive cell elicited a larger response, followed by stimulation of neighboring cells weakened the response. That is, surrounding cells inhibit its response, a phenomenon known as “lateral inhibition.” It makes areas surrounded by a brighter background appear darker and areas surrounded by a darker background appear brighter.
B1-b5: color constancy
Human brain has an automatic function to eliminate the influence of light on color. Therefore, although the colors in B1, B4 and B5 images are the same, the brain tries to eliminate the influence of light source color, leading to the perception of different colors in the images. And controversial image color of B2, B3, B2 is indeed a gray image color green, but if to eliminate the influence of green light source, and with a conventional natural light (the sun) light, so shoes is unique, for B3, if indoor light is partial blue, then the clothes is white gold, and if the indoor light is warm yellow light, the clothes is a blue-black.
Taking B1, B2, B3 and B4 as examples, we can use the method of light source estimation to eliminate the influence of colored light source, and the results are as follows:
By estimating the light source and eliminating the influence of colored light source, we get an image that is closer to the color cognition result of human eyes. The main color pixels have been enlarged in the image for easy observation.
C1-c2: Blind spots and blind spots “complement”
Blind spots are caused by the loss of visual cells in a small part of the human eye due to the need for the transmission of visual signals. Since the blogger is not a medical professional, this reason cannot be explained in a full way, basically. The C2 blind spot “complement” can only be guessed to be related to the information surrounding the blind spot and the previous memory autocomplete image. The specific mechanism and the neural circuit involved and other issues, I am afraid that more in-depth research is needed.
D1-d2: color adaptation
The visual phenomena of D1 and D2 are negative backward, which is related to the residual and color adaptation characteristics of human vision.
2. Application of color and vision in various disciplines
There are five senses of hearing, touch, smell, taste and vision, but in fact, more than 80% of the information of the external world is provided by vision. Therefore, many disciplines have important relationship with color information.
Ocular light and color in psychology
Although we are born to deal with vision and color, there are still some misunderstandings in our cognition. For example, color is an attribute of an object, and color of an object is stable and reliable information. Both views are wrong.
3.1 Causes of color
Color is caused by three factors (or four) : light, objects, and the human visual system (or the human eye and brain).
We can describe colors with the following modelThe formation and quantitative calculation of:
Among them
In order to makeIs the calibration constant,Represents the maximum and minimum wavelength of visible light, respectively, and is generally considered to beand. whileRespectively represent the spectral radiation intensity of light source and spectral reflection ratio of object,Is CIE1931 standard chromaticity observer curve.
The model definesColor space, and fully demonstrates that human perception of color is only related to three factors. (In birds, there are four types of cones, so in addition toThere’s one more dimension, so from the birds’ point of view, humans have a very narrow range of colors.)
In addition, from this binary model, we can know the spectral radiation intensity of the light sourceAnd the spectral reflectance ratio of the objectAnd standard observer trichromatic stimulus valuesIt all depends on the wavelengthRelative quantities, so they’re all a curve. Note that the effective range of this curve for standard observer trichromatic stimulus values isThe range of spectral radiation intensity and spectral response ratio of objects is wider than this, but outside the range of the human visual system.
In addition, the XYZ standard observer curve is measured using an experiment called Color Matching: it gives three colors of light..(Note that,,,Roughly equal to red, green, blue, but they do not really look red, green, blue, but from the parameters derived from red, green, blue), and then givenThe subjects were asked to mix the three lights to get what they thought was the same color as the monochromatic light. The resulting mixed light is measured in proportions of the three, and the resulting curve is shown below.
Because the standard observer curve is obtained by Color Matching experiment, it is also called Color Matching Function.
It should also be noted that this curve is not derived from the experts in optometry medicine, but from the international Commission on Illumination (CIE) standard 1931XYZ color space in 1931. XYZ color space is the first color space to be defined mathematically.
Modern anatomy has verified the existence of three kinds of cones in human eyes, which are the most direct color sensing cells of human eye color vision, which explains why light with red, green and blue colors can be mixed into all colors of visible light, and the color space associated with it is LMS color space.
3.2 Color and psychology
Color has also been studied in psychology. For example, red is a more stimulating color, it gives people a sense of burning and enthusiasm, more than other colors with interpersonal color, extroverted people will also like red.
Because red is very eye-catching, it is used to attract people’s attention. This is relatively easy to understand, if someone does not want to attract attention, such as to take an exam, should choose white, blue and other colors with visual relaxation effect, rather than the loud red.
Experiments have shown that when the same athlete wears a red suit, hormone levels rise significantly, making him more competitive and aggressive. In a study published in Nature, Russell Hill and Robert Barton of Durham University found that red not only frightens opponents, but also boosts male athletes’ own hormone levels, which increases muscle strength.
Harada Rehito said in “Every Day to understand a little Color Psychology”, “people who hate red are mostly those whose inner desires can not be satisfied. They are either frustrated in their dreams or frustrated in their work and it is difficult to continue. At this time, people are easy to have resistance to red. Red is a symbol of action and an active life, and it is easy to be disgusted with red because I am at a stage where I see no hope. It’s like being single on Valentine’s Day and watching couples show their love.
A very common concept related to psychology and chromology is that when people have been looking at computers/books for a long time, some elders suggest that they go outside and look at green trees, green grass, etc. This is because experiments have proved that the human eye is more relaxed and comfortable when it is looking at green. In addition, the human eye is very sensitive to green.
Color and vision in art design
In fact, color and vision in design are somewhat similar to psychology, both of which study the influence of color on people. Psychology lays more emphasis on the influence of color on people in many aspects, focusing on experiment and theory. Design, on the other hand, focuses on how to make colors more comfortable or create the feelings designers want the audience to have, and is more application oriented.
Coordinating color collocation is a very common application in design. For example, some excellent PPT template websites or related organizations will provide some coordinating color collocation. The following picture is the PPT coordinating color recommendation from Slidesgo website.
Color vision in optics and computer science
In section 3.1 we descend to the causes of color and mention the origin of the model and color matching function of the standard 1931XYZ chromaticity system, which were actually developed by experts in the field of optics. We already know the color associated with objects, the light source and human visual system, as a result, the color of the early studies, a large part of the study lighting, color is some of information optics, physics scientist, so in the optical color vision didn’t like physiology and medicine can give direct evidence, However, there are still many theoretical frameworks and applications in this field.
With the popularization and development of computers, these practical and widely used technologies, which started from the combination of computer science and other disciplines, have penetrated into our daily life.
5.1 Table color space
In Section 3.1, we have already mentioned a color space — XYZ color space, and the color space that people contact most frequently is RGB color space. Many people will be puzzled by this. Obviously, one coordinate system is enough to represent colors, so why there are different color space.
In fact, color Spaces can be divided into two types: device-independent color Spaces and device-dependent color Spaces. For example, XYZ color space, Lab color space and LMS color space are device-independent color space, that is, the color under the table color space is independent of the display device, and the color represented by this kind of color space is unique.
The RGB Color Space (actually sRGB Color Space, Standard RGB Color Space) is the device-specific Color Space, which leads to the problem of Color differences when displayed across devices. A certain location in an image looks like this color on this model, but on a different model, the color is different. Examples are given as follows:
The monitors used for comparison are the BOE069C with the default configuration of asus flying fortress, the LCH full screen with the default configuration of IphoneXR and asus’s mobile and convenient display MB16AC. The color difference of the same image on three different monitors is very significant. This is caused by the difference between the color gamut of the display device and the light source. In addition, the field Angle of view has a certain influence on the image color, but it can be ignored with the color difference of the device display itself.
Two problems can be explained here. One is what we mentioned above, the color difference caused by cross-media and cross-device; Another is that many iPhone users will find that some images become brighter when transferred from their computers to their phones. This is because conventional monitors generally use sRGB standard, while apple’s big selling point is the color display and color system, which has a color gamut range between sRGB and Adobe RGB, as shown below.
For simplicity, I’ve drawn a two-dimensional color gamut, which is actually a three-dimensional geometric space. Note that apple devices’ gamut is not shown in the image above. NTSC 92 is a gamut standard, but Apple’s display gamut does not fully cover this standard. Apple’s display gamut is between Adobe RGB and sRGB. The external gamut (including Adobe RGB and NTSC 92’s horseshoe gamut) is the gamut described by all device-independent color Spaces. Due to the limitations of current technology, the color space associated with the device cannot cover the color gamut visible to the human eye.
Since color can be quantified, there have been some visual experiments in search of a uniform color space perceived by the human eye (that is, two pairs of colors with equal distance in the space are equally different from the perception of the human eye), of course, there are uniform color space, such as 1976CIELUV color space. However, due to the irregularity of the space, the color space has not been widely used.
In addition, it should be pointed out that there are a lot of color space, due to different requirements are put forward, in solving different problems have their own advantages (such as image compression, transmission, etc.).
5.2 Color Management
The content described in Section 5.1 raises some questions. For example, if an image is displayed in a different color gamut, how should the image color be adjusted? This is where you need to introduce excellent field mapping and color management.
Take the gamut mapping of a wide gamut to a narrow gamut device as an example. The results required for gamut mapping are shown in the following figure.
It’s not hard to see that gamut mapping is actually a compression of color information into device-independent color space, and color management is based on the same idea. These problems have been hardware, software engineers for users to consider in advance, color management is a most users do not know, but in fact has always existed technology. The existing mature color management modules and color management framework are shown in the figure below.
The representation intent needs to be explained here.
Reproduction intention: refers to the overall hope to reproduce the color of the original image with what characteristics. It includes how the color of the supergamut is mapped, whether the color in the supergamut changes with it, and if so, how it changes. The ICC defines four types of intent to reproduce.
- Absolute Colorimetric reproduction
- Relative Colorimetric reproduction
- Perceptual (color) reproduction (Perceptual)
- Saturation (color) representation
In the process of converting from sRGB color space to device-independent space, some device information needs to be known in advance for calculation. This process is called device characterization. Therefore, the complete color management process is: Equipment characteristic – > will be related to color space describes the color conversion to the device independent color space – > representation was intended to do according to colour gamut mapping – > by after color display equipment excellent domain mapping (this step is a process of reverse equipment characteristic, also need to know in advance some characteristics of the display device files).
The essence of color management is to carry out a series of calculations through hardware information and color information to ensure the high-fidelity reproduction of color. However, the current color management still can not achieve 100% distortion – free color reproduction.
5.3 Image signal processing
The steps of camera imaging can be roughly simplified into three steps, as shown in the picture (the picture is from Lou Bin, enjoying the evaluation of Huawei P30Pro: Camera phone that can calculate the moon, Bilibili live video network).
- In the first step, light enters the lens and illuminates the photosensitive elements (CMOS, CCD).
- In the second step, the sensor is stimulated by the light signal and generates an electrical signal, which is converted into a digital signal.
- Third, the Image Signal Processor uses a set of built-in algorithms to process digital signals into photos.
In the Process of camera imaging, in order to make the digital Image recorded by the camera similar to that perceived by human eyes, a series of Image preprocessing is required, which is called Image Signal Process. A common configuration of ISP Pipieline is shown in the following figure.
Among them, two interesting parts related to color vision are color filter array technology and white balance algorithm.
5.4 Color filter array technology
The Bayer array is the best known color filter array, as shown below.
Green filters account for 50 percent, while red and blue filters account for 25 percent each. The reason for this also has to do with the nature of human vision. In general, the human eye is more sensitive to green, so the green filter takes up more of the color array. The resulting RAW image needs to be interpolated to get the final color image we see, as shown below.
5.5 White balance algorithm
Well, since I did a lecture on white balance algorithms, I’ll just use my powerpoint from that time
In addition to White Patch and Gray World, there is also a very practical White balance algorithm, Shadow of Gray (SoG), which introduces Minkowski normal form on the basis of Gray World. Interested friends can refer to the blog on the Internet, for the introduction of these three algorithms is very comprehensive.
The code implementation part is actually very simple, the most important work of the white balance algorithm is to estimate the light source. The method of eliminating the light source is to adjust the R channel and B channel of the source image by estimating the R, G, and B ratio of the light source (do not adjust the G channel, because the human eye is more sensitive to green).
% Matlab2017a
% whitebalance.m
clc
clear
close all
input_image=double(imread(As' C: \ Users \ \ Desktop \ juejin \ 4 - \ thedress JPG '));
figure(1);
subplot(221);
imshow(uint8(input_image));
title('Original image');
R=input_image(:,:,1);
G=input_image(:,:,2);
B=input_image(:,:,3);
%% maxRGB
white_R=max(R(:));
white_G=max(G(:));
white_B=max(B(:));
output_image=input_image;
output_image(:,:,1)=output_image(:,:,1)*white_G/white_R;
output_image(:,:,2)=output_image(:,:,2)*white_G/white_G;
output_image(:,:,3)=output_image(:,:,3)*white_G/white_B;
subplot(222);
imshow(uint8(output_image));
title('maxRGB');
% imwrite(uint8(output_image),'C:\Users\as\Desktop\maxRGB1.png');
%% GRAY WORLD
white_R1 = mean(R(:));
white_G1 = mean(G(:));
white_B1 = mean(B(:));
output_image1 = input_image;
output_image1(:,:,1) = output_image1(:,:,1)*white_G1/white_R1;
output_image1(:,:,2) = output_image1(:,:,2)*white_G1/white_G1;
output_image1(:,:,3) = output_image1(:,:,3)*white_G1/white_B1;
subplot(223);
imshow(uint8(output_image1));
title('GRAY WORLD');
%% SOG
p=6;
white_R2 = (mean(R(:).^p))^(1/p);
white_G2 = (mean(G(:).^p))^(1/p);
white_B2 = (mean(B(:).^p))^(1/p);
output_image2 = input_image;
output_image2(:,:,1) = output_image2(:,:,1)*white_G2/white_R2;
output_image2(:,:,2) = output_image2(:,:,2)*white_G2/white_G2;
output_image2(:,:,3) = output_image2(:,:,3)*white_G2/white_B2;
subplot(224);
imshow(uint8(output_image2));
title('SOG');
Copy the code
The results presented
Gray World has no dependence on white dots, but has a higher dependence on image color richness. Because its estimate of the light source is from the average color of the image. The result is shown below.
The code section of SoG has been given, interested friends can debug parameter p(p=6 robustness and effect is ideal).
Write in the last
If you like this blog post, please give it a thumbs up! If you like my style and want to know more about it, please follow me. I will update you occasionally with interesting graphics and visual knowledge and add my own unique understanding
Your support is the biggest affirmation for me.