IMAGE Compression
IMAGE Compression
IMAGE Compression
Image and Video Formats GIF, TIFF, SIF, CIF, QCIF Image compression: READ, JPEG Video Compression: Principles-I,B,P frames, Motion estimation, Motion compensation, H.261, MPEG standard
All types of images are displayed ( and printed ) in the form of a two dimensional matrix of individual picture elements known as pixels or some time pels. For example VGA ( video graphics array ) is a common type of display and , so we show in fig , consists of a matrix of 640 horizontal pixels by 480 vertical pixels with, for example 8 bits per pixel which allows each pixel to have one of 256 different colors.
The graphics interchange format is used extensively with the Internet for the representation and compression of graphical images
reduces the number of possible colours that are present by choosing 256 entries from the original set of 224 colours that match closely to the original image Hence instead of sending as 24-bit colour values only 8-bit index to the table entry that contains the closest match to the original is sent. This results in a 3:1 compression ratio The contents of the table are sent in addition to the screen size and aspect ratio information The image can also be transferred over the network using the interlaced mode.
transferred over the network in an interlaced mode; useful over either low bit rate channels or the Internet which provides a variable transmission rate
The compression image data is organized so that the decompressed image is built up in a progressive way as the data arrives
RGB - 24 or 48 bits, 16 bits are used for each R,G,B colors For TIF files, most programs allow either no compression or LZW compression Code number indicates particular format Code 1- uncompressed format Codes 2,3,4- digitized format
Color Signals Three properties of a color -Brightness: amount of energy that stimulates the eye - Hue (Tint):actual color of source(each color-different freq) - Saturation: represents strength of the color. Color production: an equation of R, G, and B - 0.299 R + 0.587 G + 0.114 B where, 0.299+0.587+0.114=1 Luminance refers to the brightness of a source, the hue & the saturation called, chrominance characteristics -say, luminance Ys = 0.299 Rs + 0.587 Gs + 0.114 Bs Ys: magnitude of luminance signal Rs, Gs, Bs: magnitudes of three major colors Two color difference signals: Blue chrominance Cb and Red chrominance Cr Cb = Bs-Ys, Cr = Rs -Ys
11
Chrominance Components Composite Video Signal for Transmission - Ys, Cb, and Cr signals are combined together and signal differences are scaled down before transmission In PAL - Y = 0.299 R + 0.587 G + 0.114 B - U(Cb) = 0.493(B-Y) = -0.147R-0.289G+0.437B - V(Cr ) = 0.877(R-Y) = 0.615R-0.515G-0.1B In NTSC - Y = 0.299 R + 0.587 G + 0.114 B - I(Cb) = 0.74(R-Y)-0.27(B-Y) = 0.599R-0.276G-0.324B - Q(Cr ) = 0.48(R-Y)+0.41(B-Y) = 0.212R-0.528+0.311B
12
Advantages of DV Easy to store in computer Easy to edit and integrate with other types Easy to digitize three RGB component signals The resolution of eyes are less sensitive for color than it is for luminance. Hence, two chrominance signals can tolerate a reduced resolution Transmission bandwidth is achieved by using the luminance and two color difference signals, instead of the RGB signals directly. CCIR-601 Recommendations: standard for the digitization of video pictures
13
4:2:2 format(CCIR-601)
Y Cb Cr
Orthogonal samplingLine sampling rate: Line sampling rate: 52 10-6 13.5 106 = 702 samples/line 52 10-6 6.75 106 = 351 samples/line In reality, 720 samples/line In reality, 360 samples/line 4Y samples for every 2Cb and 2Cr samples(4:2:2)
14
e 5-lin 62
6 Line sampling rate: 13.5sps for Y & 6.75sps for both Cb & Cr
Bits per sample: 8 bits Bit rate per line = 13.5 106 8 + 2 (6.75 106 8) = 216Mbps Bits per line = 720 8 + 6 (360 8) = 11.52Kbits 2 ts 57 5Mbi Bits per frame = 480 11.52 = 5.5296Mbits 6.6355 Bits for 1.5 hrs Video assuming 60 refresh rate = 5.5296 60 1.5 3600 50 3555 6.6 = 223.9488GBytes
15
4:2:0 Format
used in Digital Broadcast Applications interlaced scanning with the absence of chrominance samples in alternative lines 525-line system Y = 720 480(the same as 4:2:2 format), Cb = Cr = 360 240 625-line system Y = 720 576, Cb = Cr = 360 288 bit rate per line: 13.5 106 8 + 2 (3.375 106 8) = 162Mbps
HDTV Format
used in High-Definition Television (four times bit rate) 4/3 1440 1152 pixels(50/60 Hz refresh rate) & 16/9 wide-screen 1920 1152 pixels(25/30 Hz) with # of visible lines per frame 1080
16
525-line system Y = 360 240, Cb = Cr = 180 120 625-line system Y = 360 288, Cb = Cr = 180 144 bit rate per line 6.75 106 8 + 2 (1.6875 106 8) = 81Mbps
17
PC Video Digitization
Digitization System Spatial Resolution Format 4:2:2 525-line Y = 640 480, Cb = Cr = 320 240 625-line Y = 768 576, Cb = Cr = 384 288 SIF 525-line 625-line Y = 320 240, Cb = Cr = 160 240 Y = 384 288, Cb = Cr = 192 144 Y = 384 288, Cb = Cr = 192 144 Y = 192 144, Cb = Cr = 96 72 Temporal Resolution 60Hz 50Hz 30Hz 25Hz 30Hz 15/7.5Hz
CIF QCIF
- Video capture board or S/W required - All PC monitors use progressive (non-interlaced) scanning
20
Since FAX machines are used with public carrier networks, the ITU-T has produced standards relating to them
These are T2(Group1), T3 (Group2), T4 (Group3) (PSTN), and T6 (Group 4) (ISDN) Both use data compression ratio in the range of 10:1 The resulting codewords are grouped into terminationcodes table (white or black run-lengths from 0 to 63 pels in steps of 1) and the make-up codes table (contains in multiples of 64 pels) Since this codeword uses two sets of codeword it is known as the modified Huffman codes
ITU T Group 3 and 4 facsimile conversion codes: make-up codes Make-up of 64 codewords
Each scanned line is terminated with an EOL code. In this way the receiver fails to decode a word it starts to search for an EOL pattern
If it fails to decode an EOL after a preset number of lines it aborts the reception process and informs the sending machine A single EOL precedes the end of each scanned line and six consecutive EOLs indicate the end of each page The T4 coding is known as one-dimensional coding
The modified-modified relative element address designate coding explores the fact that most scanned lines differ from the previous line by only a few pels
E.g. if a line contains a black-run then the next line will normally contain the same run pels plus or minus 3 pels In MMR the run-lengths associated with a line are identified by comparing the line contents, known as the coding line (CL), relative to the immediately preceding line known as the reference line (RL) The run lengths associated with a coding line are classified into three groups relative to the reference line
Pass mode
This is the case when the run-length in the reference line(b1b2) is to the left of the next run-length in the coding line (a1a2), that is b2 is to the left of a1
Vertical mode
This is the case when the run-length in the reference line (b1b2) overlaps the next run-length in the coding line(a1a2) by a maximum of plus or minus 3 pels
This is the case when the run-length in the reference line (b1b2) overlaps the run-length (a1a2) by more than plus or minus 3 pels