Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
isp:contrast [2023/09/05 05:01] – Igor Yefmov | isp:contrast [2023/09/10 21:51] – [In RGB color space] Igor Yefmov | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== In RGB color space ===== | ===== In RGB color space ===== | ||
+ | |||
+ | Each component' | ||
+ | |||
+ | \[ | ||
+ | component = (component' | ||
+ | component' | ||
+ | contrast \in ]0..2.0]%% | ||
+ | \] | ||
+ | |||
+ | |||
+ | ==== Integer arithmetic ==== | ||
+ | Of course, much like in [[isp:: | ||
+ | |||
+ | \[ | ||
+ | \frac{ | ||
+ | \left(\begin{bmatrix} | ||
+ | R \\ | ||
+ | G \\ | ||
+ | B | ||
+ | \end{bmatrix} | ||
+ | - | ||
+ | \begin{bmatrix} | ||
+ | 2047 \\ | ||
+ | 2047 \\ | ||
+ | 2047 | ||
+ | \end{bmatrix} \right) | ||
+ | \begin{bmatrix} | ||
+ | 47394 & 0 & 0 \\ | ||
+ | 0 & 536358 & 0 \\ | ||
+ | 0 & 0 & 5466 | ||
+ | \end{bmatrix} \times contrast^2 | ||
+ | }{1024*1024*1024*1024} + | ||
+ | \begin{bmatrix} | ||
+ | 2047 \\ | ||
+ | 2047 \\ | ||
+ | 2047 | ||
+ | \end{bmatrix} | ||
+ | \] | ||
===== In HSL color space ===== | ===== In HSL color space ===== |