210 likes | 453 Views
Digital Image Processing ECE.09.452/ECE.09.552 Fall 2009. Lecture 7 November 16, 2009. Shreekanth Mandayam ECE Department Rowan University http://engineering.rowan.edu/~shreek/fall09/dip/. Plan. Digital Image Compression Fundamental principles Image Compression Model
E N D
Digital Image ProcessingECE.09.452/ECE.09.552Fall 2009 Lecture 7November 16, 2009 Shreekanth Mandayam ECE Department Rowan University http://engineering.rowan.edu/~shreek/fall09/dip/
Plan • Digital Image Compression • Fundamental principles • Image Compression Model • Recall: Information Theory • Image Compression Standards • DCT (JPEG): Lossy • LZW (GIF, TIFF, ZIP): Lossless • Lab 4: Digital Image Compression • Discussion: Final Project
Fundamentals • Justification • Applications • Principle • Redundancy • Types • Lossy • Lossless • demos/demo6dithering/
Transform Quantize • Encode • Source • Channel f(x,y) Compression Model >>dct2 /demo10dct/dctdemo
Recall: Measures of Information • Definitions • Probability • Information • Entropy • Source Rate • Recall: Shannon’s Theorem • If R < C = B log2(1 + S/N), then we can have error-free transmission in the presence of noise MATLAB DEMO: http://engineering.rowan.edu/~shreek/spring09/ecomms/entropy.m
Analog Message A/D Converter Source Encoder Digital Source Recall: Source Encoding • Why are we doing this? Source Symbols (0/1) Source Entropy Encoded Symbols (0/1) Source-Coded Symbol Entropy
Source Encoding Requirements • Decrease Lav • Unique decoding • Instantaneous decoding
Recall: Huffman Coding 2-Step Process • Reduction • List symbols in descending order of probability • Reduce the two least probable symbols into one symbol equal to their combined probability • Reorder in descending order of probability at each stage • Repeat until only two symbols remain • Splitting • Assign 0 and 1 to the final two symbols remaining and work backwards • Expand code at each split by appending a 0 or 1 to each code word • Example m(j) A B C D E F G H P(j) 0.1 0.18 0.4 0.05 0.06 0.1 0.07 0.04
Information Concentration Data Compaction Feature Extraction Discrete Cosine Transform Discrete Cosine Transform >>dct2 /demo10dct/dctdemo
Laser Based Ultrasound* *Karta Technologies Inc., San Antonio, TX
Example: Photothermal Shearography Images Before Deformation - After Deformation = Fringe Pattern Sample 10 0.254 mm depth -605.36 MPa stress
1 2 3 4 5 1 2 3 4 5 Preprocessing Fringe Pattern DCT Coefficients Zonal Mask DCT (1,1) (1,2) (2,1) (2,2) . . . Artificial Neural Network Feature Vector
JPEG Compression Standard Compute DCT F(u,v) Reorder to form 1-D Sequence Level Shift f(x,y) Normalize Compute DC Coefficient Compute AC Coefficients http://www.jpeg.org/
LZW Algorithm Initialize string table with single character strings Read first input character = w Read next input character = k y No more k’s? Stop Output = code(w) n y wk in string table? w = wk n Output = code(w) Put wk in string table w = k United States Patent No. 4,558,302, Patented by Unisys Corp.
Karhunen-Loeve (Hotelling) Transform Hotelling transform of x • demos/demo7klt/
Lab 3: Digital Image Restoration http://engineering.rowan.edu/~shreek/fall09/dip/lab3.html
Lab 4: Digital Image Compression http://engineering.rowan.edu/~shreek/fall09/dip/lab4.html