Home A Parallel Algorithm for Wavelet Transform-Based Color Image Compression
Article Open Access

A Parallel Algorithm for Wavelet Transform-Based Color Image Compression

  • Piyush Kumar Singh EMAIL logo , Ravi Shankar Singh and Kabindra Nath Rai
Published/Copyright: June 9, 2017
Become an author with De Gruyter Brill

Abstract

Wavelet transforms emerge as one of the popular techniques in image compression. This technique is accepted by the JPEG Committee for the next-generation image compression standard JPEG-2000. Convolution-based strategy is widely used in calculating the wavelet transform of the image. A convolution-based wavelet transform consists of a large number of multiplications and additions. A color image consists of a two-dimensional matrix each for red, green, and blue colors. An ordinary way to calculate the wavelet transform of a color image includes calculating the transform of the intensity matrix of the red, green, and blue components. In this article, we present a parallel algorithm for calculating the convolution-based wavelet transform of the red, green, and blue intensity components simultaneously in color images, which can run on commonly used processors. This means that it needs no extra hardware. The results are also compared to the nonparallel algorithm based on compression time, mean square error, compression ratio, and peak signal-to-noise ratio. Complexity analysis and comparative complexity analysis with some other papers are also shown here.

1 Introduction and Preliminaries

Image compression is used to represent the large number of image data into a small number of bits. The main challenge in image processing is to make a fast and efficient algorithm for image compression. Many image compression techniques are developed now. Reversible discrete cosine transform (DCT) based on the matrix factorization theory was developed by Lai et al. (2008). Integer DCT based on the Walsh-Hadamard transform and integer lifting N-point I2IDCT is proposed by the recursive method of Abhayaratne. Fractal-based compression is the approximation of the original image, and it is based on the constructive transformation of the local iterated function system in which each maps on itself, as explained by Chaur (1998), Liu and Jimack (2007), and Vijayshri and Ajay (2010). Embedded zero DCT (EZDCT) is proposed by Xiong et al. (1996). DCT-based image compression is first achieved in 1974, and it has high energy compaction (Rao and Yip, 1990). DCT is widely used in different image formats such as JPEG, MPEG, DV, and MJPEG. Wavelet transform, which is an extension of short time Fourier transform or windowed Fourier transform, plays a main role in the next generation of image compression techniques. It is based on the pyramidal subband decomposition, and it has a better peak signal-to-noise ratio (PSNR) value than DCT-based image compression. Discrete wavelet transform (DWT) is the basis of the next-generation image compression technique JPEG-2000 [12].

Wavelets emerge as a very powerful tool in image applications. They are widely used in image compression. The new image compression standard termed as JPEG-2000 wavelet-based image compression calculates the transform of a digital image with a particular wavelet filter, which splits the image in both spatially and spectrally local coefficients [9]. This property of wavelet transform is used in the image compression technique adopted by the JPEG Committee.

A number of parallel and distributed image processing algorithms developed in recent years. Many new hardware are developing at a fast rate to support parallel and distributed image processing applications. In this Internet era, there has been a rapid increase in image data applications at various networking websites. As the most popular search engine, Google provides keyword-based searching of images and also tries to achieve image content-based searching [15]. Such huge application of images creates the need for high-speed image processing algorithm using some extra hardware to speed up the process.

In recent years, many parallel and distributed image compression algorithms are developed [8, 13, 16]. In distributed image compression algorithm, the main aim is load balancing. This load balancing can be done by a parallel version of the image compression algorithm. The parallelism can be on a single machine or may be on a network means distributed system. The parallelism can be task parallelism (in which two or more tasks are done in parallel), pipelined parallelism, or data parallelism [15]. Different hardware are also developed to implement parallel processing, such as SISD, SIMD, MIMD, and MISD.

Many techniques are used to speed up the process of the wavelet transform of image processing such as parallel wavelet transform using GPU and multicore-based fast transform using lifting scheme [15, 1, 18].

1.1 Wavelets

Mathematically, ψ is a wavelet if a is scaling and b is a translation parameter [17]

