Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Compression by Singular Value Decomposition Presented by Annie Johnson MTH421 - Dr. Rebaza May 9, 2007.

Similar presentations


Presentation on theme: "Image Compression by Singular Value Decomposition Presented by Annie Johnson MTH421 - Dr. Rebaza May 9, 2007."— Presentation transcript:

1 Image Compression by Singular Value Decomposition Presented by Annie Johnson MTH421 - Dr. Rebaza May 9, 2007

2 The Quandary Storing/sharing high resolution digital images comes at a cost Obviously, the larger the file(s), more memory is needed to share/accept/store such file(s) Web sites on the internet are generally made up of many pictures – systems can become completely clogged with the storage/transmission of images This can lead to spending a lot of time online (slow speed) You need capable machinery

3 Resolution to the Quandary Using Singular Value Decomposition for image compression is a very useful tool: With SVD, we can reduce the sizes of image matrices By transforming the original matrices into U Σ V T –Then, using the rank of a matrix, we can remove redundant information –Which leads to us approximating the matrix by using fewer entries In turn, we get images indistinguishable from their original images - only using a percentage of the original storage space

4 The Idea Summarized So to summarize, what we are doing is applying SVD to images and then extracting "enough" information from the images to recreate images that are "close" to their originals. Based on the level of detail that is needed in an image, we can choose to store more or less bytes in the compressed file.

5 Details of How it Works Suppose we have a grayscale image (126x128 pixels) –We can use a matrix to represent this image Each component is represented by a 0-255 Write it as a 126X128 matrix A –Next, we can decompose A by SVD which gives us A= U Σ V T –U is 126x126, Σ is 126X128, and V is 128x128 –columns of U= are eigenvectors of AA T –diagonal entries of ∑= the normalized singular values (√ λ for A T A) –columns of V= are eigenvectors of A T A –U and V are orthogonal matrices

6 Details of How it Works Cont. –SVD, singular values = rank(A) –Furthermore, the matrix A can also be written as a sum of rank 1 matrices A = σ 1 u 1 v T 1 + σ 2 u 2 v T 2 +…+ σ n u n v T n –each rank 1 matrix u k v T k is the size of the original matrix. Each one of these matrices is a called a mode. –Since the singular values σ i are ordered as σ 1 ≥ σ 2 ≥…≥ σ n ≥ 0, significant compression of the image is possible if the spectrum of singular values has only a few very strong entries.

7 Details of How it Works Cont. –By eliminating small singular values, we can approximate A –We can therefore reconstruct the image from just a subset of modes.

8 Examples Now for some Matlab examples demonstrating the image compression application of SVD. Command [U,S,V]=svd(A) factors A in Matlab The first example I will show you, displays side-by-side an original gray-scale image and a sequence of increasingly better approximations The second example prompts for the number of singular values to use in the compression. Then it displays the original image in figure 1, compressed image in figure 2, and outputs the number of entries in original and compressed images, and the compression factor.

9 Space Saved How much space is this process saving? Given an image with a x b pixels: r + r(a) + r(b) = size, where r = singular values = rank 8 + 8(126) + 8(128) = 2040 20 + 20(126) + 20(128) = 5100 (~31.6%) 50 + 50(126) + 50(128) = 12750 (~79.0%) Original size: (126)*(128) = 16128

10 Cost of SVD and Conclusion When some of the values are discarded an image loses clarity, but this loss in precision is made up for by the reduction in space needed to store the image. Obviously, this can be applied to color images as well As you have seen, SVD is a powerful tool. Image compression is just one application.

11 References Abrahamsen and Richards, Image Compression Using Singular Value Decomposition, December 14, 2001 Bardsley, Lossy Compression using SVD Arnold, An Investigation into using Singular Value Decomposition as a method of Image Compression, September 2000 Buhr and White, Digital Image Compression via Singular Value Decomposition, May 3, 2006


Download ppt "Image Compression by Singular Value Decomposition Presented by Annie Johnson MTH421 - Dr. Rebaza May 9, 2007."

Similar presentations


Ads by Google