Usage analysis of SVD, DWT and JPEG compression methods for image compression
on
p-ISSN: 1979-5661
e-ISSN: 2622-321X
Jurnal Ilmu Komputer VOL. 14 No. 2
Usage analysis of SVD, DWT and JPEG compression methods for image compression
Dewa Ayu Indah Cahya Dewia1, I Made Oka Widyantarab2
aStudy Program of Automation Engineering, Bali State Polytechnic Jl. Kampus Bukit Jimbaran, Bali, Indonesia 1[email protected] (Corresponding author)
bDepartment of Electrical Engineering, Udayana University Jl. Kampus Bukit Jimbaran, Bali, Indonesia 2[email protected]
Abstract
Through image compression, can save bandwidth usage on telecommunication networks, accelerate image file sending time and can save memory in image file storage. Technique to reduce image size through compression techniques is needed. Image compression is one of the image processing techniques performed on digital images with the aim of reducing the redundancy of the data contained in the image so that it can be stored or transmitted efficiently. This research analyzed the results of image compression and measure the error level of the image compression results. The analysis to be carried out is in the form of an analysis of JPEG compression techniques with various types of images. The method of measuring the compression results uses the MSE and PSNR methods. Meanwhile, to determine the percentage level of compression using the compression ratio calculation. The average ratio for JPEG compression was 0.08605, the compression rate was 91.39%. The average compression ratio for the DWT method was 0.133090833, the compression rate was 86.69%. The average compression ratio of the SVD method was 0.101938833 and the compression rate was 89.80%.
Keywords: Image Compression, SVD, DWT, PSNR, MSE
The main objective of developing information technology in anticipating current global developments is through the proper use of information technology to support all activities and business processes that occur. The development of information technology is expected to facilitate human work in making decisions. Along with the increasingly rapid digital development, it is also in line with the development of digital products. Various kinds of digital products, one of which is digital images. Digital image is an image obtained from the digitization process of analog image data [1]. Digital image is very important. Digital images have been applied in various fields. Most images require a storage medium depending on the size of the image file. The bigger the image size, the better the image quality. The larger the image size, of course, will consume a large enough memory / storage media as well. In addition, a large image file size will also affect the length of time it takes to send the image file via the internet. Through image compression, it can save bandwidth usage on telecommunication networks. Therefore, we need a technique to reduce image size through compression techniques. There are various compression techniques that have been developed and can be used according to the needs and objectives of the compression process [2]. This research will analyze compression techniques and test the results of image compression. .
This research begins by preparing image data to be compressed. Then open the compression system using matlab, input the image that has been previously prepared for the compression process to be carried out. Furthermore, the compression process will be carried out using the
SVD, DWT and JPEG methods. After the compression process is carried out, it will produce a compressed image accompanied by the MSE, PSNR and image compression ratio values.
In this study, the images to be used are flax images with bitmap format and flax images in jpg format. There are 3 types of images to be analyzed, namely grayscale images, color images and binary images[3]. There are 6 images to be analyzed. The following is an image that will be used in the study.
Table 1. Image Data
Zelda.bmp Boat.bmp
Barbara.bmp
Lena.bmp
Lighthouse.jpg
Dessert.jpg
JPEG (Joint Photographic Experts Group) uses a lossy compression technique so that it is difficult to do the image editing process. JPEG is not suitable for images that use many lines, sharpness of color, while JPEG is very suitable for image landscapes. JPEG 2000 is a development of JPEG compression. This technique uses lossy and lossless depending on bandwidth requirements. This technique supports large images [3], [4].
Singular Value Decomposition (SVD) is a lossy compression technique by parsing a single matrix by compressing it into three smaller matrices of the same size by reducing data in rows and columns [5], [6].
Discrete Wavelet Transform (DWT) is a lossy compression technique that has the advantage of grouping concentrated images into a small group of coefficients [7], [8]. This method is more accurate in image reconstruction because it provides a combination of frequency and scale information
Image quality is assessed based on the ratio of changes in the value of each pixel in the compressed image to the original image using certain formulas. There are several standard measurements of error in compression, as follows:
a.
MSE (Mean Square Error)
MSE is the sigma of the number of errors between the compressed image and the original
Image [9].
1 v-,N-lv-,M-l
MSE = MNς,-0 ς [|«W) — rti'<]
(1)
Where :
M is length of image in pixels, N is image width in pixels, f (i, j) is original image pixel value and f '(i, j) is pixel value of reconstructed image.
b.
PSNR (Peak Signal Noise to Ratio)
PSNR is a parameter used to determine the validity / quality of the compressed image. The PSNR calculation uses the square of the maximum value divided by the MSE value [4], [8],
[10]. The calculation of the PSNR value in decibels is expressed in the following equation:
PSNR = 10logw
2552
MSE2
(2)
Where :
PSNR is PSNR value of image in decibels and MSE is MSE value
In this section, an image compression analysis process is carried out using the JPEG compression technique. The compression system is made with the Matlab programming language. The following is a display of the compression process using the JPEG compression technique.
Figure 1. Color image compression test with 25% compression quality
In Figure 1, it can be seen that the original image size is 786.488 kb after being compressed resulting in an image size of 24.329 kb. The compression used is 25% image quality.
Figure 2. Grayscale image compression test with compression quality of 25%
In Figure 2, it can be seen that the original image size is 10,115 kb after being compressed to produce an image size of 8,442 kb. The compression used is 25% image quality.
Figure 3. Grayscale image compression test with compression quality of 25%
In Figure 3, it can be seen that the original image size is 17.07 kb after being compressed, resulting in an image size of 13.215 kb. The compression used is 25% image quality. Figure 4
Figure 4. (a) 25% quality image compression, (b) 50% quality image compression, (c) 75% quality image compression, (d) 100% image quality compression
(a) (b) (c) (d)
Figure 5. (a) 25% quality image compression, (b) 50% image quality compression, (c) 75%
Figure 6. (a) 25% quality image compression, (b) 50% image quality compression, (c) 75% quality image compression, (d) 100% image quality compression
Table 2. Testing of image compression using JPEG
Image |
MSE |
PSNR |
lena.bmp |
29.5990 |
33.4180 |
boat.bmp |
21.9742 |
34.1488 |
barbara.bmp |
33.4569 |
32.2867 |
zelda.bmp |
10.9222 |
35.0537 |
dessert.jpg |
45.8487 |
31.5175 |
lighthouse.jpg |
19.3077 |
35.2735 |
Table 2 shows the MSE and PSNR values from the image compression results of the JPEG compression method. The average MSE value for compression results using the JPEG method is 26.85, while the average PSNR value is 33.62. The following is a compression display with the JPEG algorithm with the MSE (Mean Square Error) value and the PSNR (Peak Signal Noise to Ratio) value.
Figure 7. JPEG image compression
The following is a display of the compression process using the DWT method with a thresholding value of = 200.
Figure 8. Image Compression with DWT Method with T = 200
In Figure 8, it can be seen that the quality of the compressed image using the DWT method with the use of a threshold value of = 200 looks less good. The greater the threshold value, the greater the MSE value, so that it affects the image quality that is decreasing. The MSE value is 284.1202 and the PSNR value shows a value of 23.5958.
Table 3. Testing of image compression using DWT
Image |
MSE |
PSNR |
lena.bmp |
17.8148 |
35.6230 |
boat.bmp |
18.2090 |
35.5279 |
barbara.bmp |
21.1228 |
34.8833 |
zelda.bmp |
15.6145 |
36.1955 |
dessert.jpg |
20.1043 |
35.0979 |
lighthouse.jpg |
13.0084 |
36.9886 |
Table 3 shows the MSE and PSNR values from the image compression results of the DWT method with a threshod value of = 15. The average PSNR value is greater than the MSE value. The average MSE value for compression results with the DWT method is 17.65, while the average PSNR value is 35.72.
The following is a display of the compression process using the SVD method with the criterion value k = 25.
Figure 9. Image Compression with SVD Method with K = 25
In Figure 9, it can be seen that the quality of the compressed image using the SVD method using a value of K = 25 looks less good. The MSE value is 47.9936 and the PSNR value shows a value of 31.3190.
Table 4. Testing of image compression using SVD
Image |
MSE |
PSNR |
lena.bmp |
28.6056 |
33.5663 |
boat.bmp |
102.1449 |
28.0386 |
barbara.bmp |
191.5524 |
25.3079 |
zelda.bmp |
23.5924 |
34.4031 |
dessert.jpg |
35.6673 |
32.6081 |
lighthouse.jpg |
38.2741 |
32.3018 |
Table 4 shows the MSE and PSNR values from the image compression results of the SVD method with the criteria matrix value = 40. The greater the criterion matrix value (k), the higher the PSNR value, while the lower MSE value, so the image quality will be better. The average MSE value for compression results with the SVD method is 69.97, while the average PSNR value is 31.04.
The effect of the compression process will affect the size of the compressed image and the quality of the resulting image. The following is a compression ratio calculation:
Y'
(3)
RASIO KOMPRESI = γ
Where:
-
Y' is the size of the compressed image and Y is size of original image (before compression)
Table 5. Testing the compression result image ratio
Image |
Compression type |
Initial image size (KB) |
Compression image size |
Compression ratio |
lena.bmp |
JPEG |
768 |
24.33 |
0.031680 |
DWT |
768 |
25.2 |
0.032813 | |
SVD |
768 |
27.7 |
0.036068 | |
boat.bmp |
JPEG |
257 |
24.37 |
0.094825 |
DWT |
257 |
30.8 |
0.119844 | |
SVD |
257 |
33.2 |
0.129183 | |
barbara.bmp |
JPEG |
257 |
29.65 |
0.115370 |
DWT |
257 |
38.1 |
0.148249 | |
SVD |
257 |
38.2 |
0.148638 | |
zelda.bmp |
JPEG |
257 |
17.29 |
0.067276 |
DWT |
257 |
72.4 |
0.281712 | |
SVD |
257 |
22.6 |
0.087938 | |
dessert.jpg |
JPEG |
826 |
78.81 |
0.095412 |
DWT |
826 |
84.3 |
0.102058 | |
SVD |
826 |
70.2 |
0.084988 | |
lighthouse.jpg |
JPEG |
548 |
61.22 |
0.111715 |
DWT |
548 |
62.4 |
0.113869 | |
SVD |
548 |
68.4 |
0.124818 |
Table 5 shows the image compression ratio value between the original image and the image after compression. The average ratio for JPEG compression is 0.08605, the compression rate is 91.39%. The average compression ratio for the DWT method is 0.133090833, the compression rate is 86.69%. The average compression ratio of the SVD method is 0.101938833 and the compression rate is 89.80%.
Based on the results of the analysis of the use of several compression methods, several conclusions were obtained, namely the greater the threshold value (T) in the DWT method, the greater the MSE value, so that the effect on the image quality decreases. This indicates that the compression value is high enough. The greater the value of the criteria matrix (k) in the SVD method, the higher the PSNR value, while the lower the MSE value so that the image quality will be better. The compression level is not very high. Vice versa. The average ratio for JPEG compression is 0.08605, the compression rate is 91.39%. The average compression ratio for the DWT method is 0.133090833, the compression rate is 86.69%. The average compression ratio of the SVD method is 0.101938833 and the compression rate is 89.80%. The higher the compression level, the less image quality will be.
References
-
[1] R. Munir, Pendeteksian Tepi. 2004.
-
[2] P. Indah Ciptayani, W. Firdaus Mahmudy, and A. Wahyu Widodo, “PENERAPAN ALGORITMA GENETIKA UNTUK KOMPRESI CITRA FRAKTAL.” Jurnal Ilmu Komputer. 2009.
-
[3] Handoko Handoko, Donny KS. Donny KS., and Victor G.U. Victor G.U., “KOMPRESI
CITRA BERWARNA DENGAN OBDD.” Jurnal Informatika. vol. 6. p. pp.17-23. 2005. [Online]. Available: http://puslit2.petra.ac.id/ejournal/index.php/inf/article/view/16315.
-
[4] K. Firdausy, I. Hawariyanta, and Murinto, “Implementasi Watermarking Untuk Penyembunyian Data Pada Citra Dalam Domain Frekuensi Menggunakan Discrete Cosine.” Telekomnika. vol. Vol.4, no. 1693–6930. pp. 19–26. 2006.
-
[5] E. Garcia, “Singular value decomposition (svd) a fast track tutorial.” Dr. E. Garcia. pp. 1– 5. 2006. [Online]. Available: http://www.cs.fit.edu/~dmitra/SciComp/Resources/singular-value-decomposition-fast-track-tutorial.pdf.
-
[6] H. S. Prasantha, H. L. Shashidhara, and K. N. Balasubramanya Murthy, “Image compression using SVD,” 2008, doi: 10.1109/ICCIMA.2007.228.
-
[7] A. M. Faza, C. Slamet, and D. Nursantika, “Analisis Kinerja Kompresi Citra Digital dengan Komparasi DWT, DCT dan Hybrid (DWT-DCT).” Jurnal Online Informatika (JOIN). vol. 1, no. 1. pp. 1–5. 2016.
-
[8] N. Widyantara, I Made Oka; Garnita Darma Putri, Gusti Ayu; Sastra, Nyoman Putra; Wirastuti, “Selection of Mother Wavelet for Medical Image Compression,” in 2016 International Conference on Smart Green Technology in Electrical and Information Systems: Advancing Smart and Green Technology to Build Smart Society, ICSGTEIS 2016 - Proceedings, Oct. 2016, pp. 171–177.
-
[9] R. R. Clinton and L. O. Sari, “Analisa Perbandingan Algoritma DCT, Haar Wavelet, Huffman dan LZW pada Kompresi Citra Digital Menggunakan Matlab R2013a.” Jom FTEKNIK. vol. 4, no. 1. p. 6. 2017. [Online]. Available:
http://jom.unri.ac.id/index.php/JOMFTEKNIK/article/viewFile/13469/13033.
-
[10] Rismon H. Sianipar and Sri Muliani W.J., “KOMPRESI CITRA DIGITAL BERBASIS WAVELET: TINJAUAN PSNR DAN LAJU BIT.” Jurnal Informatika. vol. 4. p. pp.71-77. 2003. [Online]. Available:
http://puslit2.petra.ac.id/ejournal/index.php/inf/article/view/15835.
107
Discussion and feedback