(1)ψa,b(t)=ψ(tba)1|a|,

and satisfies the following admissibility criterion:

(2)Cψ=2π+|ψ^(ω)|2|ω|dω<.

where ψ^ is the Fourier transform of ψ.

1.2 Discrete Wavelet

We can change the continuous wavelet ψa,b as discussed above into discrete wavelet ψm,n by changing the scaling coefficient a=a0m such that a≠0, 1 and b=ab0a0m such that b≠0, where m, nZ, where Z is a set of integer. Then, we get discrete wavelet as [6]

(3)ψm,n(t)=a0m/2ψ(a0mtnb0).

1.3 Wavelet Transform

The DWT of function fL2(R) be denoted as [19]

(4)Wψf(m,n)=f,ψm,n,
(5)=|a|(1/2)f(t)ψm,n(t)¯dt,
(6)=|a|(1/2)f(t)a0m/2ψ(a0mtnb0)¯dt.

Then, the function f can be reconstructed as

(7)f(x)=m,n=f,ψm,nψm,n(x).

1.4 DWT-Based Image Compression

The transform-based image compression involving wavelet transform has three basic steps. The first step is calculating the wavelet transform of the digital image. The wavelet transform can be calculated by taking the convolution of the image matrix with the wavelet filter coefficients (here, we used CDF9/7). This is a time-taking process as the image matrix is generally of very large dimensions. This takes more time in the case of a color image as in the color image we have a three-grayscale-image matrix (for the red, green, and blue components). The second step is quantization, which is the process of converting the decimal and fractional number generated into its nearest integer for 8-bit/pixel representation. The third step is choosing a suitable encoding method for representing the bits generated (here, we used Huffman encoding) [4, 7, 10, 14, 19].

2 Methodology

We have developed a parallel algorithm on wavelet transform-based fast color image compression. A color image matrix is a three-dimensional matrix in which the third dimension represents the color component. The wavelet transform of a grayscale image can be obtained by finding the convolution image matrix with wavelet taps as done by Lewis and Knowles [9]. A further improvement was made on this work. The DWT of the color images is calculated by taking one by one the wavelet transform of all three-color components as done by Elaweel [3]. Here, we have proposed a parallel algorithm for the wavelet transform of color images, where the wavelet transform of all three-color components is calculated in parallel. In this modern era, many computers have multicore processors; using this fact, we have developed an algorithm for parallel image compression. The paper is based on the task parallelism methodology where all three-color components are passed through schedulers in parallel. We have done quantization in 8-bit, that is, the image is not lost due to the less number of bit allocation to each pixel. We have used Huffman encoding to encode the compressed image.

The experiment is done for the parallel color image compression algorithm and nonparallel image compression algorithm on the same computer system in the same environment, and the results are compared based on compression time, mean square error, PSNR, and compression ratio. The compression time shown in the table below is the mean of five times simulation of compression time for both cases.

The compression is done on Intel® Core™ 2 Duo CPU T6400 @2.00 GZ, and 2 GB RAM. The system type is 32-bit type and the operating system used is Windows 7 ultimate on image processing software.

2.1 Proposed Algorithm for Image Compression

The proposed algorithm for parallel image compression as explained above is shown below using a block diagram. As shown in Figure 1, a color image is used as the input data. The color image consists of three components, that is, red, green, and blue components. A color image is represented as a three-dimensional matrix in which two dimensions represent the pixel position and the third dimension represents the color component. Each component has its intensity value for each pixel. This means that each pixel has three intensity values: one for the red component, second for the green component, and third for blue component. The wavelet transform of each component is computed by convolution operation with wavelet filter with intensity value of each component. Here, we run three parallel threads at the same time: one is for convolution with the red component, the second thread is used for convolution with the green component, and the third thread is used for convolution operation with the blue component. These three threads generate the DWT of the red, green, and blue components. These three DWT components are then combined in a three-dimensional matrix in which the DWT of each color is represented in the third dimension. Huffman encoding is used to encode the DWT of the image. Then, we get a compressed image.

Figure 1: Block Diagram for Color Image Compression using Parallel Image Compression Algorithm.
Figure 1:

