Upload
sahana-balkal
View
814
Download
0
Embed Size (px)
Citation preview
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
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
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.
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
Original (979 KB) JPEG (6.21 KB)
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
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.
Color transform
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.
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
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
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
DCT transform
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
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
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
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
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
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
Start of image End of imageFrame
Tables, etc ScanHeader Scan………
RestartSegmentHeaderTables etc Segment Restart ………
BlockBlock Block ………..
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
Original Image JPEG JPEG2000 Compressed images at 1bpp
Comparison of JPEG and JPEG2000 Performance
Compressed images at 0.25 bpp by means of (a) JPEG and (b) JPEG2000
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
Applications
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
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
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
Bye------Thank You
Compressed Images at 0.125 bpp by means of (a) JPEG and (b) JPEG2000