5 ms·
It may be off topic... but, does anyone know how this compares to Lossy WebP compression used by Google Photos?
by kroll 3y ago
It may be off topic... but, does anyone know how this compares to Lossy WebP compression used by Google Photos?
- teruakohatu 3y agoSVD is not going to compare with state of the art compression, but it has many uses and is very simple to implement.
- gfody 3y agosvd is not as good as dct for compression, but it's a good explainer setup
- derf_ 3y agoThe author talks about JPEG, and says the principle is surprisingly similar, but the connection between the two is actually pretty direct. I will link a previous comment of mine from another discussion of SVD image compression to explain: https://news.ycombinator.com/item?id=34732922 https://news.ycombinator.com/item?id=34732922 To go from JPEG to lossy WebP (really, VP8 intra frames), the main differences are (a) using smaller (4x4) transform blocks instead of 8x8, (b) noticing that if you take just the first coefficient in each block, it looks like a lower resolution of the original image, and applying another 4x4 transform to those coefficients, (c) adding more sophisticated prediction between blocks (e.g., subtract the pixel on the right edge of the previous block from all the pixels in the same row of the current block before transforming them, or something similar to predict in other directions), (d) filtering along block edges to reduce blocking artifacts (many JPEG decoders do this, but WebP/VP8 make it a mandatory part of the standard), and (e) using arithmetic coding instead of Huffman coding. There are of course other minor differences in the details. But the main mechanism that underlies both is a transform that can be derived from the SVD if one assumes a simple statistical model of natural image data.
- peter_d_sherman 3y agoHi derf_! Those are some very interesting comments! I'd be interested (and this is purely "academic" curiousity) IF there was: Something mathematical -- which would underly all image compression algorithms; that is, if all image compression algorithms could be shown ("proven" I guess -- I am not a professional Mathematician, only armchair, so bear with me!) to belong to a specific class of generalized compression algorithms or (ideally!) a single "parent" (for lack of a better word) image compression algorithm -- that would give rise to all other image compression algorithms, no matter how diverse or not mathematically related they would all seem... The use of Matrices (which model systems of linear equations, which in turn, enumerate/list/make clear/table -- relationships between factors in those equations) -- would seems to be a good starting point for this Mathematical inquiry, should it be made... Maybe I should phrase this a little bit better... Maybe it's something like (as a future goal for the Mathematicians of the world), "for every image compression algorithm X, show/prove that X is related to <parent Mathematical principle involving matrices>"... Or something like that... Sort of like a grand unifying theory of image compression... Anyway, your comments are highly interesting. It seems like you might be part of the way there for something like a rigorously mathematically unified (and proven!) future understanding of image compression!
- wiml 3y agoI don't think that it's truly universal, but quite a few image compression schemes have a similar structure if you stand back and squint: 1. Use a reversible linear transform to transform the image into some other space. (It'll still require the same amount of data to represent) 2. Throw away a bunch of the values (set them to zero, or round them to low precision, etc) 3. Now that there are some repetitive zeroes or whatever, a conventional data compression algorithm (like LZW, Huffman, or interval/arithmetic) can make it smaller Even simple things like resizing an image smaller can be fit into this framework: step 1 is a simple blur, step 2 sets a bunch of pixels to zero, step 3 discards them. (I don't think fractal compression can be fit into this framework, but I could be wrong. That's the only exception I can think of offhand.)
- vitus 3y agoBroadly, the entire space of (lossy, lossless) compression falls under the purview of information theory, which tells us that almost all [0] encoding schemes with sufficient codebook entropy can achieve the desired capacity / compression subject to constraints on distortion. Unfortunately, this isn't directly useful since the proof is nonconstructive, but it suggests (to me, at least) that there is an infinitude of compression schemes that don't have to have any common given structure. The special thing that image compression gets to rely on is that human vision is inherently lossy, so we can crush color spaces, or throw away tiny details, or even clone regions wholesale (JBIG2, anyone?). And unless you're looking very closely, you probably won't notice a thing. [0] See: typical sets. https://en.wikipedia.org/wiki/Typical_set https://en.wikipedia.org/wiki/Typical_set
- derf_ 3y ago> (I don't think fractal compression can be fit into this framework, but I could be wrong. That's the only exception I can think of offhand.) See https://ieeexplore.ieee.org/abstract/document/660992 https://ieeexplore.ieee.org/abstract/document/660992 for the connection between fractal image coding and wavelets + vector quantization.
- peter_d_sherman 3y ago
- deleted 3y ago[deleted]