Image Compression Model

34
(C)Lotus Argue Creation IMAGE IMAGE COMPRESSION COMPRESSION MODEL MODEL SUBMITTED BY- SUMANT A KUMAR DAS 0701218126 INFORMA TION TECHNOLOGY P.I.E.T 8 TH SEM

Transcript of Image Compression Model

Page 1: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 1/34

(C)Lotus Argue Creation

IMAGEIMAGE

COMPRESSIONCOMPRESSIONMODELMODEL

SUBMITTED BY-

SUMANTA KUMAR DAS

0701218126

INFORMATION TECHNOLOGY

P.I.E.T

8TH

SEM

Page 2: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 2/34

(C)Lotus Argue Creation

AGENDAAGENDA

y What is Image Compression?

y Why Image Compression?

y Image compression model

y Lossless and lossy compression

y Image Format

y JPEG Encoding

y Hoffman encoding

y Run length enoding

y conclusion

Page 3: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 3/34

(C)Lotus Argue Creation

What is Image Compression?What is Image Compression?

y A technique used to reduce the volume of 

information to be transmitted about an image

M

Width1 Unit

M

1/2

D

Height

1 Unit

1/2

M=Number 

of Samples

D=Spacing

BetweenSamples

Page 4: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 4/34

(C)Lotus Argue Creation

What is Image Compression?What is Image Compression?

(cont«.)(cont«.)y The goal of image compression is to

reduce the amount of data required to

represent a digital image.

y Important for reducing storage

requirements and improving

transmission rates.

Page 5: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 5/34

(C)Lotus Argue Creation

Why image compression?Why image compression?

y Requirements may outstrip the anticipatedincrease of storage space and bandwidth

y For data storage and data transmission

DVD Real time applications

Printer

y Take advantage of :

Spatial redundancy Temporal redundancy (videos)

Page 6: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 6/34

(C)Lotus Argue Creation

Image Compression

y Reducing the size of image data files

y While retaining necessary information

Original

Image

Compressed

Image file

extracted

Image filecompress decompress

Page 7: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 7/34

(C)Lotus Argue Creation

Compression System Model

y Compression

Input Preprocessing EncodingCompressed

File

OutputPostprocessingDecodingCompressedFile

� Decompression

Page 8: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 8/34

(C)Lotus Argue Creation

Image Compression Model

Page 9: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 9/34

(C)Lotus Argue Creation

Image Compression Model

(cont·d)

y

y Mapper: transforms the input data into a

format that facilitates reduction of interpixel

redundancies.

Page 10: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 10/34

(C)Lotus Argue Creation

Image Compression Model

(cont·d)

y

y Quantizer: reduces the accuracy of the

mapper·s output in accordance with some pre-

established fidelity criteria.

Page 11: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 11/34

(C)Lotus Argue Creation

Image Compression Model

(cont·d)

y

y Symbol encoder: assigns the shortest code

to the most frequently occurring output

values.

Page 12: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 12/34

(C)Lotus Argue Creation

Image Compression Models

(cont·d)

y

The inverse operations are performed.

y But « quantization is irreversible in

general.

Page 13: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 13/34

(C)Lotus Argue Creation

Lossless orLossless or LossyLossy CompressionCompression

y Lossless compression

There is no information loss, and the image can bereconstructed exactly the same as the original

e.g RLE

Applications: Medical imagery, Archiving

y Lossy compression

Information loss is tolerable

e.g JPEG 2000

Applications: commercial distribution (DVD) and rateconstrained environment where lossless methods cannot provide enough compression ratio

Page 14: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 14/34

(C)Lotus Argue Creation

Original image

 Approximation of the

original image

Compact information (for 

storage or transmission)

Lossycompression

Lossless

compression

encoding

decoding

Page 15: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 15/34

(C)Lotus Argue Creation

Bitmap FormatBitmap Format

y Files with .bmp extension

y Each pixel is represented by a fixed number of 

bits (integral power of 2)

y A typical BMP file usually contains the followingblocks of data:

o BMP Header Stores general information

o Bitmap Information Stores detailed information

o Color Palette Stores the definition of the colors

o Bitmap Data Stores the actual image, pixel by pixel.

Page 16: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 16/34

(C)Lotus Argue Creation

Graphics Interchange FormatGraphics Interchange Format

y 256 colors out of a palette of 224 colors are

indexed

y Amongst the oldest formats available

y Supports animationsy Supports transparency and interlacing

Page 17: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 17/34

(C)Lotus Argue Creation

Portable Network Graphics FormatPortable Network Graphics Format

y Developed to improve upon and replace GIF

y Supports 2D interlacing, transparency and

variable color depth

y Uses lossless data compression method calledDEFLATE

