The color triangle is not two, but one angle

The color triangle is not two, but one angle


How to see a color that does not exist in nature?

image


Four years ago on Habré there was a post with an interesting and useful video "How the color" . Lecturer - Dmitry Nikolaev, Head of the Visual Systems Sector, IITP RAS.

I did the decoding (to the best of my understanding of the material), because I consider both the topic important and the presentation to be excellent. While typing the text, I almost changed my φ (λ). A word to the speaker:


Let's talk about mathematics and geometry of color, about what abstract structures are incorporated in this word.

What is the "color" no one knows.

Color is something that a person talks about, observing and knowing the world with an eye.

The eye registers some properties of electromagnetic radiation, called light, that enters the eye, refracted on the lens, projected on the retina. "Cones" register some power properties. And then suddenly a person talks about some kind of “color.”

In physics, there is no color, but there are spectral properties of radiation.

“Color” is associated with the relative distribution of spectral energy, power, or radiation flux. (When passing through a prism, a person sees a characteristic "rainbow".)

Exactly, “color” is a psychological phenomenon. Color is a sensation unrelated to objective physics.

We can talk about the color of things - the red shirt - the “red” of the shirt is not directly related to the radiation that comes from this shirt in the eye.



image


"Color" is located at the junction of three worlds - biology, physics, psychology.

The phenomenon color continuity (color constant) - human ability, regardless of that came into the eye from a specific point of the object, use the term “object coloring”.

image

I do not know a single vision system that has a good color constancy ( 2014 ). White car lit by the red sunset sun - the technique is wrong, man is not.

Color is a property of the spectral composition of the radiation. Common to all radiation. including visually indistinguishable to humans.
  - Schrodinger


This definition is only half true. If the color corresponded only to radiation (and not to objects in addition), then Schrödinger was absolutely right.

The simplest color model in which Schrodinger worked


image

S (λ) is the spectral distribution of the light flux. We say that this color carries photons with different energies. Or is it the distribution of electromagnetic waves with different wavelengths.

X (λ) In the eye there are three types of "cones", each characterized by a sensitivity spectrum, how many electrons are knocked out of the pigments that are in this cell, depending on which photon it has absorbed. This is a vector.

Consider a physically infinitesimal portion of the retina and say that at each point we have three numbers:

image


Each photosensitive element sums all photons at different wavelengths. In different types of cones. Some electrons are knocked out in red, some in blue, some in green.

In reality, there are some interpolation algorithms, both in the camera and in the person.

How did you understand that this thing is three-dimensional? That vector "a" (electrically difficult to pull out) three components? In the afternoon. At night - one, at dusk - four. But we will talk about day vision. It was possible to establish it earlier, than we figured out the cones, using colorimetric experiments.

Schrödinger talked about colorimetric observation conditions . Only a uniformly glowing area gets into the person’s field of view, as if the person is looking into the eyepiece, and only the radiation of a certain spectral composition enters. At the same time, he can name the color that he sees. But the enumeration of these colors will not say anything about the dimension of the color space.

The following interesting experiment was made. The field of view of the person was divided into two areas. A specific spectrum was fed into one area. In the other half sent a mixture of several other sources. And the man was given to twist as many pens, the mixture from how many sources were fed there. And the person was forced to answer the question whether he could set the pens so that he could not visually distinguish the boundary between the mixture and the reference radiation.

It turned out that if a person is given three pens, he can always equalize any radiation.And all the other subjects will not see boundaries either. Two can not. It is possible to pick up two pens and an initial basic one in such a way that it cannot in any way.

Why does this work from the point of view of our integral?

image


Sx
S0
S1

image
< br/>
Considering the fact that our integral is a linear projection from the infinite-dimensional space of functions S.

If we have three non-coplanar vectors. There is always a decomposition, all of which are non-negative.

There are two windows, where you can weightedly sum but not subtract. Therefore, instead of “subtracting” in one window, we “add” in another. And you can always decompose into three basic emissions.

So it was shown that the color space inside a person is three-dimensional .

This is an important experience. And no amount of cones detected in the human eye can replace this experience. Because the detected number of different types of photosensitive cells in the human eye can limit the dimension of this space from above. If there are three types of cones, then the color space is no higher than three.

Colorblind enough two handles. They have a different color space. Therefore, it is wrong to say that they “do not see” any color. For them, some pairs of our colors are one color. And these pairs are infinitely many. But there is no such part of the spectrum that they do not distinguish.