Block Diagram for Color Image Compression using Parallel Image Compression Algorithm.

The total time taken in the whole process from image input to compressed image output is recorded as the image compression time.

2.2 Proposed Algorithm for Image Decompression

The proposed algorithm for parallel image decompression as explained above is shown below using a block diagram. As shown in Figure 2, the encoded compressed image data are decoded by the Huffman algorithm. After this step, we get the DWT of the color image. The intensity matrix of the red, green, and blue components is separately passed to three different threads running in parallel at the same time on the same computer. These three threads perform image deconvolution operation with a given wavelet filter. This generates a three-component matrix, that is, the intensity matrix for the red, green, and blue components. These three components are then joined in a third dimension of the matrix in such order that indices 1, 2, and 3 of the third dimension represent the red, green, and blue component intensity matrices, respectively. This step generates the decompressed color image.

Figure 2: Block Diagram for Color Image Decompression using Parallel Image Decompression Algorithm.
Figure 2:

Block Diagram for Color Image Decompression using Parallel Image Decompression Algorithm.

The time in the above-mentioned process is recorded as the image decompression time.

3 Experiments and Results

For simulating our algorithm, we have taken three RGB standard images from www.imageprocessingplace.com as given in Ref. [5]. The description of images is given in Table 1. In Tables 2 and 3 , Img is used for image name, L is used for the level of wavelet transform, P is used for the process where C is used for the compression process and D is used for the decompression process, and Ti is used for the time calculated in seconds for the ith experiment. In Table 4, CR is used for compression ratio and MSE for mean square error. In Table 5, PSNR(R), PSNR(G), and PSNR(B) are used for PSNR for the red, green, and blue components, respectively, and index 1 is used for nonparallel algorithm and index 2 for parallel algorithm. The experiment is done on Intel® Core™ 2 Duo CPU T6400 @2.00 GZ, and 2 GB RAM. The system type is 32-bit type and the operating system used is Windows 7 ultimate on image processing software using MATLAB, MATLAB Image Processing Toolbox, MATLAB Parallel Computing Toolbox using MATLAB language simulated on MATLAB2010a.

Table 1:

Standard Test Images.

Image nameImage descriptionDimensionsSizeType
Img1lenacolor256.tif256×256×3196,608uint8
Img2lenacolor512.tif512×512×3786,432uint8
Img3mandrilcolor.tif512×512×3786,432uint8
Table 2:

Compression and Decompression Times in Nonparallel Wavelet Transform Algorithm.

ImgLPT1T2T3T4T5Avg
Img11C1.9381481.5061621.5176111.4855531.5066211.590819
Img21C15.00635315.09165114.96160315.01539915.04652115.0243054
Img31C1.5311331.5550281.5306351.5006011.4714831.517776
Img12C3.5656483.5129343.5316373.5063023.5103663.5253774
Img22C54.41927754.37682254.44723154.53498754.51587654.4588386
Img32C4.1903784.1220614.1419984.2646194.1310984.1700308
Img13C2.4730862.5021682.4734032.4774532.4744112.4801042
Img23C69.67076370.42151670.42370669.82700369.59917969.9884334
Img33C25.12417124.94170725.13835225.23607624.95533125.0791274
Img11D0.9449970.3881810.3924710.3873840.3875090.5001084
Img21D0.8543710.8271380.8329010.8457770.8377170.8395808
Img31D0.9110860.9064620.8987770.9024330.9002810.9038078
Img12D0.4517970.6100210.4219260.420110.422310.4652328
Img22D0.9875520.9638710.9655410.9767270.9700810.9727544
Img32D0.9904420.9571371.1736660.9488880.9402681.0020802
Img13D0.4944320.4687710.4696030.4699830.483340.4772258
Img23D1.3360091.1976991.1970061.2040661.1960331.2261626
Img33D1.102951.0313541.0075821.1552751.0249691.064426
Table 3:

Compression and Decompression Times in Parallel Wavelet Transform Algorithm.

