You are on page 1of 2
ms (gaa Image Compre: transformed using SVD, iti eerie hen an image is It 1S not compressed, but the data take: i pata 3 f i sioglat value has a great amount of the image information. This implies that few as ar al rs orepresent the image with little differences from the original image, a ‘When SVD is applied to the input image 4, it can be written as — T . A=UDV? = Sou" (4.97) ial ‘Thus the input image A can be represented by the outer product expansion AX OVE TQM QVE Fever OVE (4.98) When compressing the image, the sum is not performed to the very last singular values, and the singular ‘ales with smaller values are dropped. After truncating the smaller singular values, the reconstructed image using the first k larger singular values is given by Ay = 07h $021 :VF + ee FOYE (4.99) ‘The total storage for the reconstructed image A, is k(m + » + 1), The integer k can be chosen to be less than n,and the digital image corresponding to A,still will be closer to the original image One of the performance measures of image compression is compression ratio. The compression ratio \wing SVD is given below: mxn (4.100) ression ratio = ——™*" _ Comp Kntn+)) Scanned with CamScanner MATLAB Example 2 Read ange and perform singular value decomposition. Ratan ony largest singular values and reconstruct the image. The value k should be user-specific. Observe tha quality of the reconstructed image with change in the value of k. Also, compute the Comp 2 ratio. ‘SSS SI x yi Solution The MATLAB code to perform the specified task is shown in Fig. 431. From the code, it is obvious that only (singular) values are retained to get the reconstructed image, f kare given below: The reconstructed images for different values © the visual quality of the reconstrujs From Fig. 4.32, it is clear that as the value of & increases, v image approaches the original image. At the same time, the compression ratio decreases as the value of; fferent values of k are given in Table 4.6. increases. The compression ratio obtained for di Maton iii acs fel ine Pas 5s | Edit Text Cell Tools Debug Desktop window Help SE tmao Oar aao ¢Hatlab code to perform SVD based image compression ele clear all close all a=double(imread('tlover.jpg'))+ {m n] =size (a)? b=zeros (size (a))+ [u a vy) =svd (a)? keinput (‘Enter the value of for j=1:k p=bta(3,5) #a(2,3) VCE, 3) end b=floor (b) = imshov {uints (b)) compratio=m*n/ (k* (mtnt+1)} st FOWDD YAH BONE < Scanned with CamScanner

You might also like