"Green and red is very close." The simplest linguistic experiment: how many colors can you name between green and blue, and between green and red.

This is due to the fact that the concentration of photosensitive receptors in the foveal region ("green" and "red") - the vast majority, but almost no blue, they are located on the periphery. Therefore, the human eye as a device can very accurately, by averaging many cones, estimate the spectral composition in the red-green region, although the detectors themselves show very correlated signals, and a strongly decorated blue signal loses its accuracy because it is spatially very rare.

The discomfort of bright blue inscriptions arises from the fact that we perceive them from the corner of the eye, and we do not like to look from the corner of the eye.

The main disadvantage of Schrödinger's definition is related to the fact that he completely ignored the way a person “uses” color. The person does not look at the abstract radiation, he looks at the color that reflects from the surface.

image
< br/>
For the sake of simplicity, I will completely ignore the geometry and indicatrices of scattering, and I will only speak about the relative spectral composition. as power changes, I won't be bothered most of the time. All integrals over solid angles and many unpleasant things will disappear.

"Integral", which "flies" into the eye has the following form:

image
< br/>
From here all the color sensations grow.

Returning to the experiment with dandelion, I want to say that human vision solves a phenomenal task, unimaginable. If we consider one point, it is obviously insoluble. Please rate.

image


We know these three numbers (vectors “a”), we know these three functions X (h) as a result of self-calibration.We DO NOT know how the sun works, it is always different, at sunset, at the zenith, depending on the clouds, the lamps are colored.

The task of a person’s color vision is to evaluate this function:

image


This function sets the material. This feature says ripe fruit or not. We want to determine this function by three numbers, provided that it multiplied by another unknown function.

While we did not appreciate how/the object was lit, we can not say anything about the color. If this mechanism did not work, we would be confused if we were shown a red piece of paper lit in white and a white piece of paper lit in red. And we are not confused. Until then, in sight more than just this piece of paper. If a piece of paper is hanging in the void - we can not distinguish. If there are a lot of objects, it is immediately clear what color is the lighting, what is the paper.
The brain solves a bunch of tasks that we don’t guess until you have to program the robot, then you begin to understand how much the human visual system does.

Coloring


Let's single out this concept from the word “color”. Coloring is an objective characteristic of a physical object. Even if I close my eyes, the color does not disappear, it is inherent in the subject itself, in contrast to the "color", which is a sensation.

Brightness


There are black and white TVs and the color can almost be "outlived." The power component of the color remains. It is necessary to separate the words "brightness" and "lightness." Brightness refers to radiation, and lightness refers to an object. The subject may be bright and the lighting bright. Both are power characteristics, but belong to different worlds and this is important. The reflection coefficient is between 0 and 1, and the radiation power from above is unlimited.

A white object in the black-and-white world exists, and “white” (maximum bright illumination) radiation does not exist.

Saturation


There is a parameter naturally explained to man. Saturation - how far the color is from the gray scale. Saturation is what decreases when diluted with any gray. The maximum saturation of the laser radiation. (We’ll talk about chemical psychoactive substances a little later.)

Hue


This is what remains of the color in the color space after we entered the two previous coordinates. Sometimes we confuse color and color tone. This has both physical and biological prerequisites.

Chroma


This is the two-component part of the color, which is not power. If “throwing away” “luminance” from the radiation color, then “chromaticity” will remain.

Metamerism


Unlike any woman, the man completely ignores the phenomenon of metamerism. Every girl knows that it is not worth buying a blouse that fits to a skirt under fluorescent light, until you have tested it in natural light. This is an intuitive knowledge of the existence of metamerism coloring.

Radiation metamerism is when we know that there are infinitely many different spectra that can get in the eye so that a person will have the same sensation.

Color (according to Schrödinger) is something common to all spectra that cause the same sensation.

Metamerism colorings . If two different colors look the same for some fixed S, this does not mean that they will be the same for the other S.

To guarantee that they will coincide, we can only for identical φ, that is, for absolutely identical spectra. We can pick up such disgusting spectra of sources, band, for example, with some peaks, that the two colors that just seemed to be the same color will become different. And this is exactly what is happening in stores.

Three-quarters of the task of color constancy is to evaluate S (λ) at the point where the object is located, that is, to evaluate how it was illuminated.After that, we get a story similar to the colorimetric observation conditions.

In the west, linear models are widely used. Choose three such spectra that any color can be close to a linear combination of these three basic colors. And we get the connection of color parameters through a 3x3 matrix. Everything becomes beautiful, there are a lot of algorithms, though they work very poorly. There is a deep reason.