ImgLPT1T2T3T4T5Avg
Img11C1.6393421.5159071.4796551.4835411.4943941.5225678
Img21C12.15429512.00515812.04757512.1234912.12583612.0912708
Img31C1.4272161.2529621.2823571.2367541.2061.2810578
Img12C3.5597823.3904253.3891633.4004763.3596183.4198928
Img22C41.78812741.86981241.8359341.88828441.94181641.8647938
Img32C3.200583.3312653.0824283.0366043.0907733.14833
Img13C2.4079152.2815062.3480192.3140032.2860412.3274968
Img23C55.64798955.19716255.13330355.10602355.28899755.2746948
Img33C18.67580618.6212118.62969118.79432118.5302118.6502476
Img11D0.5809930.4604940.3826750.3833250.3784030.437178
Img21D0.8358610.6030220.7082550.6379890.6768820.6924018
Img31D0.8958340.7094520.7287240.7182460.6755230.7455558
Img12D0.596250.4949920.4000040.4017490.3944620.4574914
Img22D0.9505170.7571870.7609450.7328070.7566220.7916156
Img32D0.9077130.7561920.6892540.7124580.721260.7573754
Img13D0.4864820.4875920.4308650.4489490.4462830.4600342
Img23D1.0714050.8289930.8241510.8849340.8599960.8938958
Img33D0.9578170.8039280.7767440.7613630.815130.8229964
Table 4:

Comparative Study of Both Parallel and Nonparallel Algorithms based on Image Quality.

ImgLCR1CR2MSE1MSE2
Img111.64361.64361.21221.2122
Img211.68791.68791.23021.2302
Img311.26431.26431.22841.2284
Img122.75862.75862.14872.1487
Img223.00423.00422.29812.2981
Img321.65481.65482.42612.4261
Img134.50074.50073.44423.4442
Img235.86155.86153.77133.7713
Img332.29472.29474.77524.7752
Table 5:

Comparative Study of Both Parallel and Nonparallel Algorithms based on Image Quality.

ImgLPSNR(R)1PSNR(R)2PSNR(G)1PSNR(G)2PSNR(B)1PSNR(B)2
Img1151.466951.466951.152651.152651.082151.0821
Img2151.199551.199551.048351.048351.060851.0608
Img3151.134851.134851.122151.122151.089451.0894
Img1246.855346.855346.115246.115245.865145.8651
Img2246.352946.352945.519945.519945.228045.2280
Img3245.218545.218545.198645.198645.194345.1943
Img1342.737842.737841.920041.920041.875941.8759
Img2342.830642.830641.257041.257040.373940.3739
Img3339.317839.317839.344139.344139.304739.3047
Table 6:

Original Images.

Table 7:

Images after Decompression by Parallel and Nonparallel Methods.

3.1 Experimental Results

3.2 Images and Visual Results

RowFigure Refer Tables 6 and 7
Row 1Original images
Row 2Decompressed images by one-level wavelet transform using nonparallel technique
Row 3Decompressed images by two-level wavelet transform using nonparallel technique
Row 4Decompressed images by three-level wavelet transform using nonparallel technique
Row 5Decompressed images by one-level wavelet transform using parallel technique
Row 6Decompressed images by two-level wavelet transform using parallel technique
Row 7Decompressed images by three-level wavelet transform using parallel technique

3.3 Experimental Result Analysis

In Table 8, Avg is used for average time, Time ratio=Avg1/Avg2 and Speed up=[(Avg1–Avg2)/Avg1]* 100. Time ratio is always found to be greater than one. In ideal conditions, it will be exactly equal to three, but it is here found to be nearly 1.4. This is because here we used Intel® Core™ 2 Duo CPU T6400 @2.00 GZ, which consists of only two cores. Besides, there is also a communication delay during sending of the data to different cores and recollecting the processed data. Table 4 shows that the decompressed image quality in both algorithms is exactly the same. This is because the parallel algorithm only parallel schedules the color matrix. The results are further analyzed based on the graph given in Figures 3 and 4.

Table 8:

Comparative Study of Both Parallel and Nonparallel Algorithms based on Compression Time.

