38

Image Compression Standard

Embed Size (px)

Citation preview

Page 1: Image Compression Standard
Page 2: Image Compression Standard

Introduction to Image Compression JPEG standard Block diagram and Main Steps Transform RGB to YIQ or YUV DCT on image blocks Quantization Preparation for entropy coding Modes of operation in JPEG

Different JPEG standards

Conclusion

Page 3: Image Compression Standard

INTRODUCTION TO IMAGE COMPRESSION

application of Data Compression on Digital Images

the objective is to reduce redundancy of the image data

Image compression can be

For artificial images such as technical drawings, icons or comics, line drawings etc

•Suitable for natural images•Minor loss of fidelity

Where a higher compression ratio is required, lossy methods are usually adopted.

loselesslossy

Page 4: Image Compression Standard

Original Reconstructed

The compressed image is usually not same as the original image but is meant to form a close approximation to the original image perceptually.

Page 5: Image Compression Standard

JPEG STANDARD

JPEG stands for Joint Photographic Experts Group

It’s a compression standard for still color and gray-scale images, also known as ‘continuous tone image The JPEG standard specifies both the codec

JPEG compression are called “JPEG files”

The most common filename extensions are .jpg and .jpeg (.jpe, .jfif and .jif are also used)

•Wavelet based JPEG 2000•Lossless JPEG-LS•Bi-level image compression JBIG, JBIG2

Page 6: Image Compression Standard

Original (979 KB) JPEG (6.21 KB)

Page 7: Image Compression Standard
Page 8: Image Compression Standard

Coding Tables

HeaderTables

Data

DCT Quantization

Quantization Tables

Entropy

Coding

RLC

Zigzag

f (i,j)

To YIQ or YUVf (u,v)

AC

DC

8X8

DPCM

Page 9: Image Compression Standard

Y'= 0.299R' + 0.587 G' + 0.114 B'U= B'-Y' V=R'-Y'For Gray R'=G'=B' Y'= Gray value of R' as sum of coefficients is one, U and V are zero.

YIQ is a version of YUV with same Y' but with U and V rotated by 33 degree.

YUV and Y'UV a specific analog encoding of color information

YCbCr digital encoding of color information suited for video and still-image compression and transmission such as MPEG and JPEG

Y' = luma component (the brightness) U and V are the chrominance (color) components.

Page 10: Image Compression Standard

Color transform

Page 11: Image Compression Standard

Perform DCT on Image Blocks

DCT is a mathematical operation

Allows us to represent the signal with only a few data points in a frequency domain that would take lots of data points if represented in a time domain

Technique is on both color & Gray-scale image

When consider over 8X8 matrix of 64 values, each with x and y coordinates, we have a 3D representation or spatial domain.

Page 12: Image Compression Standard

Perform DCT on Image Blocks

Benefits: DCT is proven to be the optimal transformDCT is an orthogonal transformGood compression of the block Can be computed efficientlyDCT algorithm is symmetrical

Page 13: Image Compression Standard

Input matrix of DCT coefficients:

132 136 138 140 144 145 147 155

136 140 140 147 140 148 155 156

140 143 144 148 150 152 154 155

144 144 146 145 149 150 153 160

150 152 155 156 150 145 144 140

144 145 146 148 143 158 150 140

150 156 157 156 140 146 156 145

148 145 146 148 156 160 140 145

Page 14: Image Compression Standard

Output matrix of DCT coefficients:

172 -18 15 -8 23 -9 -14 19

21 -34 24 -8 -10 11 14 7

-9 -8 -4 6 -5 4 3 -1

-10 6 -5 4 -4 4 2 1

-8 -2 -3 5 -3 3 4 6

4 -2 -4 6 -4 4 2 -1

4 -3 -4 5 6 3 1 1

0 -8 -4 3 2 1 4 0

DC

Page 15: Image Compression Standard

DCT transform

Page 16: Image Compression Standard

Quantization

Heart of any lossy scheme

It is a process that attempts to determine what information can be safely discarded without a significant loss in visual fidelity

The DCT output matrix is quantized to reduce the precision of the coefficient.

JPEG algorithm includes a set of quantization tables, derived from extensive empirical experimentation

Quantized coefficient (i, j) = DCT (i, j) DCT coefficients Quantum (i, j) Quantized matrix

Page 17: Image Compression Standard

4 7 10 13 16 19 22 25

7 10 13 16 19 22 25 28

10 13 16 19 22 25 28 31

13 16 19 22 25 28 31 34

16 19 22 25 28 31 34 37

19 22 25 28 31 34 37 40

22 25 28 31 34 37 40 43

