User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
isp:ccm [2021/01/27 23:40] Igor Yefmovisp:ccm [2022/04/04 23:32] – external edit 127.0.0.1
Line 10: Line 10:
  
 ===== CCM ===== ===== CCM =====
-Color Correction Matrix is often used as an "add-on" matrix during YUV->RGB conversion. In our case, since the de-bayering and RGB->YUV conversions happen literally on opposite sides of the imaging pipeline, we only use the portion of the corrections designed to compensate for the sensor's cross-talk, converting post-debayer values \(R_0, G_0, B_0\) into \(R, G, B\). Note that the ordering of chroma components is \(BGR\):+Color Correction Matrix is often used as an "add-on" matrix during YUV->RGB conversion. In our case, since the de-bayering and RGB->YUV conversions happen literally on opposite sides of the imaging pipeline, we only use the portion of the corrections designed to compensate for the sensor's cross-talk, converting post-debayer values \(R_0, G_0, B_0\) into \(R, G, B\):
  
 \[ \[
- \begin{bmatrix} & G & R\end{bmatrix}+ \begin{bmatrix} & G & B\end{bmatrix}
  =  =
  \begin{bmatrix}  \begin{bmatrix}
Line 22: Line 22:
  \cdot  \cdot
  \begin{bmatrix}  \begin{bmatrix}
- B_0 \\+ R_0 \\
  G_0 \\  G_0 \\
- R_0+ B_0
  \end{bmatrix}  \end{bmatrix}
 \] \]
  
 +Regular linear algebra rules apply, of course. The calculation itself (once expanded) looks like this:
 +
 +\[
 +R = CCM_{00} * R_0 + CCM_{01} * G_0 + CCM_{02} * B_0 \\
 +G = CCM_{10} * R_0 + CCM_{11} * G_0 + CCM_{12} * B_0 \\
 +B = CCM_{20} * R_0 + CCM_{21} * G_0 + CCM_{22} * B_0
 +\]
 ===== 3x3 -> 4x4 ===== ===== 3x3 -> 4x4 =====
 Industry papers on CCM use a \(3\times3\) matrix yet we tried to do a full \(4\times4\) so there was a need to find a way to convert from one to another (and also from an RGGB into BGGR ordering). Here's an [[https://math.stackexchange.com/questions/3957955/ccm-3x3-into-4x4-image-processing|article on Math StackExchange]] on that subject. Industry papers on CCM use a \(3\times3\) matrix yet we tried to do a full \(4\times4\) so there was a need to find a way to convert from one to another (and also from an RGGB into BGGR ordering). Here's an [[https://math.stackexchange.com/questions/3957955/ccm-3x3-into-4x4-image-processing|article on Math StackExchange]] on that subject.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information