Hacker News new | ask | show | jobs
by jakubw 5238 days ago
Would it make sense to include the error image in the format to make the compression lossless? As I see it, if the final fitness is high enough, the error image should be highly compressible?
2 comments

I have looked to see what existing research there is on doing that but found very little. Obviously the error image is compressible, it has patterns in it that are visible, and it is predominantly greyish. Those are aspects that can be exploited.

Of course the error image will be much larger than the compressed image, but you have moved to the field of lossless compression so the bar is at a different level.

Algorithms designed to compress error maps should work on a different set of assumptions to plain lossless image compression. Error images are noisy but have an overall low magnitude.

I do wonder if there could be a entire field in collaborative image compression where multiple techniques can layer to try and achieve a better result. Algorithms would take an existing image and try and move it closer to the target while using as few bits as possible.

No. The error image just contains "the hard stuff".
That's not really true. The residuals of a good lossy compression algorithm ought to look like uncorrelated noise with a smaller dynamic range than the original image, and the second fact (smaller dynamic range) makes them compressible.
Dynamic range is not really relevant to compression. Entropy is much more meaningful, and error images typically have a huge amount of entropy.
That doesn't make any sense. You've taken an image with arbitrary bytes, and turned it into one where the bytes are tightly centered around a small range of values.That's perfect for Golomb coding (for instance.)
No free lunches. For a lossless compressor, (Information theory bits of polygons) + (Information theory bits of remaining error) >= (Information theory bits of original image), where the > represents the possibility that the first two elements aren't perfectly separated by your process or have inescapable overlap.

I specify "information theory bits" because they aren't really what you see in the computer's RAM; they're closer to "post-compression bits". But regardless, no matter how you move the encoding around there is no escaping information theory.

Obviously. That's the definition of compression. If the image is well modeled by overlapping polygons + small residuals, the encoding will better approach the uncomputable ideal, and thus, compress.