SVD
SVD
SVD
Abstract Computer technology these days is most focused on storage space and speed. Considerable advancements in this direction can be achieved through the usage of digital image compression techniques. In this paper, well studied singular value decomposition based JPEG Image Compression Technique is presented. Singular Value Decomposition is a way of factorizing matrices into a series of linear approximations that expose the underlying structure of the matrix. SVD is extraordinarily useful and has many applications such as data analysis, signal processing, pattern recognition, objects detection and weather prediction. An attempt is made to implement this method of factorization to perform second round of compression on JPEG images to optimize storage space. Compression is further enhanced by the removal of singularity after the initial compression performed using SVD. MATLAB R2010a with image processing toolbox is used as the development tool for implementing the algorithm. KeywordsSingular Value Decomposition, JPEG images, Compression factor, Compression ratio, Rank, Eigen values, Eigen vectors, Singular value.
I. INTRODUCTION Image Compression, an important area in the field of digital image processing, deals with techniques for reducing the storage required for saving an image or the bandwidth required for transmitting it [1]. The objective of Image Compression is to reduce irrelevance and redundancy of the image data thereby optimizing the storage space and increasing the transmission rate over WebPages. Image compression enables image reconstruction. The amount of compression achieved depends on the contents of image data. A typical photographic image can be compressed to about 80% of its original size without experiencing noticeable degradation in the quality. The technique of image compression finds applications in various fields such as Medical Imaging, Museums and Galleries, Web Applications, Telecommunication, Facsimile and Security Industry to name a few. To date different algorithms have been developed for image compression. These include Predictive
Coding, Fractal Compression, Burrows-Wheeler Transform, Wavelet Compression and Embedded Zero Tree Wavelet. Predictive coding refers to the decorrelation of similar neighbouring pixels within an image to remove redundancy. An example of this type is Huffman Coding which is a statistical compression method that converts characters into variable length bit strings. Transform coding includes Burrows-Wheeler transform which is a preprocessing technique which is useful for improving lossless compression. Delta encoding aids in compression of data in which sequential data occurs frequently. Fractal compression is a method used to compress images using fractals. Fractal algorithms convert these parts into mathematical data called fractal codes which are used to recreate the encoded image.Wavelet compression is a form of data compression well suited for image and audio compression. The entire image is treated as a series of wavelets which are the changes from pixel to pixel as measured by the deviation of an individual pixel from zero. EZW is a progressive encoding to compress an image into a bit stream with increasing accuracy. This may be lossy compression. Vector quantization is a technique often used in lossy data compression which requires the development of an appropriate codebook to compress data. This paper focuses on Singular Value Decomposition (SVD) which is a way of factorizing matrices into a series of linear approximations that expose the underlying structure of the matrix. SVD is commonly used in Object detection, Face recognition, Field matching techniques and Meteorological and Oceanographic data analysis. Rest of the paper is constituted as follows: Section II deals with Image Compression, section III comprises of Image File Formats, section IV describes the Procedure of SVD, section V deals with Application of SVD in Image Compression followed by Methodology Used in section VI, section VII elaborates the Flow of the Process, Results Obtained is shown in section VIII and finally Conclusion of the paper is presented in section IX.
81
82
UTU gives the identity matrix and STS=S2 since S is a diagonal matrix. On substituting these values in the above equation gives, ATA = VS2VT (5)
Eigen values and Eigen vector of matrix ATA are needed to find V and S matrices. The Eigen vectors of a square matrix are the nonzero vectors that, after being multiplied by a matrix, remain proportional to the original vector i.e., they change only in magnitude, not in direction. For each Eigen vector, corresponding Eigen value is the factor by which the Eigen vector changes when multiplied by the matrix. The mathematical interpretation of this idea is as follows [13],[14]:
where, U is a left singular matrix and V is the right singular matrix and S is a diagonal matrix. The columns of U and V are represented as ui and vi respectively and the diagonal elements si of S matrix are called singular values. The singular vectors form orthonormal basis, and the relation, Avi = siui (2)
Then v is called an Eigen vector of matrix A, associated with Eigen value . The above equation can be rewritten as Avi = Ivi (7)
shows that each right singular vector is mapped on to the corresponding left singular vector. The singular values are arranged on the main diagonal in such an order 1 2 3 4........r r+1=....= p =0, (3)
where I is the identity matrix of size nxn. The size of this identity matrix has to be the same as that of the matrix for which the Eigen values and Eigen vectors have to be calculated. Equation (7) reduces to (A-I) vi=0 (8)
where, r is the rank of matrix A, and (p) is the smaller of the dimensions m or n. Rank is the number of linearly independent rows and columns of the input matrix.
The Eigen values of matrix A are those real numbers for which the homogenous system defined by
83
The equation (9) is said to be the characteristic equation of matrix A. In the context of SVD compression, the Eigen values are the square of the elements of S (the singular values), and the Eigen vector consists of columns of matrix V (the right singular vectors).
(13)
Here VTV gives the Identity matrix and STS=S2 since S is a diagonal matrix. On substituting these values in equation (10) yields, AAT = US2UT (11)
Again the Eigen vectors are calculated, but this time for the matrix AAT. These are the columns of U (the left singular vector). The process of calculating Eigen values and Eigen vector follow the same steps as explained previously in the calculation of matrix V. Once U, S and V matrices are obtained, matrix A can be generated which is represented as the product of matrices U, S and VT.
where, U is m m matrix, S is m n matrix and V is n n matrix. V. SVD IN IMAGE COMPRESSION The matrix A (m n) is approximated by using far fewer entries than in the original matrix. When the rank r < m or r < n, the redundant information is removed. Here, rank is the total number of non-zero diagonal elements of the S-matrix. These are also
Perform SVD on RGB components Regenerate decomposed matrix
84
Start Compressed image is created & displayed Read the input image Stop Segregate the RGB components
The flow of JPEG image compression using SVD technique is as shown above. The input image is read by the Matlab software and stored as an array of integers. This image is segregated into RGB or red, green, blue component matrices. The pixel values of these matrices are converted to double data type for higher accuracy. After determining the rank of the original matrix, compression factor, which is the inverse of compression ratio, is specified. The rank required for the SVD process is calculated by dividing the original rank by the compression factor. In the next step, SVD is performed on the component RGB matrices using the new rank obtained thus yielding the matrices AR, AG and AB [19]. The S matrices of these component matrices are approximated by equating the values which fall outside the new rank to zero. This l l l results in three new S matrices SR , SG and SB respectively. Using these S matrices, the RGB matrices are regenerated. Suppose there are two consecutive values having almost the same frequencies, higher of the two values are equated to 1, thus singularity is achieved. The next step involves conversion of double data type back to integers. The RGB component l l l matrices are collected thus yielding AR , AG and AB matrices. These matrices are combined to create and display the compressed output image.
85
CF: 15
CF: 20
Fig. SVD compressed images. Top right: SVD compressed image with a compression factor 8, Top left: Compressed image with compression factor of 12, Bottom left: Compressed image with compression factor of 15, Bottom right: Compressed image with compressed factor of 20
As shown above, the bitmap image having a file size of 768 KB, when compressed to JPEG format, has a file size of 99.5 KB. This image after being compressed using SVD technique has a file size of 35.8 Kb for a compression factor of 8; for a compression factor of 12, it reduces to 32.8 KB, for a compression factor of 15, it comes down to 31.1 KB and finally for a compression factor of 20, the file size further reduces to 28.5 KB. Thus it can be noticed that as the compression factor is increased, the file size of the compressed image reduces. Also there is considerable degradation in the quality of the image as the compression factor is increased. Further an optimum value of compression factor should be chosen to provide a trade-off between the reduction in file size and quality of the image.
86