Theoretical Basis of CCM Debugging

foreword

A long time ago, I saw some CCM debugging summary on the Internet, but there is no theoretical basis. After my own reasoning and comparison with the results, here is a debugging theory that I call the principle of hue circle complementary color.

CCM theory:

CMOS sensor uses color filter array (Color Filter Array, CFA) to achieve light sensitivity to specific bands. The most commonly used CFA is RGGB, so there are three response bands of R, G, and B. Due to the limitations of technical conditions, it is difficult for these three bands to have the same response characteristics as the human eye. Therefore, for the same color of light stimulation, the RGB signal output by the sensor will be somewhat different from the RGB signal felt by the human eye. Generally, the sensor Colors are less saturated.

The way to solve this problem is to use a 3x3 CCM matrix to transform the color from the sensor RGB space to the RGB space of the human eye, so that the effect of the image conforms to the subjective feeling of the human.

insert image description here
This 3x3 matrix is ​​called the color correction matrix, English color correction matrix, referred to as CCM, and its transformation formula is as follows.

insert image description here
A basic constraint of the CCM formula is that the white balance cannot be destroyed, that is, for any input of R=G=B, it must be guaranteed that the output satisfies R'=G'=B'. It is for
this reason that color correction operations should only be performed after white balance adjustments.
In practice, the 18 color blocks on the X-Rite 24 color card are usually used as the standard to calculate the correction coefficient. The basic principle is to use a camera to shoot the color card and extract the average color (Rn, Gn, Bn) of the 18 color blocks, n
= 1…18 form the input matrix
insert image description here
, then there is a matrix equation about CCM
insert image description here
, then there is a matrix equation about CCM

insert image description hereThe above process requires the use of some kind of color card, so it is called a patch-based method.insert image description here

The above theory comes from: https://www.zhihu.com/column/sining

CCM color debugging summary:

In order to ensure that the treasure balance is not destroyed, it needs to meet: RR + GR + BR = 1,
RR GG BB corresponds to R, G, B saturation.
insert image description here
insert image description here

insert image description here
The above theory comes from:
Netizen 1
Netizen 2

So what is the theoretical basis for their summary? Didn't say it, it's just the experience of debugging and summarizing.

Let me infer below, the following is the focus of this article.

Complementary color theory of hue circle:

According to the arrangement of the hue circle: the complementary color of RGB is CMY as shown in the figure below:
insert image description here
So what does this have to do with our debugging of CCM?

For example: now it is yellowish red

insert image description here
Pointing Y to R on the color wheel represents yellowish red (black arrow).
If correction is required at this time, the arrow needs to be weakened.
At this time, you can construct the arrow (red) pointing to R from B, and the arrow (green) pointing to G to
strengthen the red color, +Br (against the offset with the black arrow), and weaken the green -Bg (weaken black in the same direction) to achieve our corrected Purpose.

Comparing the experience summed up by the predecessors, it is correct and
The other conclusions are also correct.the other conclusions are also correct.

At the beginning, it was said that the addition of the horizontal axis is equal to 1, BR+, RR remains unchanged, GR needs to be - to maintain balance, and the same is true for other lines

insert image description here

Because CCM has only three colors of RGB, the arrows are constructed for RGB.
If the RGB color is biased, the arrow is directly constructed for RGB, and if it is CMY, the arrow is constructed for its complementary color (RGB). This theory applies to both the summary in the table above.

Guess you like

Origin blog.csdn.net/VinagerJoe/article/details/129736452