image

And the primitive reason is that you cannot simultaneously fit various narrow-band spectra by the sum of any three.

If there is a narrow peak that continuously rolls along the wavelength scale, then the linear model cannot fit all these narrow spectra at the same time.

Is there a model that can do this? Yes there is. Gaussian model.

We assume that φ (λ) is an exponent of a second degree polynomial. She has three parameters. She can approximate white, she easily aproximates any narrow spectrum, but she will not be able to do a series of "bells".

The colors of both the high and low saturation Gaussian models approximate equally well. This is a very important feature of it. Second property:

image
< br/>
In our integral, functions multiply together. In order for the model parameters not to jump anywhere, it is important that the model be closed relative to the multiplication operation.

Violet colors


There is one "but." There are violet colors, they have such a spectrum - not much nil in the red region and not much nil in the blue region and the Gaussian cannot work with it. But there is a trick.

If the exponent is a polynomial with a non-zero quadratic coefficient, in our case the Gaussian is transformed into an exponential growing parabola. And the integral from zero to infinity ceases to be finite, but since we always see it through the eye, where the Gaussians have time to decrease faster, for this, their highest coefficient must be greater in absolute value than this color, it turns out that the integral is taken as a result , and we can safely work with not very saturated purple colors and violet radiation.

Glare


How to estimate the spectrum of the radiation source? If we do this, then by entering the color model, we will solve the problem of color constancy. There are several hypotheses about this. The earliest models were as follows: if a person sees a white object in the scene or if he sees a flare (on a smooth dielectric surface he sees a reflection of the source).

Regardless of the color of the object itself, the highlight carries the spectrum of the color of the source. There is no “multiplication” of coloring.

All painted dielectric surfaces can be described as a first approximation by a dielectric model of Sheffer's flare, when there is specular reflection, for example, from sweat on the forehead, and there is diffuse reflection from pigment particles "in depth".

image


"Mirror component" - as if from a white object. In a highlight, any dielectric looks like white. With metals not so. Smooth metal reflects "its" color. The glare from gold is always yellow. The glare from copper is always red.

The artist sees three colors at a point, the rest two


Another thing that complicates the concept of “color” is that when we look at one point, we see three colors at once. The first thing we “see” (we can learn to see) is “what flew in from there”. To see it well, you need a straw. If a person does not see “what has arrived,” he cannot become a realist artist.A lot of tricks and a lot of self-training are required for the artist to understand what point he came from and draw exactly “this”. Then the picture will be realistic. Instead, the brain solves useful problems (because being an artist is absolutely useless in the race for survival). The brain will determine what went down there. Looking outside, we understand that the grass is lit by the setting sun. The shade is bluish because it is illuminated by the sky. And at the same time you see at this point what color is the object. Looking at the human face you will see the smallest blush, because it is evolutionarily extremely important (the girl blushed or not), but you do not care how the shadows fall on her face, it is illuminated by the sunset or the midday sun, or it is a cloudy sky. The problem is that it is not the artist who sees this in two colors at the same time, without being aware of this, and the artist must see three colors.

When we draw what we see, in the sense of colorings, we begin to draw like children. And the artist has to turn off a lot of vision algorithms in order to turn into a “camera”.

White Balance


“White balance” in cameras means nothing at all. This is shamanism. As in the cookbooks - “cook until ready,” “add salt and pepper.” For a photographer, this makes sense, they know what will change if this handle is turned, but in fact it is absolutely not clear what it is. I guess what's going on there, but it's worse than talking about color. I would prefer not to talk about "white balance", you need to keep solid ground.

Color Triangle


We have some three-dimensional color space in which our vectors live image, by convention RGB to make it easier for geeks. And back to the radiation. Someone shines in the eye.

Question: Are any combinations of R, G and B possible?
Answer: Of course not.

image

We drew the spectra of sensitivity. They partially overlap. They are nowhere strictly zero, where others are not zero. This means that you cannot excite one cone without arousing another cone, at least a little.

If we could illuminate with a "spectrum with negative energy," then we could go anywhere in space, including negative ones, to enter.

image

If we illuminate like this, everything will be fine, but it is physically impossible.

Mathematically, we can say this: All possible radiation spectra in the original infinite-dimensional space form cone (not“ round ”, but from linear algebra ).

A cone is such a structure that if a vector belongs to a cone, then the vector multiplied by a non-negative number also belongs to the cone.

