Digital Image Processing-9
Digital Image Processing-9
Topics
Color Image Processing Color Models RGB YIQ HSI Image Compression Lossy and lossless methods Run length coding Entropy coding Arithmetic coding Jpeg coding
identifying objects
Human face detection License plate detection Content based image retrieval systems
Color Spectrum
Visible Wavelength
system The Y component represents the luma information, and is the only component used by black-and-white television receivers I and Q represent the chrominance information For example, applying a histogram equalization to a color image is done by Y component only
use rgb2ntsc
RGB = imread(sample.png'); YIQ = rgb2ntsc(RGB);
ntsc2rgb convert from YIQ to RGB Images can be displayed in RGB space only
equivalent to a gray scale conversion. However, you may also use rgb2gray either.
I=imread(test.bmp); YIQ = rgb2ntsc(I); imshow( YIQ(:,:,1))
Image Compression
Image Compression
Importance of Image Compression Typical image resolution/depth
1024 x 1024 x 24 Typical image size in bytes: 3 MB 30 fps, 720576 , 24 bits Typical video size for 1 minute: More than 2 GB
Data Redundancy
Redundancy in information theory is the number of
bits used to transmit a message minus the number of bits of actual information in the message.
Informally, it is the amount of wasted "space" used to
Data Compression
Data compression or source coding is the process of
encoding information using fewer bits (or other information-bearing units) than an un-encoded representation would use through use of specific encoding schemes.
Compression Methods
Lossless Methods Lossy Methods
same data value occurs in many consecutive data elements) are stored as a single data value and count. Useful in relatively simple graphic images such as icons, line drawings, and animations. Example, WWWWWWWWWWWWBWWWWWWWWWW WWBBBWWWWWWWWWWWWWWWWWW WWWWWWBWWWWWWWWWWWWWW is stored as : 12W1B12W3B24W1B14W
Entropy Coding
Entropy coding is a lossless coding method. Entropy coding creates variable length codeword. The
length of each codeword is approximately proportional to the negative logarithm of its probability. Huffman Coding Huffman coding is an entropy encoding algorithm used for lossless data compression. The term Entropy Coding refers to the use of a variable-length code table for encoding a source symbol
Arithmetic Coding
The output from an arithmetic coding process is a single
Example: a1a2a3a3a4
Example
Lossy Compressions
A lossy compression is a data compression method
which discards (loses) some of the data, in order to achieve a high compression rate, with the result that decompressing the data yields content that is different from the original one.
JPEG Standard
Steps followed in JPEG Color space transformation Down-sampling Block splitting Discrete cosine transform Quantization Run length and Entropy coding
YCbCr color space The compression is more efficient as the brightness information, which is more important to the eventual perceptual quality of the image, is confined to a single channel, more closely representing the human visual system.
Down Sampling
Due to the densities of color- and brightness sensitive
receptors in the human eye, humans can see considerably more fine detail in the brightness of an image (the Y component) than in the color of an image (the Cb and Cr components). Down-sample Cb and Cr components only 4:2:0
88 blocks of pixels.
Result of DCT
Quantization
Quantization is done by simply dividing each
component in the frequency domain by a constant for that component, and then rounding to the nearest integer
Quantization Results
Zig-Zag Scanning
of the zig-zag scan result. Trailing zeros are truncated by inserting an EOB symbol after the last non-zero value.
Questions?