Rockchip Color Optimization Guide ISP2x en v1.2.1
Rockchip Color Optimization Guide ISP2x en v1.2.1
Guide ISP2x
ID: RK-SM-YF-603
Release Version:V1.2.1
DISCLAIMER
THIS DOCUMENT IS PROVIDED “AS IS”. ROCKCHIP ELECTRONICS CO., LTD.(“ROCKCHIP”)DOES NOT
PROVIDE ANY WARRANTY OF ANY KIND, EXPRESSED, IMPLIED OR OTHERWISE, WITH RESPECT TO
THE ACCURACY, RELIABILITY, COMPLETENESS,MERCHANTABILITY, FITNESS FOR ANY PARTICULAR
PURPOSE OR NON-INFRINGEMENT OF ANY REPRESENTATION, INFORMATION AND CONTENT IN
THIS DOCUMENT. THIS DOCUMENT IS FOR REFERENCE ONLY. THIS DOCUMENT MAY BE UPDATED
OR CHANGED WITHOUT ANY NOTICE AT ANY TIME DUE TO THE UPGRADES OF THE PRODUCT OR
ANY OTHER REASONS.
Trademark Statement
"Rockchip", "瑞芯微", "瑞芯" shall be Rockchip’s registered trademarks and owned by Rockchip. All
the other trademarks or registered trademarks mentioned in this document shall be owned by
their respective owners.
Beyond the scope of fair use, neither any entity nor individual shall extract, copy, or distribute this
document in any form in whole or in part without the written approval of Rockchip.
Website: www.rock-chips.com
Foreword
Overview
This article aims to describe the debugging of color-related modules, mainly to provide help for
engineers who use RkAiq module for image color tuning.
Product Version''
Revision History
Wendy
Weng 2020-07- RKISP2.x_Tuner_v0.1.0
V1.0.0 Initial version
Emily 30 and above
Chi
Contents
2 AWB
2.1 Function description
The automatic white balance algorithm can automatically calculate the WB gain (white balance
gain of the RGB channel) and multiply it with the RGB channel to restore the white affected by the
ambient light to pure white, ensuring that the camera will The imaging color is consistent with the
true color of the object. When there is a white point in the scene, WB gain is calculated based on
the automatically detected white point, and when there is no white point in the scene, the WB
gain is obtained by the simple color method. The color adaptation module adjusts the target of
white balance correction so that the image after white balance correction is as consistent as
possible with the appearance perceived by the human eye. The tone adjustment module adjusts
the overall tone according to preferences. The automatic white balance is composed of hardware
statistics and software strategies, as shown in the AWB flowchart
AWB process
Automatic white balance needs to be configured with awbEnable as 1 in xml. The enabling
parameters of manual white balance/auto white balance/white balance correction in xml are as
follows:
Name Description
Value 0 or 1
0 means no white balance correction is performed
wbBypass
1 means white balance correction is performed, and the white
balance gain used is controlled by awbEnable
Value 0 or 1
0 means using manual white balance gain
awbEnable
1 means using automatic white balance algorithm to calculate
white balance
hdrFrameChoose
Name Description
Value 0 or 1
0 fixed mode
mode
1 automatic mode, which automatically selects which frame is used for
white balance statistics.
luma limit
Corresponding to the limitRange node in XML, enter the pixel value range of white point statistics,
and the points that exceed the range will not be counted.
Name Description
Corresponding to the measureWindow node in XML, corresponding to the awb statistics main
window configuration
Name Description
Value 0 or 1
0 Automatically configure the main window of statistics as raw size, the default
mode
value is
1 Customize the size of the statistics window
multiwindow
Name Description
Value 0 or 1
multiWindowEnable 0 Multiple sub-window statistics disabled
1 Multiple sub-window statistics enabled, default value
The statistics of multiple sub-windows need to be combined with the strategy parameters
(corresponding to the multiwindowMode in XML). For example, when the face detection module is
used, the mode can be set to 1, and the position of the face window can be configured in the
multiwindow to achieve the statistical white point minus the skin color point The purpose is to
improve the accuracy of white point detection.
Name Description
Multi-window mode
The value is 0, or 1
multiwindowMode 0 means that the statistics of multiple sub-windows are not used.
1 means that the statistics of the white point = the statistics of the
main window-the sub-window Statistics
RGB2XY
RGB domain to XY domain transformation parameters, the parameters in XML are as follows
Name Description
Make the white points of different light sources lie in a straight line as
pseudoLumWeight much as possible, the parameters are generated by the calibration
tool, and the value range is 0~1
Name Description
XY domain white point interval, there are three sizes of white point interval,
lightXYRegion the white point interval is as shown in the figure [x0,x1,y0,y1]
Obtained by the calibration tool
The white point interval of the UV domain is shown above, the white point in the quadrilateral
box, the parameters in the XML are as follows
Name Description
(1) Calibrate the uv straight line of the gray block of a certain light source.
With six gray blocks, under the condition of A light, the uv value can be fitted to a straight line:
(2)Calibrate the straight line between the uv value of the gray block and the uv value of the
standard white block, dis and y. To require the relationship between the YUV of the gray block,
you can first calculate the Euclidean distance between the gray block (u, v) and the standard white
point (u_ref, v_ref), and then fit the distance and y into a straight line:
Name Description
k2=-1/k0,k0 is the slope in img. Value range [-218,218-1], 9bit signed integer+
k2Set
10bit decimal
b0 is the intercept in img, value range [0,2^17-1], 17bit unsigned integer + 0bit
b0Set
decimal
Straight line! img slope, value range [-218,218-1], 9bit signed integer +10bit
k_ydisSet
decimal
Straight line! img intercept, value range [-218,218-1], 17bit signed integer + 0bit
b_ydisSet
decimal
The dis-th of the segmented straight line dis-th. The value range [0,2^12-1],
disSet
8bit unsigned integer + 4bit decimal
The th of the segmented straight line dis-th, whether it is the white point
tHSet threshold condition. The value range is [0,2^8-1], 8bit unsigned integer + 0bit
decimal
Increase the interval of non-white point, or the interval of white point of additional light
source
Generally, points that fall within the white point interval of XY, UV, and YUV at the same time will
be white points, and some non-white points may also meet this situation, and they are located in
the center of the interval, which is difficult to exclude. In this case, a non-white point interval can
be added to the UV or XY space, as long as the points fall into this interval, they will be regarded
as non-white points.
The points of some light sources deviate far from common standard light sources. If the points of
the light source are forcibly added, the white point interval will contain many color blocks. At this
time, the white point interval of the additional light source can be added to the UV or XY space. As
long as the white point falls within this interval, it will be regarded as a white point.
The maximum sum of the number of non-white point intervals and white point intervals of
additional light sources is 7. Corresponding to the excludeRange parameter in XML,
Name Description
Value is 0 or 1
Domain 0 UV domain white point interval
1 XY domain white point interval
Value 1 or 3
mode 1 The range is the non-white point interval
3 The range is the white point interval of the additional light source
According to the lower threshold, the environment brightness-white point number space is
partitioned, so that different sections use different methods to calculate the white balance gain.
The corresponding parameters in the XML are as follows
Name Description
① DayGain
Name Description
② NightGain
Name Description
③ SingleColorGain (singleColorProcess)
Name Description
Select the color block used for pure white balance. You can choose
colorBlock from the color card or define it yourself. Generated by calibration
tool
meanC The average chromaticity value of the color in the LCH space
meanH The average hue value of the color in the LCH space
lsUsedForEstimation Select the light source for simple color, generated by the tool
The white balance gain of the red channel of the light source
RGain
The value is greater than 0 decimal
The white balance gain of the blue channel of the light source
BGain
The value is greater than 0 decimal
Name Description
For outdoor light sources, the probability of the light source is pout, which is calculated
according to the brightness-pout curve in Figure 4- 14
For indoor light sources, the probability of the light source is pin = 1-pout
Name Description
Name Description
Name Description
Name Description
The factor that controls the degree of color adaptation under different
ca_LACalcFactor
brightness, the default value is 40.
The factor that controls the degree of color adaptation under different
ca_TargetGain brightness, the default value is 40. The value range is 0.0-xxx, and the
default value is d50 white balance gain.
WBGain range limit
Limit the white balance gain to the area surrounded by the red straight line as shown in the figure
above. The parameters in the XML are as follows
Name Description
Ambient brightness
LvValue
Value range 0-xxx
The ct value of each point is shown in the following table, from left
ct_out to right (the hue is from cold to warm), from top to bottom
The value range is 0-xxxx
The cri of each point as shown in the following table, from left to
cri_out right, from top to bottom (hue from purple to green)
The value range is not limited
Output color temperature-color rendering index table 1 (without color temperature adjustment)
Output color temperature-color rendering index table 1 (partial color temperature adjustment)
2.3 Calibration
Basic principles of AWB calibration
Mainly to calibrate the white point conditions of Raw in XY, UV, YUV, pure color algorithm
parameters and white balance gain under standard light source
When collecting raw images, you need to prepare the following environment:
② Adjust the exposure parameters so that the maximum value of the brightest white block in
the color card is [150-240], the brighter the better in this range
Take the x-rite 24 color card under A, CWF, D50, D65, D75, HZ, TL84 light source in sequence, and
the schematic diagram of the mosaic is as follows:
(1) When calibrating, it is mainly to adjust the white point boundary of the UV and XY domains,
and the TH value of the YUV domain
(2) The information display of each light source can be selected through the check box in front of
LightX in the Display Control panel.
(3) The Exclude WPC Range panel can be used to increase the non-white point interval and the
additional light source white point interval.
(4) AWB Simulaton is used to detect the white point of the raw image and calculate the white
point gain
① LoadImage After importing the Raw image, the white point information will be printed as
shown below. The white points of different light sources are displayed in different colors. The
number of white points in the middle, large, and small boxes RGain accumulation and BGain
accumulation will be displayed in the three text boxes of Detected WP Number, RGain, and BGain
② Click any position in the image, it will be mapped to the UV domain white point condition
interface and the XY domain condition interface, which is convenient to check whether the point
falls within the white point interval, and the RGBUVXY RGain BGain Dis Th of the point will be
displayed on this interface On the Stats of Point Track panel
(2) Click Load Raw Files to import the raw images under A, CWF, D50, D65, D75, HZ, TL84 (it is
recommended to calibrate the raw images of these seven light sources)
② Click FindChart to identify the color patches of all light sources in batches, as shown below
(display the white point detection result of the last light source)
③ Select other light sources from the drop-down menu, confirm the correctness of the color
block recognition, and found that only the last block of TL84 is recognized a bit to the right. At this
time, you only need to re-check it separately. Select Find chart one by one in the solid mode and
repeat step 12. Until the color block of the TL84 color card is recognized correctly, as shown below
(4) Click Calibrate to get the following initial white point conditions and other parameters
(5) Click AWB Simulaton, and then import raw images under A, CWF, D50, D65, D75, HZ, TL84 to
check the accuracy of white point detection
(6) Modify the UV domain or XY domain frame or YUV TH to make the white point detection of the
color card under each light source more accurate
(8) Repeat (5) ~ (7) until the white point detection of each light source is reasonable.
① Adjust the border as far as possible so that the white point is inside the frame, and the non-
white point is outside the frame (generally not possible)
② The interval enclosed by the middle or large frames of all light sources must be closely
connected (three line types represent three size frames)
Error demonstration (the intervals of the big boxes are closely connected, but there are intervals
between the middle boxes, as shown by the arrows below):
Correct demonstration:
③ a and hz light sources can be more compact in the Y direction of the XY domain, and d50 d65
can be relaxed in the Y direction of the XY domain
④ The interval enclosed by all light sources in the UV domain must be closely connected
⑤ Different light source boundaries can overlap, but do not overlap in both XY and UV space at
the same time
If the 7th block of the circled D75 light source falls within the hz range, it will be recognized as a
white spot
After re-adjustment, the 7th block B of D75 light source is not in the same light source in xy and
uv space, and will not be recognized as a white point
⑦ When the non-white point falls in the white point interval of XY and UV, it can also be
eliminated by reducing the TH or increasing the non-white point interval.
⑧ When the white point falls in the white point range of XY and UV, but it is still not a white
point, it may be excluded because it exceeds the brightness range, or it falls in the non-white
point range, or it does not fall in the range because it is less than TH. In the white point interval of
the YUV domain
A light
CWF:
D50
D65
D75
HZ
TL84
byPass is 0 means white balance correction is enabled, 1 means white balance correction is
disabled
mode is 0 means that the current is manual white balance mode, is 1 means that the current is
automatic white balance mode
(2) Algorithm related log
② WPNo is the number of white points in the small, middle, and large boxes
③ The effective xy type is 0 1 2 which means that the white points of the middle frame, the large
frame, and the extra light source are used to calculate WBGain, and the vaild wp number is the
corresponding number of white points (the sum of the points greater than wpNumPercTh);
WPType is 1 2 3 corresponding to the partition WpType1, WpType2, WpType3 in the strategy map
④ current gain is the wbgain calculated this time; df is the current dampfactor parameter
⑤ wbGainSgc is the WBGain calculated by the simple color algorithm; wbWeightSgc is the
weight of wbGainSgc, -1 means that the algorithm is not used
⑩ prob_total(0.372926),prob_dis(0.151197),prob_LV(0.142857),prob_WPNO(0.383987)
respectively represent the total probability of each light source, the probability of distance, the
probability of brightness, the probability of the number of white points
(3) Other
This information is used to characterize the color temperature of the scene. It is only auxiliary
information. Global is the comprehensive color temperature. Ill lists the probability and color
temperature of the first few light sources that participate in the calculation of WBGain.
Locate the problem from the log
① If the WPNo value is relatively small and there are some white spots in the actual scene, the
white spot conditions need to be re-adjusted
② Look at whether the statistics gain weigth of each light source is 1, and whether it is affected
by the strategy gain
If the scene does have fewer white points, but wbGainType3 may be more consistent with the
actual color temperature, you need to adjust WP_THL, WP_THH to divide the current scene into
WpType3
In other cases, please refer to the previous two points for adjustment
When you need to re-adjust the white point conditions, or when you can't locate the problem
from the Log, you need to grab the raw image to simulate the white point detection and view the
white point statistics under each light source.
(1) Example 1
On the right is the problematic scene, and on the left is the effect of grabbing the raw image and
re-adjusting the white point conditions.
Steps:
③ BLC LSC parameters are configured, the current version needs to re-calibrate these two
parameters
④ In order to refer to the distribution of white and non-white patches of the color card under
the previous standard light source, you need to re-Load Raw Files to import all the graphs used
during calibration, click FindChart to complete the color card identification, do not click Calibrate,
click Save, click Draw WPC From IQ Param to import the white point conditions, and display the
color patch distribution of the color card.
⑤ Click Load Image on the AWB Simulation interface to import raw picture 1, the picture and
white point detection results will be updated on the interface at the same time, as shown below
It can be seen that there are very few white spots identified, and the picture is indeed darker. As
shown below, the gray and white areas similar to the circle should be detected as white dots
⑥ Click the gray area on the image,
Check whether the mapped point is within the white point interval of XY and UV. If not, adjust the
white point condition to make it fall within the interval;
The AWB Simulaton interface will also display the value of R G B and Y at this point. It needs to be
compared with the limitRange set in the XML to see if it exceeds the range. If this is the case, you
can appropriately relax the point limitRange range. Because the particularly dark and bright
points are affected by noise or saturation of a certain channel, their Rgain Bgain will deviate from
the actual one, so this range needs to be weighed;
If it is within the range of limitRange and within the white point range of XY and UV, but it is not
recognized as a white point, you need to confirm the TH of YUV. The th of this point will also be
displayed on the AWB Simulaton interface. Refer to the interface Adjust the TH of YUV with this
value on the above;
⑦ After adjusting, click Save on the AWB interface, and click Run Simlation on the AWB
Simulation interface to re-simulate.
After modifying the white point interval of XY and UV, the white point detection is as follows,
which solves the problem of abnormal white balance
(2) Example 2
For the TV camera, the special feature is that the light source of the scene is greatly affected by
the light source of the TV screen and the content of the TV screen. The following shows the
phenomenon of abnormal white balance of the TV camera.
The red arrow points out the mapping position of the gray point in the XY domain and the UV
domain. It can be seen that the deviation from the normal white point is farther at this time. Solid
can add extra white point interval to include these light sources,
As follows
It should be noted that you need to manually modify the mode to 3
When the default mode = 1, treat this interval as a non-white point interval
(3) To be added
(1) In the webcam application, the white balance is set to natural light mode, which causes the
automatic white balance to not be turned on.
By looking at the log, it is found that the current mode=1 is manual mode
(2) When calibrating, it is found that the distribution of white points under hz a light is not
concentrated
(3) The light source of the cc module is estimated to be oscillating back and forth, causing the
color to oscillate
By increasing the value value in the tolerance node in xml, when the change of wbgain is smaller
than this value, it will not be updated to achieve the goal of stability. In this example, modify the
parameters in xml to
The CCM calibration tool supports 3x3 CCM (aij) pre-calibration for 24 color cards.
RV1109 supports multiple groups of CCMs with different color temperatures. When ISP2.0 is
running, the gain node can be configured according to the IQ parameters to adjust the global
saturation or local saturation to realize the dynamic adjustment of the CCM matrix coefficients.
Parameters Description
Brightness-saturation adjustment
Pixel brightness related saturation adjustment
Parameters Description
Parameters Description
scale The corrected intensity component of gain-scale, decimal, value range [0,1]
The parameters of the corresponding light source are automatically selected according to the
white balance gain, and different exposure gains (gain) corresponding to different saturation (sat)
CCMs can be configured under a certain light source
Parameters Description
The standard white balance gain corresponding to the light source, decimal,
wbGain
generated by the calibration tool, and the value is greater than 0
CCM parameters
Parameters Description
Seven light sources with different color temperatures: D50, D65, D75, A, CWF, HZ, TL84
Collection steps
Step 1. Place the color card in the center of the background wall of the light box to ensure that the
light sources on the left and right sides are uniform; if the project has high color requirements,
you can also put the corresponding color next to it, such as a skin color card, to confirm the effect.
Step 2. Adjust the exposure so that every color block of the color card after applying gamma
cannot be overexposed. It is recommended to use automatic exposure
Step 3. When shooting, adjust the object distance so that the proportion of the color card on the
screen is 1/9.
Calibration
Step
Step 1. For RAW data import and selection of 24-color area, please refer to "Rockchip IQ Tools
Guide ISP2x v1.1", Part 4, Module 5 "CCM".
(1) Set gamma: select the gamma curve that the camera will use. Supports Normal, HDR, Night
modes, and also supports customization.
(2) Set the color block weight: configure the color block weight in the 6x4 table, and the color
block position corresponds to the position in the table.
(3) Click the "Calibrate" button to calibrate and obtain CCM. Saturation can be manually adjusted
on the Calibrate page until the corrected effect diagram or color difference diagram in the Result
meets the requirements.
Chromatic aberration chart introduction
According to the deviation direction and the interval of the standard color block in the color
difference chart, analyze which component is abnormal, as follows:
(1) The color block of the camera is farther from the origin than the color block of the idea, and
the saturation of the camera is higher than that of the idea
(2) The distance between the color block of the camera and the origin is smaller than the color
block of the idea, and the saturation of the camera is higher than that of the idea.
Case picture:
The camera saturation of color block 15 (red block) and color block 14 (green) is lower than idea,
but it belongs to the category of relatively small deviation
Color block 13 (blue) is biased toward purple, and human vision may also feel that color block 13
is also biased toward purple, so this deviation is acceptable.
Generally, it is necessary to ensure that the deviation of the 13-15 color block color block is not
too large, which almost represents the three primary colors, and other colors can be obtained
from the superposition of these three colors.
If the 13-15 color block, or other color blocks that are more concerned, have a serious color cast,
you can increase the weight of the color block, but pay attention to the impact on the color cast of
other color blocks.
Precautions
(1) When identifying the 24-color area, make sure that the black border of each color block is not
selected
(2) It may be necessary to re-calibrate the CCM after adjusting the gamma curve, so it is better to
adjust the gamma first
(3) Improper brightness of the calibration chart will affect the saturation characteristics of the
calibrated CCM. The CCM saturation specified by the over-bright RAW icon is low, and the CCM
saturation specified by the too dark RAW icon is high.
(4) The recommended objective indicators are as follows, but they can vary from project to
project, and do not pay attention to these objective indicators
The value of scale can be adjusted within the range of [0, 1.0] to affect the final color correction
intensity. The smaller the scale, the lower the color saturation, and vice versa.
Adjust gains-sat
The smaller the sat, the lower the color saturation, and vice versa, the color saturation increases.
Different light sources can adjust different parameters.
When the first two points are adjusted to the maximum value, the saturation is still not enough.
It is necessary to recalibrate the CCM with higher saturation, and at the same time, adjust the
maximum value of sat in gains-sat to the increased saturation.
Decrease the value in y_alpha_curve to reduce the color saturation of dark pixels. Note that the
last value must be 1024, otherwise it will affect the color saturation of other brightness in the
image.
Some color adjustments
After the overall color saturation adjustment is completed, the color still does not achieve the
expected effect. You can try the following steps:
(1) When it is necessary to adjust the color to be consistent with human vision, confirm whether
the white balance is correct;
(2) When it is necessary to adjust the color to be consistent with the contrast machine, confirm
whether the white balance is consistent;
(3) When it is necessary to adjust the color to be consistent with the contrast machine, confirm
whether the brightness is close to
(4) If the white balance is confirmed to be consistent or correct and the brightness is close, the
color still does not meet the expectations, then adjust the CCM related parameters to achieve the
goal.
Method:
Look with your eyes, whether the white objects in the video are white;
Snap a picture to see if the R/G/B components of the white block are quite different.
Confirm whether the white balance is consistent with the contrast machine and adjust
(1) If the white balance of the contrast machine is relatively correct, and the white object of RK has
a more obvious color cast, first use the white balance module to make the white balance more
correct;
(2) If the white object of the contrast machine has a more obvious color cast and the white
balance of RK is relatively correct, it is necessary to distinguish whether it is caused by the defect
of the white balance algorithm of the contrast machine or the color preference of the contrast
machine; if the color preference is different, you can First adjust the hue through the white
balance module to make the two consistent, or use tools such as faststone to adjust the hue of
the contrast machine to be the same as that of RK; if it is caused by a defect in the white balance
algorithm of the contrast machine, you can increase the number of white points in the scene and
re-capture the picture. Or use faststone and other tools to adjust the tone of the contrast
machine to be the same as that of RK.
(3) How to distinguish the white objects of the contrast machine, the obvious color cast is caused
by the defect of the white balance algorithm of the contrast machine, or the color preference of
the contrast machine is different
a. If the scene has only white objects and the brightness is appropriate, the white of the contrast
machine is still a color cast, which is most likely because the contrast machine has adjusted the
hue;
(1) Adjust the brightness related modules (ae, gamma, dehaze, hdr) to make the brightness close,
allowing a certain gap
(2) Or use faststone and other tools to adjust the brightness of the contrast machine to be the
same as that of RK
Adjust CCM
Re-calibrate CCM with tools
Find the color block closest to the color in the 24 color card, increase the weight of the color block,
and re-calibrate the CCM.
Case:
In the color difference diagram on the left, the color shift of the 6th/18th color block is relatively
large. For this, the weight of the neutral color block (19th to 24th color block) can be set to 0, the
6th color block is set to 16, and the weight of the neutral color block (19th to 24th color block) is
set to 0. The weight of the 18 color block is set to 8. In addition, in order to reduce the impact of
the above adjustments on other color blocks, the weight of the three primary color blocks (the
13th-15th color blocks) is set to 8, and the weight of the skin color block (the second color block) is
also set to 8, so the result is obtained The color difference diagram is as shown on the right, and
the color cast of the 6th/18th color block is reduced.
Use the RK machine to capture the image and get the RK RGB value
Use the contrast machine to capture the image to obtain the target value, but the brightness and
white balance of the RK need to be close
For example: adjust the B component as the target value, use fatone to subtract 17 from the B
channel, the green shown in the lower right is the expected color,
Compare at this time the green RGB of RK is 64 85 90, and the target is 65 86 69. Then you know
that you need to adjust the CCM to reduce the B component, then the two greens will be close.
Compare the current RGB and target RGB values, and manually adjust the CCM to make the two
RGB close.
In order to ensure that the white balance is not damaged, the parameters must meet the
conditions:
Each channel mainly comes from the color component of the original channel, so the conditions
must be met:
At the same time, try to make the difference of the element value of the main diagonal line as
small as possible, and try to make the elements outside the main diagonal line have negative
values.
If a13 is a positive number, it will cause high saturation red to become purple. If a31 is a positive
number, it will cause high saturation blue to become purple.
When a21 is a negative value, the greater the absolute value, the smaller the G component value
of the red after correction, and the higher the red saturation; a23 is a negative value When the
absolute value is larger, the G component value of the corrected blue is smaller, and the
saturation of the blue is higher.
Blue (red) is slightly purple. When a13 (a31) is positive, the R (B) component needs to be reduced,
and a13 (a31) changed from a positive number close to 0 to a smaller negative number;
Blue (red) is oversaturated, when a23 (a21) is negative, the G component needs to be increased,
and a23 can be reduced a21 absolute value;
Purple is bluish, need to increase R component, increase a13, decrease a11 and a12; or decrease B
component , Decrease a33, increase a31 and a32;
The red is orange, and the G component needs to be reduced, which can reduce a21 and increase
a22;
The skin color is yellowish green. It is necessary to reduce the G component and increase the B
component, which can greatly reduce a22 and increase a23, and fine-tune a21, greatly increase a31
and decrease a32, fine-tune a33.
Use faststone to adjust RGB and found that reducing the G component can improve the orange
problem. At this time, the target RGB value of the red plastic film is [212 63 79].
The red plastic sheet in the red frame is orange, RGB = [212, 78, 80], compared with the target
value [212 63 79], the G component is too large. If you have more experience, you can skip the
step of obtaining faststone and directly adjust the CCM to reduce the G component.
Since the R component value of the red plastic sheet is the largest, the value of a21 needs to be
reduced. In order to meet the constraint that the rows add to 1, the absolute value of a22 needs
to be reduced
the G component, Significantly reduce the absolute value of a22 and a23 de, and fine-tune a21,
Skin tone at the corresponding position at this time:RGB = [212, 169, 124];
In order to increase the B component, because the R and G components have large values, so
significantly reduce the absolute value of and ,and fine-tune
Correction coefficient after adjustment: ;
The skin color at the corresponding position at this time: RGB = [214, 169, 146].
CCM 3DLut
As for which solution to choose, the actual project is directly weighed against the color preference
and transition and noise.
The 3D LUT on RK1109 is 9x9x9, the values not recorded in the table can be obtained by trilinear
interpolation