User Tools

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
isp:hue_rotation [2023/09/06 10:21] – [In RGB color space] Igor Yefmovisp:hue_rotation [2023/09/11 07:56] – [In RGB color space] Igor Yefmov
Line 4: Line 4:
 ===== In RGB color space ===== ===== In RGB color space =====
  
-To rotate the color vector by an angle \(\Theta\) the following matrix multiplication is done:+To rotate the color vector by an angle \(\Theta\) is to rotate the RGB cube around the \((0,0,0)-(1,1,)\) diagonal axis, for which the [[https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle|rotation matrix]] looks like the following:
  
 \[ \[
 +cos_1 = cos(\Theta) \\
 +cos_2 = \frac{1 - cos_1}{3} \\
 +sin_1 = sin(\Theta)\sqrt{1/3} \\
 +
 \begin{bmatrix} \begin{bmatrix}
-R \\ +cos_1 + cos_2 cos_2 - sin_1 cos_2 + sin_1 \\ 
-G \\ +cos_2 + sin_1 cos_1 + cos_2 cos_2 - sin_1 \\ 
-+cos_2 - sin_1 cos_2 + sin_1 cos_1 + cos_2
-\end{bmatrix} +
-\times +
-\begin{bmatrix} +
-cox(\Theta) sin(\Theta) \\ +
--sin(\Theta) cos(\Theta) \\ +
-1+
 \end{bmatrix} \end{bmatrix}
 \] \]

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