comparision of lossy and lossless image compression using various algorithm

28
COMPARISON OF LOSSY AND LOSSLESS IMAGE COMPRESSION USING VARIOUS ALGORITHM E.CINTHURIYA -ME 828106403001

Transcript of comparision of lossy and lossless image compression using various algorithm

Page 1: comparision of lossy and lossless image compression using various algorithm

COMPARISON OF LOSSY AND LOSSLESS IMAGE COMPRESSION USING VARIOUS ALGORITHM

E.CINTHURIYA -ME828106403001

Page 2: comparision of lossy and lossless image compression using various algorithm

IMAGE COMPRESSION

• Image compression is minimizing the size in bytes of a graphics file without degrading the quality of the image to an unacceptable level .

• The reduction in file size allows more images to be stored in a given amount of disk or memory space. It also reduces the time required for images to be sent over the Internet or downloaded from Web pages.

• Image Compression is used in the field of Broadcast TV, Remote sensing , Medical Images.

2/28comparison of lossy and lossless compression

Page 3: comparision of lossy and lossless image compression using various algorithm

IMAGE COMPRESSION

Image encoder

Original image262144 bytes

Compressed bit stream00111000001001101…(2428 Bytes)

Imagedecoder

Compression ratio (CR) = 108:1 3/28comparison of lossy and lossless compression

Page 4: comparision of lossy and lossless image compression using various algorithm

NEED OF IMAGE COMPRESSION

Image compression techniques are of prime importance for reducing the amount of information needed for the picture without losing much of its quality.

To reduce the size of stored

Transmitted files to manageable sizes

To reduce the time it would take to transmit these files to another computer.

4/28comparison of lossy and lossless compression

Page 5: comparision of lossy and lossless image compression using various algorithm

TYPES IMAGE COMPRESSION

Image compression can be performed by two ways:-Lossy CompressionLossless Compression

Lossless Compression the data is compressed without any loss of data.

Lossy Compression it is assumed that some loss of information is acceptable. Is suitable for natural image.

5/28comparison of lossy and lossless compression

Page 6: comparision of lossy and lossless image compression using various algorithm

HOW TO ACHIEVE COMPRESSION?

• Minimizing the redundancy in the image.

Redundancy

Interpixel psycho visual codingRedundancy Redundancy Redundancy

6/28comparison of lossy and lossless compression

Page 7: comparision of lossy and lossless image compression using various algorithm

IMAGE COMPRESSION SCHEM

Image compression schem

Pixel Prediction Transform Hybrid Run length DPCM DC JPEG Huffman ADPCM DWT JPEG 2000 DM

7/28comparison of lossy and lossless compression

Page 8: comparision of lossy and lossless image compression using various algorithm

LOSSLESS COMPRESSION With lossless compression, data is compressed without any loss of

data. It assumes you want to get everything back that you put in i.e., we

can reconstruct a perfect reproduction of the original from the compression.

Lossless compression ratios usually only achieve a 2:1 compression ratio.

Useful for text, numerical data, use of scanners to locate details in images, etc. where there is a precise meaning for the data.

Even for images or other perceived signals, lossless compression is sometimes required, particularly for legal documents, medical images,

8/28comparison of lossy and lossless compression

Page 9: comparision of lossy and lossless image compression using various algorithm

LOSSY COMPRESSION

With lossy compression, it is assumed that some loss of information is acceptable.

When we reconstruct the information from the compressed data, we get something close to but not exactly the same as the

original.Lossy compression can provide compression ratios of 100:1 to 200:1,

depending on the type of information being compressedLossy compression techniques are often "tunable" in that you can

turn the compression up to improve throughput, but at a loss in quality.

Lossy compression is very useful for images, audio signals, orother information that is perceived through our senses.

9/28comparison of lossy and lossless compression

Page 10: comparision of lossy and lossless image compression using various algorithm

DIFFERENCE BETWEEN LOSSLESS & LOSSY IMAGES

Lossless image Lossy image

10/28comparison of lossy and lossless compression

Page 11: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

FORMAT NAME CHARACTERISTICSBMP Windows bitmap Lossy : Uncompressed format

TIFF Tagged Image File Format

Lossless: Document scanning and imaging format. Flexible: LZW, CCITT, RLE.

PNG Portable Network Graphics

Lossless: Improve And Replace Gif, Superior To Tiff

JPEG Joint Photographic Experts Group

Lossy : Big Compression Ratio, Good For Photographic Images

JPEG 2000 Joint Photographic Experts Group 2000

Lossy : Eventual replacement for JPEG

FIVE DIFFERENT FORMATS

11/28

Page 12: comparision of lossy and lossless image compression using various algorithm

PARAMETERS FOR COMPARISON

• COMPRESSION RATIO

The compression ratio is given by:

Size of original image dataSize of compressed image dataCR =

12/28comparison of lossy and lossless compression

Page 13: comparision of lossy and lossless image compression using various algorithm

PARAMETERS FOR COMPARISON

•MSE:

Mean square error is defined as the measure of average of square of ratio of estimator output to the estimated output. it is also known as the rate of distortion in the retrieved image.MSE is the power of the corrupted noise signal. Mean square error is given in decibels by

13/28comparison of lossy and lossless compression

Page 14: comparision of lossy and lossless image compression using various algorithm

PARAMETERS FOR COMPARISON

• SNR:

The standardized quantity of measuring the image quality is the signal-to-noise ratio. It is given by ratio of the power of the signal to the power of noise in the signal.

SNR is given in decibels by

14/28comparison of lossy and lossless compression