y Support transparency

Page 18: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 18/34

(C)Lotus Argue Creation

 JPEG JPEG

y Joint Photographic Expert·s Group

y International standard for photographs

y Lossless/lossy

y Based on the facts that :

Humans are more sensitive to lower spatial

frequency components

A large majority of useful image contentschange relatively slowly across images

Page 19: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 19/34

(C)Lotus Argue Creation

 JPEG Encoding JPEG Encoding

Cr

YCb Quantization

Fq(u, v)

DPCM

RLC

Entropy

Coding

Header 

Tables

Data

Coding

Tables

Quant«

Tables

F(u, v)

8 x 8

DCTf(i, j)

8 x 8

Zig Zag

Scan

Page 20: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 20/34

(C)Lotus Argue Creation

Steps involved :Steps involved :

y images are Divided into 8x8 blocks

y Each 8x8 block subject to DCT followed by

quantization

y Zig-zag scany DC coefficients stored using DPCM (digital

PCM)

y RLE used for AC coefficients

y Huffman encoding

y Frame generation

Page 21: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 21/34

(C)Lotus Argue Creation

. . .

1x64

0 0 0 0 0 1 1 0 0 0 0 0

5,1

0 0

7,2

0 . . .2

45

54

48

45

9

-6

1x64

1x64

1x64

1x64

1x64

1x64

a. Zig-zag scan

b. DPCM of DC

coefficientsc. RLE of AC

coefficientsa.

b.

c.

Page 22: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 22/34

(C)Lotus Argue Creation

DecodingDecoding

y Same steps as encoding are performed in

reverse

AdvantagesAdvantages� Compression ratios of 20:1 are easily attained

� 24-bits per pixel can be used leading to better

accuracy� Progressive JPEG(interlacing)

Page 23: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 23/34

(C)Lotus Argue Creation

DisadvantagesDisadvantages

� Doesn·t support transparency

� Doesn·t work well with sharp edges, they

tend to blur unless high resolution is used

� Almost always lossy

Page 24: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 24/34

(C)Lotus Argue Creation

y Huffman coding is based on statistical methods

and assigns variable length codes.

y It uses Binary encoding tree representing

commonly occurring values in few bits and less

commonly occurring values in more bits

Huffman Coding

Page 25: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 25/34

(C)Lotus Argue Creation

Huffman Code: Example

Symbol Frequency

A 24

B 12

C 10

D 8

E 8 ----> total 186 bits (with 3

bit per code word)

62

Page 26: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 26/34

(C)Lotus Argue Creation

Code Tree according to Huffman

Page 27: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 27/34

Page 28: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 28/34

(C)Lotus Argue Creation

Run-Length Coding

y Counting the number of adjacent pixels

with the same gray-level value

y Used primarily for binary image

y Mostly use horizontal RLC

Page 29: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 29/34

(C)Lotus Argue Creation

Run-Length Coding(cont)

Binary Image 8X8

00000000

00101111

01100100

01001110

00111110

00000110

00001111

00000000

horizontal horizontal 

1st Row 8

2nd Row 0,4,4

3rd Row 1,2,5

4th Row 1,5,2

5th Row 1,3,2,1,1

6th Row 2,1,2,2,1

7th Row 0,4,1,1,2

8th Row 8

Page 30: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 30/34

(C)Lotus Argue Creation

Run-Length Coding(cont)

y Extending basic RLC to gray-level image byusing bit-plane coding

y It will better if change the natural code intogray code

1

0

1 00

0110

11

00

0111

10

 Natural Gray Code

Page 31: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 31/34

(C)Lotus Argue Creation

ConclusionConclusion

y So image compression helps to reduce the sizeof image and make compatible for storage

y Best tool for transmission image over internet

y

Image compression has less chance of loss of the image data

y Remove redundancies in image configuration

Page 32: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 32/34

(C)Lotus Argue Creation

References :References :

y [1]. M. Shapiro, ́ Embedded image coding using zerotrees

of wavelet coefficientsµ, IEEE Transactions on Signal

y Processing, vol 41, pp 3445-3462, Dec 93.

y [2] Pankaj N. Topiwala, ́ Wavelet image and video

compressionµ, 1998 Edition

y [3] Google search

y [4] Dr.Muhammad Younis Javed and Mr.Abid

Nadeem,µData Compression Through Huffman

Codingµ,IEEE 2000, Vol 2, pp.187-190.

Page 33: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 33/34

(C)Lotus Argue Creation

QUERIES?

Page 34: Image Compression Model

8/7/2019 Image Compression Model

http://slidepdf.com/reader/full/image-compression-model 34/34

(C)Lotus Argue Creation

THANK YOUTHANK YOU