Live data from Hacker News

Show HN: Trigrad, a novel image compression with interesting results

ruarai.github.io

1–10 of 69 posts

Re: Show HN: Trigrad, a novel image compression with interesting results

#3
post #2

How does the speed compare to other compression algorithms?

Currently compressing the example image (the one of the flowers) with 100,000 samples takes 1.5 seconds + 1.5 seconds for AForge's edge detection.

I'm sure this could be increased by a huge amount if I had a not-terrible CPU or if I did some major refactors to use the GPU.

Re: Show HN: Trigrad, a novel image compression with interesting results

#5
post #3
post #2

How does the speed compare to other compression algorithms?

Currently compressing the example image (the one of the flowers) with 100,000 samples takes 1.5 seconds + 1.5 seconds for AForge's edge detection. I'm sure this could be increased by a huge amount if I had a not-terrible CPU or if I did some major refactors to use the GPU.

How does it compare in quality/size vs PNG ? How about using examples where JPG are traditionally bad at, such as pictures with dark gradients leading to blocky artifacts? Would that process be more efficient there?

Re: Show HN: Trigrad, a novel image compression with interesting results

#6
post #5
post #3

Earlier quoted context omitted.

Currently compressing the example image (the one of the flowers) with 100,000 samples takes 1.5 seconds + 1.5 seconds for AForge's edge detection. I'm sure this could be increased by a huge amount if I had a not-terrible CPU or if I did some major refactors to use the GPU.

How does it compare in quality/size vs PNG ? How about using examples where JPG are traditionally bad at, such as pictures with dark gradients leading to blocky artifacts? Would that process be more efficient there?

PNG is lossless, so I don't get the quality comparison.

I don't think this approach can compete with JPEG and newer transform based variants for natural photos (event at edge cases), but seems like it would be nice for lossy compression of logos/general internet pics.

Re: Show HN: Trigrad, a novel image compression with interesting results

#8
post #5

Earlier quoted context omitted.

How does it compare in quality/size vs PNG ? How about using examples where JPG are traditionally bad at, such as pictures with dark gradients leading to blocky artifacts? Would that process be more efficient there?

PNG is lossless, so I don't get the quality comparison. I don't think this approach can compete with JPEG and newer transform based variants for natural photos (event at edge cases), but seems like it would be nice for lossy compression of logos/general internet pics.

> PNG is lossless, so I don't get the quality comparison.

The point is, is that technique in between JPEG and PNG in terms of quality/size or is it worse than JPEG altogether ?

Re: Show HN: Trigrad, a novel image compression with interesting results

#9
post #5
post #3

Earlier quoted context omitted.

Currently compressing the example image (the one of the flowers) with 100,000 samples takes 1.5 seconds + 1.5 seconds for AForge's edge detection. I'm sure this could be increased by a huge amount if I had a not-terrible CPU or if I did some major refactors to use the GPU.

How does it compare in quality/size vs PNG ? How about using examples where JPG are traditionally bad at, such as pictures with dark gradients leading to blocky artifacts? Would that process be more efficient there?

It's not very comparable to PNG, since they're designed for different types of imagery. I know currently Trigrad cannot handle text at all. In regards to your other comment, it's currently definitely worse than JPEG for vector imagery.

However, it handles gradients amazingly. A full colour gradient such as [0] can be made a tenth of the size since only ~500 samples are really needed.

[0] http://i.imgur.com/QzW0z2O.png

Re: Show HN: Trigrad, a novel image compression with interesting results

#10
Garland and Heckbert had a nice algorithm for this sort of thing in their 1995 paper, "Fast Polygonal Approximation of Terrains and Height Fields." The paper is mainly devoted to height fields, obviously, but at the end they demonstrate that their algorithm is also effective at triangulating color images for Gouraud-shading as well.

I'd be curious to know how this stacks up in terms of speed and quality.

EDIT: Oh yes, and there's also "Image Compression Using Data-Dependent Triangulations" and "Survey of Techniques for Data-dependent Triangulations Approximating Color Images", both by Lehner et al., 2007. I don't mean to discourage you here, just pointing out the bar to be beaten. It's a cool idea.

Post reply on HN