Image Compression

Post on 06-May-2015

2866 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presentation given in the Seminar of B.Tech 6th Semester during session 2009-10 By Paramjeet Singh Jamwal, Poonam Kanyal, Rittitka Mittal and Surabhi Tyagi.

Transcript

ImageCompression

Paramjeet Singh JamwalPoonam Kanyal

Rittika MittalSurbhi Tyagi

B.Tech (EEE) 2007-2011

B.Tech (6th Semester)Electrical & Electronics Engineering

College Of Engineering Roorkee

Contents ...

Advantages /Disadvantages of Image Processing

Applications of Image Processing

DCT v/s DWT

JPEG Compression Algorithm

Lossless Compression

Lossy Compression

Image Compression

What is Image Compression ?

Application of data compression on digital images Reduce redundancy of the image data

Store data efficiently

Transmit data efficiently

Benefits of Image Compression

Lossy Compression

Decompression retrieves data different from the original

Used to compress multimedia data

Streaming media and internet telephony

Methods

JPEG TIFF MNG PGF

Original Image Before Compression

Decompressed Image After Compression

Before Compression

Size Colour UsedImage

After Compression

186 KB

26 KB

57053

31760

Lossless Compression

Exact reconstruction of original data

Executable programs and source codes

Data loss cant be tolerated

Methods

JPEG2000

GIF PNG TIFF

Original Image Before Compression

Decompressed Image After Compression

Before Compression

Size Colour UsedImage

After Compression

186 KB

136 KB

57053

57053

What is JPEG ?

Stands for Joint Photographics Experts Group

Lossy compression method

Mostly used by digital cameras & web usage

Not suited for drawing , textual and iconic graphics

Basics of JPEG Compression Human vision is insensitive to high spatial frequencies

JPEG Takes advantage of this by compressing high frequencies more coarsely and storing image as frequency data

Losslessly compressed image, 150KB

JPEG compressed, 14KB

The JPEG Compression Algorithm

8x8 pixelblocks

FDCT

Frequency Dependent quantization

Zig-zag scan

RLE HuffmanEncoding

Quantization Table

output

Divide image into 8x8 pixel blocks Apply 2D Fourier Discrete Cosine Transform

(FDCT) Transform Apply coarse quantization to high spatial

frequency components Compress resulting data losslessly and store

The JPEG File StructureShort name Bytes Size Name

SOI 0xFFD8 none Start Of Image

SOF0 0xFFC0 variable size Start Of Frame (Baseline DCT)

SOF2 0xFFC2 variable size Start Of Frame (Progressive DCT)

DHT 0xFFC4 variable size Define Huffman Table(s)

DQT 0xFFDB variable size Define Quantization Table(s)

DRI 0xFFDD 2 bytes Define Restart Interval

SOS 0xFFDA variable size Start Of Scan

RSTn 0xFFD0 … 0xFFD7 none Restart

APPn 0xFFEn variable size Application-specific

COM 0xFFFE variable size CommentEOI 0xFFD9 none End Of Image

1/7 : Divided into 8x8 blocks

1/7 : Divided into 8x8 blocks

2/7 : Convert RGB to YCbCr

Simple color space model: [R,G,B] per pixel

JPEG uses [Y, Cb, Cr] Model

Y (Brightness) = 0.299R + 0.587G + 0.114B

Cb (Color blueness) = -0.1687R - 0.3313G + 0.5B + 128

Cr (Color redness) = 0.5R - 0.4187G - 0.0813B + 128

2/7 : Convert RGB to YCbCr

3/7 : Downsampling ( optional ) Y is taken every pixel , and Cb,Cr are taken for a block of 2x2 pixels

MCU(minimum coded unit) : The smallest group of data units that is coded.

Data size reduces to a half immediately

4/7 : Apply DCT [ Discrete Cosine Transformation ]

2D DCT:

1D DCT:

4/7 : Apply DCT [ Discrete Cosine Transformation ]

Shift operations

From [0, 255]

To [-128, 127]

DCT Result

5/7 : Quantization

Luminance Quantization Matrix Chrominance Quantization Matrix

Each DCT coefficient F(u, v) is divided by the corresponding quantizer step-size parameter Q(u, v) in the quantization matrix and rounded

to the nearest integer as

5/7 : Quantization [ Quality Factor ]

Quality of the reconstructed image and the achieved compression can be controlled by a user by selecting a quality factor [ Q_JPEG ] :

Q_JPEG ranges between 1 to 100

When Q_JPEG is used, the entries in tables in previous slide is scaled by the factor alpha (α), defined as :

Q_JPEG is 100 for best reproduction

5/7 : Quantization

DCT result Quantization Matrix

Quantization result

6/7 : Zigzag reordering & RLE

Quantization result

7/7 : Huffman encoding

RLC result:[0, -3] [0, 12] [0, 3]......EOB

After group number added:[0,2,00b] [0,4,1100b] [0,2,00b]...... EOB

First Huffman coding (i.e. for [0,2,00b] ): [0, 2, 00b] => [100b, 00b]

Input : 512 bits Output : 113 bits% Red : 22.07 %

Values G Real saved values

0-1, 1

-3, -2, 2, 3-7,-6,-5,-4,5,6,7

.

.

.

.

.

.

.

.

.-32767..32767

012345.......

15

.0,1

00, 01, 10, 11000,001,010,011,100,101,110,111

.

.

.

.

.

.

.

.

.

JPEG Compression Ratio

500KB image, minimum

compression

40KB image, half

compression

11KB image, max

compression

Effects of varying JPEG Compression Ratio

Uncompressed image Half compression,Blurring around sharp

edges

Max compression, 8-pixel blocks apparent, large distortion in high-

frequency areas

DWT v/s DCT

Images containing sharp edges/continuous curves

Uses more optimal set of functions to represent sharp edges

Wavelets are finite in extent Different families of wavelets

DWT v/s DCT

Wavelet compressionfile size: 1861 bytescompression ratio - 105.6

JPEG compression file size: 1895 bytescompression ratio - 103.8

Source: http://www.barrt.ru/parshukov/about.htm.

Applications of Image Processing

Computer Vision

Optical Sorting

Face Detection

Feature Detection

Augmented Reality

Remote Sensing

Medical Image Processing

Advantages/Disadvantages of Image ProcessingAdvantages

Post-processing

Easy Storage

Easy Sharing

Easy Retrieval

Environment Friendly

Multiple Use

DisadvantagesHigh cost

Extra Knowledge

High Maintenance

Standardization

Shape/Size of detectors

Any

QUESTIONS ?

THE END !!!

info4eeeAn initiative for B.Tech (EEE) Student

FOR MORE

INFORMATION FOR ELECTRICAL & ELECTRONICS ENGINEERING

VISIT

INFO4EEE.WEEBLY.COM

top related