SVDCompress.java5.95 KB

This is an implementation of image compression in Java using the singular value decomposition. Basically, the idea is to take a very high-dimensional (high-rank) source image and approximate it by a much lower-dimensional (low-rank) image. So the higher dimensions are considered noise, roughly speaking. It's somewhat impressive that you can take this sort of 450-dimensional object, project it down into thirteen dimensions (second from the bottom), and still have something vaguely recognizable. Watch the animation!

Rank: 450

Storage: 135,000
Compression: 1:1
Murphy Input

Rank: 300

Storage: 270,300
Compression: 0.499:1
Murphy Output (300)

Rank: 120

Storage: 108,120
Compression: 1.25:1
Murphy Output (120)

Rank: 56

Storage: 50,456
Compression: 2.68:1
Murphy Output (56)

Rank: 25

Storage: 22,525
Compression: 5.99:1
Murphy Output (25)

Rank: 13

Storage: 11,713
Compression: 11.5:1
Murphy Output (13)

Rank: 6

Storage: 5,406
Compression: 24.9:1
Murphy Output (6)