Top Banner
Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication Engineering, NERIST (Deemed University), Arunachal Pradesh [email protected] ; [email protected]
23

Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Mar 27, 2015

Download

Documents

Nicole Barnett
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Wavelet and DCT based Image Coding and Reconstruction for Low Resolution

Implementation

Swanirbhar Majumder and

Dr. Md. Anwar Hussain Electronics and Communication Engineering,

NERIST (Deemed University),Arunachal Pradesh

[email protected]; [email protected]

Page 2: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

ABSRACT

• We propose a methodology for display devices where low resolution image may be sufficient.

• DCT with masked pixels is used after DWT of the original image for single or more levels. Resulting to a hybrid transform with the advantages of DWT and DCT.

• The received image undergoes filtering and smoothening to cover up the effect of masked pixels.

• Through this process we achieve a reduction of number of pixels by 73% (with DWT before DCT with masking) to 96% (with DWT with maximum allowable masking after DCT) or in between, for a typical image size of 256X256.

• This type of hybrid transform can easily be performed with high speed processors available today in the market with appropriate changes in the program.

Page 3: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Overview

• The hybrid transform methodology which uses DCT and DWT for devices (mobiles, palm tops, video conferencing, etc.) which are of smaller screen size or allow low resolution viewing.

• We realize very high compression and thus lower the cost of data storage and transfer, at the cost of image resolution.

• The aforesaid devices may not have the requirement of high resolution of the person or environment, so we go for low resolution image viewing.

• The smaller sizes though might not give high clarity but convey the required message. Other than that it may be used for low resolution devices like web-cam image or those of video conferencing.

Page 4: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

1. Type of Image

• Extract the image information from input image X(i,j) , i.e. to know about its size (number of pixels, RGB or gray scale), type of image (BMP, JPEG, PNG,TIFF, etc.),

• Decide the type of device (webcam, mobile, etc.) on which it is to be viewed or the purpose and check whether the device is a low resolution device or has smaller screen.

• Based on the extraction of aforesaid image information we decide how many level of DWT to apply.

Page 5: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

2. No of DWT levels to Apply

• If the screen size of these devices are around 200x150 or less, for images in between 256X256 to 64x64 we apply single level DWT.

• If it is less we do not apply DCT later (as the size 64x64 is small enough so further removal of detail information will make the image unrecognizable).

• But if it is greater than 256x256 we apply higher levels of DWT.

• The wavelet we use is Daubechies 6 wavelet because it has emerged to be one of the best for image processing.

Page 6: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

An Example• On applying DWT for single level and keeping the approximate image

only we achieve compression about 67-73% (image of 64x64, 128x128 and 256x256 have approximate image of sizes of 37x37, 69x69 and 133x133 respectively).

• For two levels of DWT application the approximate image results to about 93% of compression (It is simply the repetition of the single level DWT process of FIGURE, on the approximate image to get the second level approximate DWT image).

Page 7: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

3.Discrete Cosine Transform (DCT)

The 2 dimensional DCT of a discrete image block of 8x8 P(i,j), is defined as F[i,j] where x, y, i and j all vary from 0 to 7

7 7

0 0

1 (2 1) (2 1)[ , ] ( ) ( ) ( , ) cos cos

4 16 16x y

x i y jF i j C i C j P x y

Page 8: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

DCT-DWT Decision

• For masking of the resultant image where level of masking depends on the type of image

• (eg. more masking for BMP, less for JPEG, etc.)• For high resolution images we can mask up to 54 bits out

of 64 bits in each 8x8 block depending on requirement. • The maximum achievable compression percentages

before entropy coding are shown in the TABLE:

Page 9: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

8x8 block DCT Masking

• The masking is done diagonally, i.e. 0, 1, 3, 6, 10, 15, 21, 28, 36, 43, 49 and 54; as the example masks shown in Figure.

• This is followed by quantization and entropy coding. • Here we used RLE (Run-Length Encoding) as after

reduction of 90% of size, RLE is a better option compared to Huffman encoding as it is less complex.

Page 10: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Image Compression Algorithm

• So we have a final output A(i,j) along with B, C and D being quantization levels, size of DCT mask and DWT levels.

Page 11: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Image De-compression Algorithm

• We need B, C and D values are integrated with A(i,j) for transferring as multimedia data.

• First entropy decoding (reverse RLE or if Huffman coding was used than Huffman decoding);

• Followed by de-quantization based on quantization level information B (along with others information like max value, min value, step size, etc. of the image pixel).

• Then we fill up the masked pixels with zero values (zero padding) before IDCT formation from C which is followed by IDWT with the number of levels D.

• Smoothening & filtering (here we used median filter an inbuilt filter pads the image with zeros on the edges) after IDWT to get.

Page 12: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Coding]-Step1

(B)- Image of 133x133 after DWT(A)-Image 256x256

So [133x133] : [256x256]=73% Compression

Page 13: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Coding]-Step2• Applying DCT and then masking

of 54 bits per 8x8 pixel block.

• We have around 276 numbers of 8x8 blocks in a 133x133 image (B).

• Thus removing 14904 (54x276) pixels from 17689 (133x133) pixels resulting to 84% compression in Image C compared to B by masking.

