CG:Skeelogy
FEATURED
ARCHIVES
 
 
CURRENTLY VIEWING
SVD IMAGE COMPRESSION
Image compression using Singular Value Decomposition
DATE
TYPE
EFFORT
Sep 2007
Image Compression
Individual
SVD Image Compression
@ programming > computer vision
SECTION MENU

This is a simple MATLAB script which uses Singular Value Decomposition (SVD) to compress images. SVD can be used to provide the best lower-rank approximation to a matrix M, and thus be used for image compression. The idea is to use only the first k singular values/vectors of M so they form a lower-ranked matrix which is a good approximation to the original matrix M. This is usually fine because the lower singular values/vectors are small and can be sacrificed to reduce amount of data needed for representation. For a m x n matrix, we can actually store only (m+n+1 n)*k numbers which can be much smaller than the original mn numbers.

As can be seen below, the SVD compression brings about little visible loss in quality when suitable values of k are chosen..

2D morphing from cat to dog (and back)
Compression with k = 20 produces small file but has visible artifacts

2D morphing from cat to dog (and back)
Compression with k = 100 produces a compressed file without much visible artifacts

It is possible to choose k such that the “compressed image” ends up with a larger file size, which defeats the purpose of this technique. This implies that k must be chosen with k with care.


 
ABOUT ME
Skeel Lee Skeel Lee
skeel@skeelogy.com
Facebook Google+ Twitter Tumblr
YouTube Vimeo Flickr Pinterest
Worked at Wētā FX, Digital Domain 3.0, Sony Pictures Imageworks, MPC, Industrial Light & Magic (ILM), Double Negative
LinkedIn IMDb GitHub Stack Overflow
I am a Technical Director with strong interests in both tech and art. My life evolves round VFX, photography, software engineering, tools programming and generally anything that looks / sounds cool.
I have done a variety of CG programming, including fluid sims, muscles, soft/rigid bodies, raytracing etc. These knowledge complement the visual works that I do as a TD in VFX.
I was interviewed by The Straits Times in May 2014 for my VFX work in X-Men: Days of Future Past.