3 ms·
Part of the issue is that people have been trained by two decades of Photoshop and expect the results of the 8-bit algorithms. Gaussian blur for example looks v
by petewarden 17y ago
Part of the issue is that people have been trained by two decades of Photoshop and expect the results of the 8-bit algorithms. Gaussian blur for example looks very different in linear light, with light areas of the image blooming out over the darker. If you've spent years working with the 8 bit gamma space algorithms, that's a bug. Instead, I've ended up implementing both algorithms, usually with the more correct one labeled as 'defocus' or 'camera blur'.
Rescaling and in general resampling is a lot simpler. These days it's pretty inexcusable not to do it in linear space. Here's my own exploration of that problem from a couple of years back:
http://petewarden.typepad.com/searchbrowser/2008/08/why-fonts-need.html http://petewarden.typepad.com/searchbrowser/2008/08/why-font...
- jacobolus 17y agoBecause human visual response is non-linear, doing operations like gaussian blur (which is an artificial operation, unrelated to physical phenomena) in linear light space isn’t “more correct” in any absolute sense. Calling a gaussian blur “camera blur” or “defocus” (whatever the color space) is just inaccurate and confusing. Compositing and interpolating should definitely be done in linear space though.
- petewarden 17y ago> Calling a gaussian blur “camera blur” or “defocus” (whatever the color space) is just inaccurate and confusing. Nonsense. When you defocus a camera, you get an effect that's comparable with a gaussian blur performed in linear space. Blurring is a well-understood operation that's existed for a long time in the analog world, before we ever did any digital processing.
- jacobolus 17y agoWell, “comparable” insofar as you don’t care about the details, I suppose; you could also call a square or triangle blur kernel “defocus” if you wanted. A real lens blur doesn’t look much like a gaussian blur for someone who is familiar with both and paying attention. For explanation, see for instance http://en.wikipedia.org/wiki/Bokeh http://en.wikipedia.org/wiki/Bokeh
- petewarden 17y agoYep, my 'camera defocus' also included arbitrary kernel geometry as an option! I'm not trying to be obnoxious about this, but I really did spend five years of my life coding this stuff for Apple.
- scythe 17y ago>human visual response is non-linear Human visual response to color is also nonlocal, which has an array of interesting effects.