Live data from Hacker News

Image Compression with Singular Value Decomposition

timbaumann.info

41–47 of 47 posts

Re: Image Compression with Singular Value Decomposition

#41
post #16

Earlier quoted context omitted.

Especially if YCbCr is a linear transform of the RGB. (I'm not sure if it is, but it's likely to be close). If it is, it's essentially just making eigenvectors from a matrix with a different set of bases.

> is a linear transform of the RGB It is for every implementation I've seen. I have it defined both ways as 4x4 matrices in my code (3x3 is not in System.Numerics).

It appears to be a linear transform from "gamma-adjusted" RGB. So probably not straight from sRGB. [1]

The article does not mention it, but I assume it just takes sRGB color components.

[1] https://en.wikipedia.org/wiki/YCbCr#R'G'B'_to_Y'PbPr

Re: Image Compression with Singular Value Decomposition

#42

Have you done any PSNR analysis & comparison to prevailing standards like webp (or even jpeg)? from the look of it, it seems not very efficient as the compression ratio gets pretty bad for any kind of visually comparable scenarios.

It's quite crappy, to be honest. Even a simple 4x4 block-based BC7 texture compression (1:4 ratio in ARGB) beats this, hands down.

Re: Image Compression with Singular Value Decomposition

#44
post #21

I worked on a very interesting project aligning point clouds using SVD, for a pair of point clouds of the same scene that are not aligned: - select 3+ pairs of matching points in each cloud (tops of trees, edges of a building etc) - calculate the vector to the centroid of each cloud - use SVD to calculate the rotation that gives a minimum distance when applied from the source to the target - translate and rotate the…

[deleted]

Re: Image Compression with Singular Value Decomposition

#45

Earlier quoted context omitted.

SVD is used more for mathematical elegance than practicality (like ordinary least squares) In data science most traditional usecases for SVD are superceded by other algorithms (UMAP is especially popular these days).

There are loads of numerical algorithms where the SVD is the tool of choice because of its particular optimality properties.

Right, like OLS.

Don't get me wrong -- they're great tools. Especially OLS for analysis has this whole framework for understanding errors you will not get in models fit using maximum likelihood methods.

But as a final usecase for a product there's generally better out there.

Re: Image Compression with Singular Value Decomposition

#46

Earlier quoted context omitted.

There are loads of numerical algorithms where the SVD is the tool of choice because of its particular optimality properties.

Right, like OLS. Don't get me wrong -- they're great tools. Especially OLS for analysis has this whole framework for understanding errors you will not get in models fit using maximum likelihood methods. But as a final usecase for a product there's generally better out there.

I think you're mainly thinking of machine learning and data science applications, and so your perspective may be a bit limited. But, of course, you didn't actually give any explanation of what you mean other than mentioning ordinary least squares. Would you like to elaborate and back your point up?

In computational science and engineering, there are many applications in which the SVD is a very reasonable and good choice. Some examples: fast direct solvers for integral equations, model order reduction, solving inverse problems, etc.

Re: Image Compression with Singular Value Decomposition

#47
post #40

Basically this expresses the image as an image where each row is a linear combination of a set of K rows, with different coefficients for each row (or equivalently for columns). In general it doesn't make sense to compress images this way, since the algorithm is not invariant with respect to 2D image rotation, a very relevant operation for realistic images, but is invariant with respect to row/column permutations, wh…

I wonder if it's possible to exploit 2d structure of images more efficiently with this algorithm? Perhaps remapping pixel coordinates somehow..
Post reply on HN