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
Next revisionBoth sides next revision
isp:hue_rotation [2019/05/09 00:27] Igor Yefmovisp:hue_rotation [2023/09/05 04:53] Igor Yefmov
Line 1: Line 1:
 ====== Hue rotation ====== ====== Hue rotation ======
 +"Hue rotation" is a global (every pixel) shift of the image's color spectrum by a given radial offset (considering the [[https://simple.wikipedia.org/wiki/Color_wheel|color wheel]]).
  
 +To rotate the color vector by an angle \(\Theta\) the following matrix multiplication is done:
 +
 +\[
 +\begin{bmatrix}
 +R \\
 +G \\
 +B
 +\end{bmatrix}
 +\times
 +\begin{bmatrix}
 +cox(\Theta) & sin(\Theta) & 0 \\
 +-sin(\Theta) & cos(\Theta) & 0 \\
 +0 & 0 & 1
 +\end{bmatrix}
 +\]
 +
 +===== In RGB color space =====
 +
 +
 +===== In HSL color space =====
 Really, no magic here, once you process the image in HSL color space. The operation is as trivial as adding or subtracting a specified value from the pixel's \(H\) component: Really, no magic here, once you process the image in HSL color space. The operation is as trivial as adding or subtracting a specified value from the pixel's \(H\) component:
 <code c++>// pseudo-code <code c++>// pseudo-code

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