logoalt Hacker News

quietbritishjimtoday at 10:59 AM1 replyview on HN

> The final piece of the puzzle is gamma correction. Applying gamma correction to these RGB coordinates produces a new set of values which we call (R', G', B') that are related to the original by a transfer function 6 ... The reason this is done is to account for how our eyes perceive brightness nonlinearly. We can distinguish changes in dark shades much more easily than light shades because a linear increase R in has much more of a relative effect when R is small. Switching to (R', G', B') therefore provides more resolution in dark regions of the image where the eye is more sensitive to variations in brightness.

I'm surprised that this isn't mentioned much earlier and much more prominently. Instead, it's practically a footnote.

Maybe I'm mistaken, but I would bet 90% of the awkwardness in the very first image is from averaging these values (R', G', B') for the gradients rather than switching to the true linear values, averaging, then converting back. This classic MinutePhysics video covers it well:

https://www.youtube.com/watch?v=LKnqECcg6Gw


Replies

crazygringotoday at 3:13 PM

Probably the biggest distortion in the first image comes from ignoring output brightness:

https://news.ycombinator.com/item?id=47047866

Next I'd guess is correctly mapping wavelength to raw RGB ratios, and then third would probably be gamma.

Since that would be the "good enough" approach for most people, I wish a could see a comparison of that with the author's CIE-based results.