4 ms·
I never really understood how image compression works but now I feel a bit closer. Cool project!
by willcipriano 5y ago
I never really understood how image compression works but now I feel a bit closer. Cool project!
- rob74 5y agoJust to be nitpicky: JPEG is only one form of lossy image compression. Lossless algorithms are completely different. MPEG & co are based on something similar like JPEG. Apparently WEBP (the lossy format that has been gaining some traction in the last years) also uses DCT (or a Walsh–Hadamard transform) for its blocks, but with some additional "tricks" like block prediction.
- tialaramex 5y agoRight. The lossless algorithms are mostly related to general insights for efficiently storing common patterns of data, plus some component of figuring out how to express image data in a way that makes it most suitable for that existing "common pattern" compression. This begins with Run Length Encoding, the insight that we can store 8 times Z rather than "ZZZZZZZZ" if we're careful to do so unambiguously. In contrast the lossy algorithms are about specifically what humans don't see well or don't care about. For example in vision humans don't see colours with the same accuracy as brightness because of how their vision works. When it comes to moving images, humans don't see as much detail at all when things are moving so you can blur them and humans barely notice. Humans care a lot about the details of human-like faces, and scarcely at all about grass or water. In audio humans can't really hear certain frequency combinations, so the quieter frequencies can sometimes just be omitted.
- deleted 5y ago[deleted]