ImgLPAvg1Avg2Time ratioSpeed up
Img11C1.5908191.52256781.0448263784.290318383
Img21C15.024305412.09127081.24257455219.52193144
Img31C1.5177761.28105781.18478338815.59638576
Img12C3.52537743.41989281.0308444172.992150571
Img22C54.458838641.86479381.30082662923.12580496
Img32C4.17003083.148331.32452150824.50103726
Img13C2.48010422.32749681.0655671796.153265657
Img23C69.988433455.27469481.26619303221.02310037
Img33C25.079127418.65024761.34470747725.63438391
Img11D0.50010840.4371781.14394685912.58335193
Img21D0.83958080.69240181.21256299417.53005786
Img31D0.90380780.74555581.21226043717.50947491
Img12D0.46523280.45749141.0169214111.663984139
Img22D0.97275440.79161561.22882166518.62122649
Img32D1.00208020.75737541.32309578624.41968218
Img13D0.47722580.46003421.0373702653.602403726
Img23D1.22616260.89389581.37170641127.09810265
Img33D1.0644260.82299641.29335438222.68167068
Figure 3: Comparative Study of Compression Time.
Figure 3:

Comparative Study of Compression Time.

Figure 4: Comparative Study of Decompression Time.
Figure 4:

Comparative Study of Decompression Time.

3.4 Complexity Analysis

The complexity of the convolution-based image compression algorithm is the sum of the complexity of the convolution-based wavelet transform of the image and the Huffman algorithm. The complexity of the convolution-based wavelet transform is O(N2) [11] for an N×N image and the complexity of the Huffman algorithm is NlogN [2]. Hence, the complexity of the wavelet transform-based image compression algorithm is O(N2). In this paper, there are three processes running at the same time. The complexity of the wavelet transform part has N2/Pi, where i is the number of parallel processes. Here, the number of parallel processes given is three. Therefore, the complexity of the wavelet transform part is N2/3. The total complexity of the wavelet transform-based image compression algorithm is N2/3. In Ref. [20], the proposed fast and high-speed architecture analyzes its performance based on complexity, given as (1–4j)N2/3, which is of order O(N2). Our algorithm has the complexity of order O(N2/3), which is better than that in Ref. [20]; also, it does not use any additional hardware. The experimental results also support the complexity analysis.

4 Conclusions

  1. No extra hardware is used to implement this parallel algorithm.

  2. This algorithm has time complexity O(N2/3) without use of any extra hardware.

  3. This algorithm is found to be better than the complexity analyzed in Ref. [20] in terms of time complexity.

  4. This algorithm can be implemented on any computer that supports the wavelet transform of the image, as it does not require any extra hardware for its parallelism.

  5. This parallel algorithm uses multicore architecture that is commonly found in PC.

  6. This parallel algorithm is found to be faster than the nonparallel algorithm.

  7. This parallel algorithm is found equally useful in compression and decompression processes.

  8. Image quality is found to be exactly the same in both parallel and nonparallel algorithms.

  9. This parallel algorithm can be found useful in multimedia applications and big image processing applications such as satellite image compression.

  10. The future direction of this paper is that it can be implemented in multimedia video processing.

Bibliography

[1] D. Chaver, M. Prieto, L. PiÃśuel and F. Tirado, Parallel wavelet transform for large scale image processing, in: Proceedings of the International Parallel and Distributed Processing Symposium (IPDPSŠ02), IEEE, 2002.10.1109/IPDPS.2002.1015472Search in Google Scholar

[2] T. H. Cormen, C. E. Leiserson, R. L. Rivest and C. Stein, Greedy algorithms, in: Introduction to Algorithms, 2nd ed., PHI Learning Private Ltd., New Delhi, India, 2008, pp. 385–390.Search in Google Scholar

[3] S. G. Eltaweel, Colour image compression, 2011 Seventh International Computer Engineering Conference (ICENCO), Giza, IEEE, December 2011.10.1109/ICENCO.2011.6153936Search in Google Scholar

[4] J. C. Geetika and J. Chopra, Novel image compression technique with improved-wavelet method, Int. J. Recent Technol. Eng. (IJRTE)1 (2012), 109–111.Search in Google Scholar

