Hacker News new | ask | show | jobs
by rsp1984 1278 days ago
Fair enough. In our testing we couldn't get it to compression ratios lower than ~90% on the kind of images we tested (low quality webcam-type sensors, sub-VGA resolution), while it achieved very impressive compression ratios on the demo images, so I assumed a selection was made. Perhaps it's just works really well for certain kinds of images and doesn't for others.
2 comments

Low quality sensor photographs are all but impossible to compress because they're filled with compressions worst nightmare: random noise.

Lossless compression of random noise isn't possible and lossy compression of it requires content aware algorithms (e.g. AI) to get results.

Even if you don't readily see the random noise, it's there. Subtly changing the hues of pixels just slightly enough to be incompressible.

And the frustrating thing is that the “noise” is actually information; it tells you something about the capture device and encoding toolchain. It’s just an incredibly inefficient way to encode “this was captured on a cheap image sensor on a severely memory constrained device”
While you can't compress the random noise itself, it's often easy to still get decent compression of the whole image, depending on how serious the noise is.

Imagine an image with large blocks of constant colour in 8-bit colour depth has 2 bits of random noise on every pixel. We indeed can't ever compress to less than 2 bits per pixel, but we can still get down to that.

They might be impossible to compress using RLE-based mechanisms, but the theoretical possibility is there. The noise range for the pixels is not 0-255, so the image has less entropy than a fuly random one and thus should be compressable.

I am imagining something like a "base layer" with averaged brightness + arithmetic coding for differences might do it.

These sorts of images do compress quite ok though (pun intended) with PNG.
QOI will be pretty bad with exceptionally noisy images. that said, if you denoise first, you aren't degrading image quality.