Page 15: comparision of lossy and lossless image compression using various algorithm

PARAMETERS FOR COMPARISON

• PSNR:

The most common case of representing the picture of the input image is given by the Peak value of SNR.

It is defined as the ratio of the maximum power of the signal to the power of the corrupted noise signal.

15/28comparison of lossy and lossless compression

Page 16: comparision of lossy and lossless image compression using various algorithm

PROPOSING SYSTEM

Title : comparison of lossy and lossless image compression using various algorithm

Algorithm : Fractal image compression algorithm and LZW

Format : BMP , TIFF - lossless image compression PNG , JPEG - lossy image compression

Parameters SNR , PSNR , MSE , CRCompared :

16/28comparison of lossy and lossless compression

Page 17: comparision of lossy and lossless image compression using various algorithm

LWZ ALGORITHM LWZ is Dictionary-based Coding algorithm . The LZW algorithm is named after the scientists Lempel, Ziv and

Welch. It is a simple dictionary based algorithm used for the lossless compression of images.

LZW uses fixed-length code words to represent variable-length strings of symbols/characters that commonly occur together, e.g., words in English text.

The LZW encoder and decoder build up the same dictionary dynamically while receiving the data.

LZW places longer and longer repeated entries into a dictionary, and then emits the code for an element, rather than the string itself, if the element has already been placed in the dictionary.

17/28comparison of lossy and lossless compression

Page 18: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

Example 1: Compression using LZW

Encode the string BABAABAAA by the LZW encoding algorithm.

1. BA is not in the Dictionary; insert BA, output the code for its prefix: code(B)2. AB is not in the Dictionary; insert AB, output the code for its prefix: code(A)3. BA is in the Dictionary. BAA is not in Dictionary; insert BAA, output the code for its prefix: code(BA)4. AB is in the Dictionary. ABA is not in the Dictionary; insert ABA, output the code for its prefix: code(AB)5. AA is not in the Dictionary; insert AA, output the code for its prefix: code(A)6. AA is in the Dictionary and it is the last pattern; output its code: code(AA)

The compressed message is: <66><65><256><257><65><260> 18/28

Page 19: comparision of lossy and lossless image compression using various algorithm

MERITS OF LWZ

• LZW algorithm is capable ofproducing compressed images without having an effect on the quality of the image.

• It computationally fast algorithmand is very effective, since the decompression does not need the strings to be passed to the table

19/28comparison of lossy and lossless compression

Page 20: comparision of lossy and lossless image compression using various algorithm

FRACTAL IMAGE COMPRESSION• The Fractal image compression is given by Integrated Function

System (IFS).• In this method it has a source image and the designation image.

The source image is known as the attractor. The designation image is the output or the recreated image.

• At first the image is partitioned into small parts which are known as blocks. Those subdivided blocks should not overlap with other blocks. Each destination block is to be mapped with other block which is assembled after the removal of repeated bits.

• This has the basic approaches needed to compress the image known as contacting transformation.

• Then by dividing and contacting the image by a transformation it is named as fractal transformation or fractal decomposition 20/28comparison of lossy and lossless compression

Page 21: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

FRACTAL IMAGE COMPRESSION

Let us start by scanning every point in the rectangular plane

Each point represents a Complex number (x + iY). Iterate that complex number:-

[new value] = [old-value]^2 + [original-value]

While keep tracking of two things:1). The number of iterations2). The distance of [new-value] from Origin.If you reach the max. number of iterations, then you are done with iterations.

21/28

Page 22: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

FRACTAL IMAGE COMPRESSION

In the diagram above, the functions are represented by their effect on a square (each function transforms the outlined square into the shaded square). Both functions are applied to the input image and a union of the resulting images is formed in each iteration. First three iterations are shown, and then the final image (fixed point) after several iterations

22/28

Page 23: comparision of lossy and lossless image compression using various algorithm

MERITS OF FRACTAL IMAGE COMPRESSING

• the image in a contractive form. Fractal compression is a recent method on lossy compression based on the use of fractals which degrades the likeliness of different parts of an image.

23/28comparison of lossy and lossless compression

Page 24: comparision of lossy and lossless image compression using various algorithm

ADVANTAGES OF IMAGE COMPRESSION

Less disk space (more data in reality). Faster writing and reading. Faster file transfer. Variable dynamic range. Byte order independent.

24/28comparison of lossy and lossless compression

Page 25: comparision of lossy and lossless image compression using various algorithm

DISADVANTAGES OF IMAGE COMPRESSION

Added complication. Effect of errors in transmission. Slower for sophisticated methods (but simple

methods can be faster for writing to disk).

Need to decompress all previous data.

25/28comparison of lossy and lossless compression

Page 26: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

26

REFERENCES[1] Lossy and lossless compression using combinational methodsMs. C.S Sree Thayanandeswari,M.E, MISTE, Assistant Professor, Department of ECE, PET Engineering College, Vallioor.

[2] Lossless Image Compression Techniques Comparative StudyWalaa Z. Wahba1, Ashraf Y. A. Maghari

[3] A. Kumar and A. Makur, “Lossy compression of encrypted imageby compressing sensing technique,” in Proc. IEEE Region 10 Conf.(TENCON 2009), 2009, pp. 1–6.

[4] Image Compression- Surovit Roy, Rahul Virmani, Honey Soni,Prof. Sachin Sonawane

[5] google search and wikipedia search .

Page 27: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

27

Page 28: comparision of lossy and lossless image compression using various algorithm

comparison of lossy and lossless compression

28