[5] R. C. Gonzalez, R. E. Wooda and S. L. Eddins, Digital Image Processing Using Mat-lab, Tata McGraw-Hill Education Private Ltd., New Delhi, India, 1989.Search in Google Scholar

[6] A. K. Jain, Fundamentals of Digital Image Processing, PHI Learning Private Ltd., New Delhi, India, 2012.Search in Google Scholar

[7] G. K. Kharate, Color image compression based on wavelet packet best tree, Int. J. Comput. Sci. Issues7 (2010), 31–35.Search in Google Scholar

[8] R. Khemiri, F. Sayadi, T. Saidani, M. Chouchene, H. Bahri and R. Tourki, Parallel implementation of the discrete wavelet transform on graphics processing units, in: 1st International Conference on Advanced Technologies for Signal and Image Processing – ATSIP’2014, IEEE, IEEE, March 2014, pp. 111–114.10.1109/ATSIP.2014.6834587Search in Google Scholar

[9] A. S. Lewis and G. Knowles, Image compression using 2D wavelet transform, IEEE Trans. Image Process.1 (1992), 224–250.10.1109/83.136601Search in Google Scholar PubMed

[10] R. Maini and S. Mehra, A review on JPEG2000 image compression, Int. J. Comput. Appl.11 (2010), 43–47.10.5120/1607-2159Search in Google Scholar

[11] S. Mallat, Transform coding, in: A Wavelet Tour of Signal Processing, Academic Press, Massachusetts, USA, 2009, p. 481.Search in Google Scholar

[12] M. Marimuthu, R. Muthaiah and P. Swaminathan, Review article: an overview of image compression techniques, Res. J. Appl. Sci. Eng. Technol.4 (2012), 5381–5386.Search in Google Scholar

[13] A. Masoudnia, H. Sarbazi-Azad and S. Boussakta, Design and performance of a pixel-level pipelined-parallel architecture for high speed wavelet-based image compression, Comput. Electrical Eng.31 (2006), 572–588.10.1016/j.compeleceng.2005.07.005Search in Google Scholar

[14] B. Nilesh, S. Sachin, N. Pradip and D. B. Rane, Image compression using discrete wavelet transform, Int. J. Comput. Technol. Electron. Eng. (IJCTEE)3 (2013), 85–89.Search in Google Scholar

[15] H. B. Prajapati and S. K. Vij, Analytical study of parallel and distributed image processing, in: Proceedings of the 2011 International Conference on Image Information Processing.10.1109/ICIIP.2011.6108870Search in Google Scholar

[16] Z. Prusa and P. Rajmic, Parallel implementation of 2D forward discrete wavelet transform on multicore CPUs, elektrorevue3 (2010), 14–20.Search in Google Scholar

[17] K. P. Soman, K. I. Ramachandran and N. G. Resmi, Insights Into Wavelets, 3rd ed., PHI Learning Private Ltd., New Delhi, 2011.Search in Google Scholar

[18] R. Srinivasa Rao, M. Vijay Karthik and S. Nagla, Wavelet transform based image compression, Int. J. Eng. Res. Appl. (IJERA)2 (2012), 1509–1514.Search in Google Scholar

[19] D. F. Walnut, Image compression, in: An Introduction to Wavelet Analysis, Brikhauser, Boston, USA, 2002, pp. 371–388.10.1007/978-1-4612-0001-7_12Search in Google Scholar

[20] C. Xiong, J. Tian and J. Liu, Efficient architectures for two-dimensional discrete wavelet transform using lifting scheme, IEEE Trans. Image Process.16 (2007), 607–614.10.1109/TIP.2007.891069Search in Google Scholar

Received: 2017-01-27
Published Online: 2017-06-09
Published in Print: 2018-01-26

©2018 Walter de Gruyter GmbH, Berlin/Boston

This article is distributed under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Downloaded on 3.11.2025 from https://www.degruyterbrill.com/document/doi/10.1515/jisys-2017-0015/html
Scroll to top button