Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

21
IMAGE COMPRESSION Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards Presented by Rishab Shah

Transcript of Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Page 1: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

IMAGE COMPRESSION Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Presented by Rishab Shah (1313048 )

Page 2: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

IntroductionNeed of Compression Image compression is done to reduce the

number of bits required to store the same imageLesser the number of bits per pixel, lesser is the

space consumed to store the ImageExample,256X256, 8 bpp image Before Compression:Space consumed= (28x28x8 / 23x210 ) = 64KBAfter Compression (assuming 5bpp)Space consumed= (28x28x5 / 23x210 ) = 40KBSpace saved = 24KB

Page 3: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Compression Ratio

It is defined in 2 waysDefinition 1: It is defined as the ratio of

number of bits required after compression to the number of bits required before compression

Used by MATLAB softwareDefinition 2: It is defined as the ratio of

number of bits saved after compression to the number of bits required before compression

Theoretical definition Previous example,

Definition 1 Definition 2

Compression ratio= 0.625(40/64)

Compression Ratio =0.375(24/64)

Page 4: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Types of CompressionLossy Compression: When the image is

uncompressed, some part of the original data is completely lost

A redundant information is eliminatedLossless compression: When the image is

uncompressed, every single bit of data is restored

Lossless Compression Lossy CompressionNo loss of information Some loss of informationMSE =0 MSE ≠0PSNR =∞ PSNR ‹∞Different methods1)Run Length Encoding2)Huffman codes3)Arithmetic codes4)Dictionary(LZW)

Different methods1)Improved Grey Scale Quantization (IGS)2)DPCM3)Transform coding

Page 5: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

General Block Diagram for compression

• Transformer: It transforms the input data into a format to reduce inter-pixel redundancies in the input image

• Higher the capability of compressing information in fewer coefficients, better the transform. Hence, DCT and DWT are used

• Quantizer: operation is not reversible and must be omitted if lossless compression is desired

• Reduces the psych visual redundancies of the input image

• Symbol (entropy) encoder: It creates a fixed or variable-length code to represent the quantizer’s output and maps the output in accordance with the code

• variable-length code is used

Page 6: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Compression process for JPEG Original image is divided into blocks of 8 x 8. Pixel values of a black and white image range from 0-255

but DCT is designed to work on pixel values ranging from -128 to 127. Therefore each block is modified to work in the range 

Equation is used to calculate DCT matrix. DCT is applied to each block by multiplying the modified

block with DCT matrix on the left and transpose of DCT matrix on its right.

Each block is then compressed through quantization. Quantized matrix is then entropy encoded. Compressed image is reconstructed through reverse

process. Inverse DCT is used for decompression 

Page 7: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Mathematical expression for DCT

Page 8: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Results of DCT

Original Image After 8X8 DCT After 4X4 DCT

Page 9: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

As the number of coefficients increases quality of the image decreases whereas compression ratio continues to increase

Page 10: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

SNR value increases with number of coefficients.

Page 11: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Advantages of DCT It has been implemented in single integrated

circuit It has the ability to pack most information in

fewest coefficients It minimizes the block like appearance called

blocking artifact that results when boundaries between sub-images become visible

Page 12: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

JPEG 2000Addresses the problems likeLow bit rate compressionLarge imagesSingle Decompression ArchitectureTransmission in Noisy EnvironmentComputer generated imaginaryCompound Documents

Page 13: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Compression steps for JPEG 2000 Digitize the source image into a signal s, which is a

string of numbers. Characterized by its intensity levels or scales of gray

which range from 0(black) to 255(white) Decompose the signal into a sequence of wavelet

coefficients w. Use threshold to modify the wavelet coefficients from

w to w’. Use quantization to convert w’ to a sequence q. Entropy encoding is applied to convert q into a

sequence e. 

 

Page 14: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Mathematical expression for DWTThe two-dimensional DWT of an image function of size may be expressed as

The image function is obtained through the 2-D IDWT, as given below

Page 15: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Results of DWT

As threshold value increases blurring of image continues to increase.

Page 16: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Advantages of JPEG 2000Reduced costs for storage and maintenance Smaller file size compared to uncompressed

TIFF One master replaces multiple derivatives Enhanced handling of large images Fast access to image subsets Intelligent metadata support Enables new opportunities

Page 17: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Comparison of JPEG and JPEG2000 Performance

Original Image JPEG JPEG2000

Compressed images at 1bpp

Page 18: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Comparison between DCT and DWT based on various performance parameters

The above Graphs shows that for DCT based image compression ,as the window size increases MSE increases proportionately whereas for DWT based image compression shows that MSE first decreases with increase in window size and then starts to increase slowly with finally attaining a constant value.

A) Mean Squared Error vs Window Size

Page 19: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Compression increases with increase in window size for DCT and decreases with increase in window size for DWT.

B) Compression vs Window Size

Page 20: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

Results and Conclusion DCT is used for transformation in JPEG standard. DCT

performs efficiently at medium bit rates. Disadvantage with DCT is that only spatial correlation of the pixels inside the single 2-D block is considered and the correlation from the pixels of the neighboring blocks is neglected. Blocks cannot be decorrelated at their boundaries using DCT.

DWT is used as basis for transformation in JPEG 2000 standard. DWT provides high quality compression at low bit rates. The use of larger DWT basis functions or wavelet filters produces blurring near edges in images.

DWT performs better than DCT in the context that it avoids blocking artifacts which degrade the reconstructed images. However, DWT provides lower quality than JPEG at the Low compression rates. DWT requires longer compression time

Page 21: Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards

THANK YOU!