IMAGE compression.ppt

download IMAGE compression.ppt

of 27

Transcript of IMAGE compression.ppt

  • 7/30/2019 IMAGE compression.ppt

    1/27

    SOURCE CODING: IMAGE AND

    VIDEO

  • 7/30/2019 IMAGE compression.ppt

    2/27

    Image and Video Formats GIF,TIFF, SIF, CIF, QCIF

    Image compression: READ, JPEGVideo Compression: Principles-I,B,P

    frames, Motion estimation, Motion

    compensation, H.261, MPEGstandard

  • 7/30/2019 IMAGE compression.ppt

    3/27

  • 7/30/2019 IMAGE compression.ppt

    4/27

    All types of images are displayed ( and printed )

    in the form of a two dimensional matrix ofindividual picture elements known as pixels orsome 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 by480 vertical pixels with, for example 8 bits perpixel which allows each pixel to have one of 256different colors.

  • 7/30/2019 IMAGE compression.ppt

    5/27

    The graphics interchange format is used extensively with the Internet forthe representation and compression of graphical images

  • 7/30/2019 IMAGE compression.ppt

    6/27

    Although colour images comprising 24-bit pixels are supported GIFreduces 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 theinterlaced mode.

  • 7/30/2019 IMAGE compression.ppt

    7/27

    The LZW can be used to obtain further levels of compression

  • 7/30/2019 IMAGE compression.ppt

    8/27

    GIF also allows an image to be stored and subsequently

    transferred over the network in an interlaced mode; useful overeither low bit rate channels or the Internet which provides a variable

    transmission rate

    1/8 and 1/8 of the

    total compressed

    image

  • 7/30/2019 IMAGE compression.ppt

    9/27

    The compression image data is organized so that the

    decompressed image is built up in a progressive way as the data

    arrives

    Further and

    remaining of the

    image

  • 7/30/2019 IMAGE compression.ppt

    10/27

    RGB - 24 or 48 bits,

    16 bits are used for each R,G,B colors

    For TIF files, most programs alloweither no compression or LZWcompression

    Code number indicates particularformat

    Code 1- uncompressed format

    Codes 2,3,4- digitized format -

  • 7/30/2019 IMAGE compression.ppt

    11/27

  • 7/30/2019 IMAGE compression.ppt

    12/27

    12

    Chrominance Components

    Composite Video Signal for Transmission

    - Ys, Cb, and Crsignals are combined together and signaldifferences 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(C

    r) = 0.48(R-Y)+0.41(B-Y) = 0.212R-0.528+0.311B

  • 7/30/2019 IMAGE compression.ppt

    13/27

    13

    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 forluminance. Hence, two chrominance signals can tolerate areduced resolution

    Transmission bandwidth is achieved by using the luminance

    and two color difference signals, instead of the RGBsignals directly.

    CCIR-601 Recommendations: standard for the digitizationof video pictures

  • 7/30/2019 IMAGE compression.ppt

    14/27

    14

    4:2:2 format(CCIR-601)

    Recommendation for use in TV studio Three component (analog) video signals may have bandwidths

    up to 6Mhz for the luminance 12Mhz sps

    less than 3Mhz for the two chrominance signals 6 Mhz sps

    In reality, 13.5M sps for luminance, 6.75 M sps for the twochrominance signals

    In NTSC(525-line) system, total line sweep time 63.56sec =retrace time 11.56 sec + an active line sweep time 52 sec

    In PAL(625-line) system, total line sweep time 64sec =retrace time 12 sec + an active line sweep time 52 sec

    Line sampling rate:

    52 10-6 13.5 106= 702 samples/line

    In reality, 720 samples/line

    Line sampling rate:

    52 10-6 6.75 106= 351 samples/line

    In reality, 360 samples/line

    4Y samples for every 2Cb and 2Cr samples(4:2:2)

    Orthogonal sampling

    Y

    Cb

    Cr

  • 7/30/2019 IMAGE compression.ppt

    15/27

    15

    4:2:2 Format Bit Rate & Storage (NTSC 525-line)

    The number of active (visible) lines: 480

    The number of samples per line: 720

    Resolution of luminance Y = 720 480

    Two chrominance signals Cb = Cr= 360 480

    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 + 2 (360 8) = 11.52Kbits

    Bits per frame = 480 11.52 = 5.5296Mbits

    Bits for 1.5 hrs Video assuming 60 refresh rate = 5.5296 60 1.5 3600

    = 223.9488GBytes

    PAL625

    -line

    576

    720

    72057

    6 36057

    6

    576

    6.63555Mbit

    s

    6.63555 5

    0

  • 7/30/2019 IMAGE compression.ppt

    16/27

    16

    4:2:0 Format used in Digital Broadcast Applications

    interlaced scanning with the absence of chrominancesamples 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-screen1920 1152 pixels(25/30 Hz) with # of visible lines per frame 1080

  • 7/30/2019 IMAGE compression.ppt

    17/27

    17

    SIF (Source Intermediate Format), 4:1:1 Format

    used in Video Cassette Recorders (VCRs)

    progressive (non-interlaced) scanning since it is intended forstorage applications

    Half of 4:2:0 format: Subsampling & Temporal Resolution

    Uses half the refresh rate -temporal resolution

    Frame refresh rate- 30 Hz for 525 line system and 25 Hz for 625 line system.

    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

  • 7/30/2019 IMAGE compression.ppt

    18/27

    18

    CIF (Common Intermediate Format), 4:1:1 format

    used in Video Conferencing applicationsalso known as FCIF (Full Common Intermediate Format),

    spatial resolution of the SIF 625-line system plustemporal resolution of the SIF 525-line system

    Y = 360 288, Cb = Cr= 180 144

    refresh rate: 30 Hz

    bit rate per line: 6.75 106 8 + 2 (1.6875 106 8) =81Mbps

    many variants for videoconferencing using desktop PCsor ISDN/PSTN

    say, typically 4 or 16 64Kbps channels used

    4CIF: Y = 720 576, Cb = Cr= 360 288

    16CIF: Y = 1440 1152, C = C = 720 576

  • 7/30/2019 IMAGE compression.ppt

    19/27

    19

    QCIF (Quarter CIF), 4:1:1 Format

    used in Video Telephony applications

    half spatial resolution of the CIF andeither half or quarter temporal resolution of the CIF

    Y = 180 144, Cb = Cr= 90 72

    refresh rate: 15 or 7.5 Hz

    bit rate per line:3.375 106 8 + 2 (0.84375 106 8) = 81Mbps

    a lower version is typically used for single 64Kbps channelISDN or PSTN with modems: sub-QCIF(SQCIF)

    Y = 128 96, Cb = Cr= 64 48

  • 7/30/2019 IMAGE compression.ppt

    20/27

    20

    PC Video Digitization

    DigitizationFormat

    System Spatial Resolution TemporalResolution

    4:2:2 525-line625-line

    Y = 640 480, Cb = Cr= 320 240

    Y = 768 576, Cb = Cr= 384 288

    60Hz50Hz

    SIF 525-line625-line

    Y = 320 240, Cb = Cr= 160 240

    Y = 384 288, Cb = Cr= 192 144

    30Hz25Hz

    CIF Y = 384

    288, Cb = Cr= 192

    144 30HzQCIF Y = 192 144, Cb = Cr= 96 72 15/7.5Hz

    - Video capture board or S/W required- All PC monitors use progressive (non-interlaced) scanning

  • 7/30/2019 IMAGE compression.ppt

    21/27

    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 termination-

    codes 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

  • 7/30/2019 IMAGE compression.ppt

    22/27

    ITU T Group 3 and 4facsimile conversion

    codes: termination-

    codes

    Termination code table

  • 7/30/2019 IMAGE compression.ppt

    23/27

    ITU T Group 3and 4 facsimile

    conversion codes:

    make-up codes

    Make-up of 64

    codewords

  • 7/30/2019 IMAGE compression.ppt

    24/27

    Each scanned line is terminated with an EOL code. In

    this way the receiver fails to decode a word it starts tosearch 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

  • 7/30/2019 IMAGE compression.ppt

    25/27

    The modified-modified relative element addressdesignate 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

  • 7/30/2019 IMAGE compression.ppt

    26/27

    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) is to the left

    of the next run-length in the coding line (a1a2), that is b2 is to the left of a1

    Pass mode

    Vertical mode

  • 7/30/2019 IMAGE compression.ppt

    27/27

    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