4 ms·
I don't know why, but gamma is one of the most confusing topics in all of image processing. Most software screws it up, and I'm not surprised at the results sho
by petewarden 17y ago
I don't know why, but gamma is one of the most confusing topics in all of image processing. Most software screws it up, and I'm not surprised at the results shown. Unfortunately while I applaud the awareness-raising, the explanation here left my head spinning, despite writing code for one of the apps he highlights as doing it right! If you're in the same boat, I'd recommend Poynton's Gamma FAQ:
http://www.poynton.com/GammaFAQ.html http://www.poynton.com/GammaFAQ.html
- DarkShikari 17y agothe explanation here left my head spinning Then here's a simpler explanation: We need to blend pixel values X and Y. Normal image-scaling algorithms perform the operation (X+Y)/2, because this is fast. However, the correct operation is ToNonLinear((ToLinear(X)+ToLinear(Y))/2), because X and Y represent a nonlinear scale, similar to how adding a 60db and 60db sound doesn't result in a 120db sound.
- petewarden 17y agoThe approach that helped me is thinking in photons. 50% in pixel values is only 25% of the photons that 100% in pixel values represents (approximately). Linear light measures just means converting to photons before you do any operations, and then converting them back to the encoding. I almost wish gamma was a more obvious encoding process, like gzipping a file, rather than a simple function. That would save a lot of conceptual pain.