News for hackers. Stuff that matters.
Re:Pillow-SIMD – Fast, production-ready image resize for x86 by pishpash on Thursday July 06, 2017 @05:21PM (#14714068)
For that matter, the conversion should be to CIELAB, which is perceptually uniform.
Re:Pillow-SIMD – Fast, production-ready image resize for x86 by lcrs on Thursday July 06, 2017 @06:36PM (#14714523)
Perceptual uniformity is in some ways opposite to the linearization suggested above - the L* component of CIELAB is much more like the gamma-encoded values of sRGB than a linear light measure.

It seems tough to come up with hard and fast rules for whether to mimic the linear physical processes, or work in a perceptual space more like the human visual system. I'd love to hear about more rigorous work in this area - most things I read have boiled down to "this way works better on these images".

It's interesting for example that using Sinc-type filters to resize truly linear data, like that from HDR cameras, usually gives rise to horrible dark haloing artifacts around small specular highlights, despite that being the most "physically correct" way to do it. Doing the same operation in a more perceptual space immediately sorts out the problem.

Re:Pillow-SIMD – Fast, production-ready image resize for x86 by pornel on Thursday July 06, 2017 @06:22PM (#14714431)
No, it shouldn't be done in perceptually uniform color space. LAB, like sRGB, is non-linear.

Resampling simulates physical properties of the light, not subjective perception of the eye.

Re:Pillow-SIMD – Fast, production-ready image resize for x86 by jacobolus on Friday July 07, 2017 @02:15AM (#14716446)
Resampling in CIELAB space tends to work better than resampling in gamma-adjusted R′G′B′ space, because at least you never end up averaging two pixels and getting a lightness which is outside the range of input lightnesses, which is what causes the worst artifacts in R′G′B′. A linear space will give a better result, but CIELAB results are usually acceptable.