25 28 31 34 37 40 43 46

Quantum matrix Table:

Typiclly a JPEG quantum matrix has larger values in the lower half of the quantum matrix

Page 18: Image Compression Standard

43 3 2 0 0 0 0 0

3 3 2 0 0 0 0 0

1 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

DCT coefficients after quantization :.

Here the significant values are concentrated to the left and top of the matrix. After quantization most quantized DCT coefficients in 8X8 matrix are truncated to zero values

Page 19: Image Compression Standard

Preparation for Entropy Coding:•Run Length Encoding on ACs •DPCM on DCs

This pattern is designed to facilitate entropy coding by placing low frequency coefficients

Zigzag Sequence :RUN Length Coding on AC coefficients

Differential Pulse Code Modulation on DC Coefficient

Huffman Coding

Entropy coding

Page 20: Image Compression Standard

Modes of Operation in JPEG

• sequential encoding

• Progressive encoding

Sequential Encoding:Uses Huffman coding.Each block is encoded in a single left-to-right and top-to-bottom scan.

Progressive Encoding:Each scan follows the zigzag ordering, quantization and entropy coding, same as sequential encoding, but takes much less time to encode and decode.

Two forms of progressive encoding: (a) spectral selection approach (b) successive approximation approach

•Lossless encoding• •Hierarchical encoding

Page 21: Image Compression Standard
Page 22: Image Compression Standard
Page 23: Image Compression Standard
Page 24: Image Compression Standard
Page 25: Image Compression Standard
Page 26: Image Compression Standard

Lossless encoding :-:

Theoretically, it should have been possible to achieve

lossless encoding by eliminating the quantization block

Hierarchical encoding :-

•pyramidal encoding

•Finest resolution lowermost layer

•Reduced Resolution Successive

upper layers

Page 27: Image Compression Standard

Start of image End of imageFrame

Tables, etc ScanHeader Scan………

RestartSegmentHeaderTables etc Segment Restart ………

BlockBlock Block ………..

Page 28: Image Compression Standard

The JPEG2000 Standard :-

Addresses the problems like…•Low bit-rate compression

•Lossless and lossy compression

•Large images

•Single decompression architecture

•Transmission in noisy environments

•Computer generated imaginary

•Compound documents

.jp2 file extensionWavelet based

Page 29: Image Compression Standard

Original Image JPEG JPEG2000 Compressed images at 1bpp

Comparison of JPEG and JPEG2000 Performance

Page 30: Image Compression Standard

Compressed images at 0.25 bpp by means of (a) JPEG and (b) JPEG2000

Page 31: Image Compression Standard
Page 32: Image Compression Standard

After color transformation, the image is split into tiles

These tiles are then wavelet transformed to an arbitrary depth

irreversible reversible

The quantized sub-bands are split further into precincts

Precincts are split further into code blocks

EBCOT stands for Embedded Block Coding with Optimal Truncation Propagation, Magnitude Refinement, Cleanup pass

binary arithmetic coder The result is a bit-stream that is split into packets

Packets from all sub-bands are then collected in so-called layers

Page 33: Image Compression Standard

Applications

Page 34: Image Compression Standard

JPEG-LS

a simple and efficient baseline algorithm which consists of two independent and distinct stages called modeling and encoding

"near-lossless" image compression standard that could offer better compression efficiency than lossless JPEG

BILEVEL IMAGE COMPRESSION

Bi-Level (Black & White)

Multi-Level (Gray Scale)

•High Frequency •Very High Resolutions Will often contain text, halftone images and line-art

Page 35: Image Compression Standard

Conclusion

what we have achieved in this methodology is the reduction of large volume of data to a smaller version of what is really significant

The JPEG standard is designed to provide common methodology for compression of continuous tone of images.

Hence the need to efficiently process and store images in digital form has been fulfilled by image compression standard- JPEG

Page 36: Image Compression Standard

Fundamentals of Multimedia by Ze-Nian Li and Mark S DrewMultimedia Communication by Ze-Nian Li and Mark S DrewMultimedia Engineering-Wiley PublicationsMultimedia Communication by GibsonMultimedia Technologies for application –IEEE Press

Wikipedia and related websites as internet reference for images.

http://en.wikipedia.org/wiki/JPEGhttp://en.wikipedia.org/wiki/JPEG_2000http://cobweb.ecn.purdue.edu/~ace/jpeg-tut/jpegtut1.html

Bibliography

Page 37: Image Compression Standard

Bye------Thank You

Compressed Images at 0.125 bpp by means of (a) JPEG and (b) JPEG2000

Page 38: Image Compression Standard