• And an overall compression of 95.8% for C to original A

• We have reduced from 65536 (256x256) pixels to 2785 (17689-14904) pixels

(C)- Image After Masking

Page 14: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Coding]-Step3

• This is followed by 16 level quantization and RLE encoding which further reduces the size.

• As we achieve finally around 96% compression, the effect of RLE is not much and hence may be avoided if required, for images of smaller size.

• The coded image along with parameter values B=16, C=54 and D=1 are sent for decompression at the receiver end.

• The coded image A(i,j) of 2785 pixels along with B, C and D values are sent to the receiver.

Page 15: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Decoding]-Step1

• Then on computation of entropy decoding and de-quantization, we assign the 2785 pixels containing the image data to proper co-ordinates, slight quantization error to get Figure (D) (D) Image before IDCT

Page 16: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Decoding]-Step2

(D) Image before IDCT (133x133) (E) Image after IDCT (133x133)

Page 17: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

RESULTS-[Decoding]-Step3• Image (E)133x133 i.e. corresponds to the approximate image

obtained after DWT at the transmitter side. • We then perform single level IDWT on this 133x133 image to get the

256x256 image

(E) Image after IDCT (133x133)

(F) Image after IDWT (256x256)

Page 18: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

O/P Comparison

(G) Image after Smoothing & Filtering (A) Original Image

Page 19: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

O/P Comparison

(G) Image after Smoothing & Filtering (A) Original Image

Page 20: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

PSNR based Comparison

PSNR plot with varying quantization levels for maximum(54) and minimum(0) masking

PSNR plot with varying number of masking bits for two quantization levels i.e. 16 and 64

Page 21: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

Conclusion• Our algorithm has been highly successful in terms of software simulation

implementation and has provided results which are satisfactory. • Thus we see that this method, if realized on hardware, may be a boon for

the huge amount of compression it provides. • With quantization level more than 16, there is hardly much difference in the

PSNR value.So the only parameter that may be varied is the number of bits to be masked if we fix the quantization level to 16 (B).

• Thus this further reducing the number of variables from three to two only. • Moreover if the smoothing and filtering is improved, better quality picture will

be achievable at the same compression ratio. • May be further improved for application in the temporal domain and than

videos may also be compressed in the similar manner. • We have used median filter for smoothening and filtering to remove the sharp

edges at each 5x5 pixel blocks. • This may not be quite satisfactory and hence we are also looking to further

improve this step. • An FPGA implementation of this hybrid compression technique is presently

being pursued.

Page 22: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

References1. Salomon, D., Data Compression, 4th Edition. Springer, 2006-072. Sayood K. Introduction Data Compression, 2nd Edition 2000, Morgan Kauffmann3. Wen-Chien Yan, et al , Compressing discrete cosine transform coefficients by modified set partitioning in

hierarchical tree, November 2005 SPIE and IS&T4. Jiang, W.; Ortega, A., Lifting factorization-based discrete wavelet transform architecture design, IEEE Trans.

Circuits and Systems for Video Technology, Vol 11, May 20015. Junejo, N et al, Speech and Image Compression Using Discrete Wavelet Transform, IEEE/Sarnoff Symposium on

Advances in Wired and Wireless Communication, 20056. Akintola, A.A. et al, Evaluation of Discrete Cosine Transform (DCT) for Reconstructing Lost Blocks in Wireless

Video Transmission, Proceeding ACIT - Signal and Image Processing - 20057. Majumder S.; Hussain A., A comparative study of DCT and wavelet-based image coding & reconstruction,

Proceedings of SCTII 2007, NIT Rourkela8. Zafarifar, B et al, Micro-codable Discrete Wavelet Transform, July 20029. Andrew, J.P. et al, Modified discrete wavelet transform for odd length data appropriate for image and video

compression applications, IEEE, 200110. Henrique S. Malvar, “Fast Progressive Image Coding without Wavelets” IEEE Data Compression Conference –

Snowbird, Utah, March 200011. Gerekand, O.N. et al, “Adaptive polyphase subband decomposition structures for image compression,” IEEE

Trans. Image Processing, vol. 9, pp. 1649–1659, Oct. 2000.12. Wei Jun et al, Volumetric image compression by 3D Discrete Wavelet Transform (DWT), SPIE, The International

Society for Optical Engineering, 199513. Choi J.U. et al, Watermarking of digital images using wavelet and discrete cosine transforms , IEEE Trans , 200514. Watson A.B. et al, Visibility of Wavelet Quantization Noise, IEEE Transactions on Image Processing, Vol. 6, No. 8,

August 200215. Servetto S.D. et al, Multiple Description Wavelet Based Image Coding, IEEE Trans on Image Processing, vol. 9,

no. 5, may 200016. Wahid, K.A. et al, Error-Free Arithmetic for Discrete Wavelet Transforms Using Algebraic Integers, 16th IEEE

Symposium on Computer Arithmetic (ARITH-16 '03), 2003.

Page 23: Wavelet and DCT based Image Coding and Reconstruction for Low Resolution Implementation Swanirbhar Majumder and Dr. Md. Anwar Hussain Electronics and Communication.

THANK YOU!!