The non-negative functions of one argument that we bombard our eye with are a cone.

Imagine an infinite-dimensional cube and that “quadrant”, where all axes are positive, our cone will live there.

Since our eye performs a linear projection of the RGB space, here, in the color space, all permissible reactions will also form a cone. Moreover - a convex cone. This means that the sum of two cone vectors with non-negative coefficients also belongs to the cone.

image


Construct a section and make a central projection. We can enter the chromaticity plane as we like. Brightness grows from zero.

On the chromaticity plane, since this is a cone, we must have some kind of convex figure.

image

The fact that this thing is called a triangle is a separate humor. She has two corners. But I will now easily prove to you that in fact a color triangle should have one angle. And it is obvious. Why there are two of them is completely unclear.

image


image
< br/>
Recalling how functions are arranged and that this is a convex set, we can say that any function can be assembled from a convex sum of delta functions.

image

Mathematicians would have killed me for such a thing, but ... in the limit. Whatever that means.

Let's take such a shallow-shallow discretization and say that any function within this discretization is the sum of some bars. This means that any spectrum that can reach us in the eye is a convex combination of some kind of laser radiation, infinitely narrow. This means that the entire color cone is a convex shell of reactions to laser radiation. With the color triangle is the same. CT is on the plane of chromaticity a convex shell of laser radiation.

Let's start moving the laser from ultraviolet to infrared. in the color space we will bypass some kind of loop.

image

Why loop? Leaving zero and returning to zero.

image

Because we do not react to UV, we do not react to IR either.

Some arbitrary trajectory.

The person is arranged in a specific way, that there are no concavities:

image

image
< br/>
This is a loop. She has one single "beak." And we smoothly project this thing onto the plane. And she should have a one "beak." It is obvious. In other places, everything is continuous.

But no.

The fact is that this fracture is directly in the center of the central projection. And derivatives from two different sides are different.

image

This is not a “beak” that converges to the same tangent, the right tangent and the left tangent are different.

Therefore, the UV part of the "beak" is projected here:

image

And IK - here:

image

And all the laser radiation live here:

image

And to assign a wavelength to each part of this arc of the color triangle.

But this thing can not be attributed to any wavelengths:

image

Because here the convex hull is closed. There are no such lasers. It can excite only two delta minimum functions.

The color triangle is a convex shell over reactions to laser radiation.

Not all points of our RGB are achievable in principle, in physics. There is, as I said, a trick.You can very much give a person on the head, or take any substances. What is the same for the brain. If we already have amazing numbers at the processing stage, then there may be such ones that do not exist in nature. From the cones this could not come. But in the visual cortex, under the influence of some kind of chemistry or mechanics, such combinations can arise. Or in a dream. In a dream, we receive signals not from cones. In principle, we can see colors that do not exist in nature.

Q: And in imagination, can we?
Answer: I can not say anything about your imagination, I'm sorry. Being absolutely honest, I can't even say anything about your existence, but you are asking about imagination.

Mondrian


There was such an artist - Pete Mondrian . With Kandinsky and Malevich considered the father of abstract painting.

image


Mondrian has characteristic pictures of rectangles of several colors.

examples
image


image


image/div>



In color science, “mondrian” has become a household word, because it is a very good imaginary object, watching the reaction of a person who looks at “mondrian” can say a lot about the visual system. Changing the colors in the picture and changing the illumination can understand something about a person. For example, they understood that if there is white in the picture, then the person does not confuse the lighting with the coloring, if there is no white, he may be confused.

If we take the mondrian, which does not glare, it is very dull and illuminate it evenly, and then we will change all sorts of colors on mondrian. What's in the color space (with a fixed X (eye) and S (source)) "carve".

Some cameras take the IR signal from the TV remote - blue. And this is only the lesser evil. In fact, the color rendition of any camera is disgusting. But the interpretative power of the human visual apparatus is so great that we slaughter it.

A person loves saturated colors more, so TVs have a saturation of a shot. So that people prefer to watch TV and not through the window. In the window - gray and disgusting, on the TV - fine.

Color body


Fixed X, fixed S, change φ, but it is clamped from 0 to 1.

In addition to the black dot:

image

there is a white dot:

image

When φ is strictly equal to 1. The white object reflects everything (if the source is yellow, then the “yellow dot”). We will not go beyond this point. This is no longer a cone. What is this?

image

This is a convex symmetrical figure, lenticular.

