Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
isp:contrast [2019/05/09 00:29] – Igor Yefmov | isp:contrast [2019/07/13 15:17] – Igor Yefmov | ||
---|---|---|---|
Line 10: | Line 10: | ||
Assuming the \(L\) component to be in range \([0..100]%%\) the contrast adjustment looks like this: | Assuming the \(L\) component to be in range \([0..100]%%\) the contrast adjustment looks like this: | ||
\[ | \[ | ||
- | luma = (luma - 50) * contrast + 50 \\ | + | luma = (luma - 50) * contrast^2 + 50 \\ |
luma \in [0..100]%% | luma \in [0..100]%% | ||
\] | \] | ||
Line 16: | Line 16: | ||
void contrast(/ | void contrast(/ | ||
for(const & pixel: image){ | for(const & pixel: image){ | ||
- | pixel.luma = std:: | + | pixel.luma = std:: |
} | } | ||
}</ | }</ | ||