Why is this thing symmetrical? It's simple. On any spectrum of color there is another, such that it is a unit minus the first spectrum.

Maximov theorem


If you know the shape of the color body, you can restore the spectrum S (λ) for all λ. For me, this is just a shock.Unfortunately, this cannot be a good algorithm for color constancy, because there are never so many colors that a person observes, and they are all differently illuminated in power.

The sun looks like an unfinished light bulb (yellow), and the sky, on the contrary, looks like a red light bulb (blue). This is a question about color temperature. Began to approximate light sources by Planck sources. And the Planck source has a corresponding temperature. To what temperature should an absolutely black body be heated so that it gives such a spectrum out of itself.

I can take all sorts of:

image

for each Planck source, of which there is only one parameter family, I can build a color body, I can project this color body onto the chromaticity plane, and it will not occupy the whole color triangle. If I see something in the scene that falls behind this projection, I can exclude this source from the list of hypotheses about how it was covered.

image

In the west, this is called the gamut algorithm. How to apply the Maximov theorem is not clear, because we can observe the color body only in the laboratory.

The task of color segmentation


There is a simpler task than the task of color constancy. The question is whether we can, looking at the photo, determine where one color ends and another begins. Without naming colors. Say - there is a jump in color.

We assume that we have no textures and watercolors. Homogeneous objects, but different among themselves, they themselves divide the space and there are areas with different colors. Splitting an image into these areas is a color segmentation task.

For many years, people have attacked the same rake. People say: “I see that the entire table is brown, which means that the program should see it.” You just need to cluster the color distribution with a good algorithm. Does not work. And it will never work. Since the original premise was false. What we see as an object of the same color cannot be s-approximated in the color space at all. In most cases. If it is a uniformly lit mondrian, then yes.

Imagine the perfect spherical horse in a vacuum. A certain color. Here it hangs and is lit by the infinitely distant sun. On the side. Question: how will this horse be projected into color space?

Answer. Unlike a flat horse, a spherical horse in color space will be a subset of the line passing through the origin.

image

K-means cannot handle this thing. And most of the things look like this. And if the sphere was also smooth, and not matte, then there is a glare and we have two indicative lines of scattering, then we will have a weighted sum of two colors under the integral, and this thing will become a piece of the plane passing through zero.

image

It can be shown that in different simplest cases of observing various objects and different lighting conditions, uniformly colored objects will be projected into the color space as linear submanifolds. Not necessarily through zero.

You can enter a ranking classification: sometimes it will be points, sometimes - the plane, which pass through the achromatic line. And by describing the scene, claiming whether the white source was, whether the object was smooth, or whether there were two sources, one parallel and the other diffuse (like the sky, from all sides), one can understand not only the dimension of this subvariety, but also its position relatively zero and achromatic straight.

It turns out that this is important, because we can then say how this thing is projected onto the chromaticity plane, because if it is a linear subspace, then it loses its dimension when projected onto a color triangle, which is good. And if we project, what we see on the color tone circle, it turns out that in many cases, when even if it was a plane, it became a straight line passing through a gray point on the CG, and therefore it was projected into one point on the color circle tones. And this is very important.

Therefore, a person selects a color tone as a separate coordinate in the color space, because this is the most stable component of a color with changes in lighting and observation.

There is an achromatic straight line in our color space where the spectra are projected equal to the constant

Photo equipment


The camera's sensitivity spectra should be a linear combination of human, then three photosensitive elements are enough for it, but since this is not so, you need more, and make three and are not reducible to humans, therefore, the device color is far from ideal.

Monitors


Interestingly, the answer about monitors is completely different. A good monitor should have at least five types of light sources. A monitor can only depict a convex combination of its three colors, and this is always a subset of the true human CT. In order to properly support it, you need to take a few more filters and approximate the pentagon. There is one company in America that plans to play on it sooner or later.

Printer Colors


Due to the metamerism of colors, the printer should have infinitely many colors. Otherwise, it will not be so that with different sources of color the picture still looks right. This is one of the reasons why professional printers have a fairly large amount of ink. And they constantly release “patches” that improve metamerism when observed in luminescent light.

Lena512.tiff


Since 1973, the image processing industry has adopted new algorithms to test on the image:

image

Here here they even spotted this “Lena”.

The testers themselves have a picture below that goes much further . So I thought, why would not color designers invent their own jokes and a girl in Mandriana can become a standard.

image/div>

Source text: The color triangle is not two, but one angle