IMAGEDATA COMPRESSION - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

IMAGEDATA COMPRESSION

Description:

... or video images are digitized, a large amount of digital data are generated. ... no restriction of image dimensions(size), colors, aspect ratios, switchover ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 31
Provided by: dinesh6
Category:

less

Transcript and Presenter's Notes

Title: IMAGEDATA COMPRESSION


1
  • IMAGE/DATA COMPRESSION
  • Need for Data Compression
  • When multimedia data objects like documents,
    color or video images are digitized, a large
    amount of digital data are generated. The exact
    amount of data depends an resolution of scanning.
    As resolution increases from 200 dpi to 400 dpi,
    the size of data increases fourfold
    (geometrically).
  • Example
  • A square inch of 400 dpi image consists of
    160,000 dots ( pixels). If each dot (pixel)
    represent 8 bits of gray level, this information
    becomes 8 x 160 000 bits. An 8-1/2 x 11 inches
    image contains 93.5 sq inch of surface area. An
    uncompressed data object can be of the order of
    several megabytes. These data objects needs to be
    stored, transmitted etc. Calculate!

2
  • IMAGE/DATA COMPRESSION
  • Need for Data Compression
  • The large amount of data present problems in
    storage and transmission.
  • Optical media, which has the capability to store
    large volume of data is known to be slower then
    magnetic media.
  • Although, network speeds have been increasing,
    and ATM technology is expected to boost speeds to
    well over 100 M-bits/sec, still large data
    objects can take a few seconds to transmit. A
    100Mbits/sec LAN can transmit effectively at
    about half the rate.
  • In order to manage large multimedia objects
    efficiently, these objects need to reduce the
    file size.
  • Compression algorithms try to eliminate
    redundancies in the pattern data and thus reduce
    the storage required.

3
  • IMAGE/DATA COMPRESSION
  • Need for Data Compression
  • How to reduce data redundancy?
  • Example 1 consider a black pixel is followed by
    20 white pixels, there is no need to transmit all
    white pixels.
  • LOSS-LESS COMPRESSION Retain all information in
    the multi-media object.
  • Compression Standards
  • CCITT - Group 2 is a very early compression
    scheme (fax) for 100 dpi black and white images.
  • CCITT - Group 3 known as run length encoding.
    This scheme is based on assumption that a typical
    scan line has long run of pixels of the same
    color ( black or white). This scheme is designed
    for black and white images only. The scheme is
    not for gray color images.

4
  • Compression Standards
  • CCITT Group 3 - 2D compression scheme is also
    known as modified run-length encoding. This
    scheme is more commonly used for software based
    document imaging system.
  • While CCITT Group 3- 2D scheme provides fairly
    good compression, it is easier to compress in
    software than CCITT Group 4 standard.The
    compression ratio averages somewhere between
    10-25, between Group 3 and Group 4.
  • The compression scheme is based on statistical
    nature of images. For example, the image data
    across the adjacent scan line may normally be
    redundant, if black and white transitions occur
    within plus or minus 3 pixels in the next line as
    well. Depending upon the scan resolution one line
    of text may consist of 20-30 scan lines.

5
  • Compression Standards
  • Many of these lines have common areas of black
    and white pixels depending upon contour of
    characters. The information that needs to be
    stored is only the information that describes
    changes in the contour of the character, from
    previous line.
  • CCITT Group 4 compression standard is a two
    dimensional coding scheme. Only the changes from
    previous line to the next line are transmitted
    using a predefined coding method.
  • Group 4 encoding is typically hardware based.
  • CCITT - Group 4 does not include shading or color
    information.
  • CCITT - Group 5 standard is designed to address
    the need for efficient content-based encoding
    methodology which addresses the color and shade
    information.

6
  • Lossy Compression for Photographs and Videos
  • The compression technology used for photographs
    are very different from those used for document
    images. Photographs have very high resolution, of
    the order of 1000 pixels per inch. At this
    resolution, uncompressed files are very large.
    The loss of resolution would not have a
    noticeable effect. There are different standards
    - lossy compression schemes.
  • Joint Photographic Expert Group ( JPEG) (Part 1
    and 2), formed as a joint ISO CCITT working
    committee, is focused exclusively, known as
    Motion Picture Experts Group (MPEG), is concerned
    with full motion video standards. However, JPEG
    also has standards for gray and color still
    pictures.

7
  • Emerging applications such as color fax,
    full-color (24-bit) desk-top publishing, scanners
    and printers need compression standards for data
    reduction that can be implemented at acceptable
    price-performance level.
  • JPEG compression standard is designed for still
    as well as moving color and gray-scale
    photographs/ images. The standard has been
    released in two parts.
  • Part-I, specifies the modes of operation, the
    interchange formats, and the codec
    specifications for these modes. Part I also
    specifies implementations guidelines.
  • Part II of the standard describes the compliance
    tests that determines whether the implementation
    of an encoder or decoder conforms to the
    standards specified in Part I.

8
  • While the loss-less compression is always
    desirable, objects with very little information
    redundancy do not produce acceptable results with
    these compression techniques.
  • When the compression methods result-in loss of
    some information, the key issue is the effect of
    the loss. Human-eye normally fills-in the missing
    information.
  • An important consideration is that significant
    amount of the information should not be lost, and
    human eye (or ear) should not fail to bridge
    information gap in the information.
  • Lossy compression is often used for compressing
    audio, gray scale or color images and video
    images in which absolute data accuracy is not
    essential.

9
  • A few of the common compression techniques are
  • Run-length encoding It is the simplest and
    earliest of data compression scheme. It is
    primarily used to compress black and white
    (binary) images. It is also a basis for other
    types of compression techniques.
  • In this scheme, a consecutive repeated string of
    characters is replaced by two bytes. The first
    byte contains a number, representing the of times
    the character is repeated, and the second byte
    contains the character itself.
  • 0000 0000 00 1111 111 0000 0000 1111
  • 0X0A 0X00 0X07 0X01 0X08 0X00 0X04 0X01

b1 b2 b3 b4 b5 b6 b7 b8
10
  • In some cases only one byte can represent the
    pixel value ( 0 or 1 ) and the pixel run length.
    One bit out of 8 bits represent pixel value
    followed by run length.
  • The coding of 0 0 1 0 0 1 0 0 represent 0 being
    repeated 36 times.
  • This method saves storage space.
  • The encoding scheme is carried out on each row
    (one scan line) basis. It does not span across
    multiple lines. Hence it is called a one
    dimensional scheme. The efficiency of this scheme
    is low. However, it is very simple to implement.
    Typical compression efficiencies range from 1/2
    to 1/5. This scheme is included in the TIFF 6.0
    specification..
  • If image is changing fast (busy image), the coded
    length

11
  • sometimes could be larger than the original
    image (negative compression). Compression
    algorithms should watch out for this effect and
    avoid these.
  • CCITT Group 3 1-D Compression Technique
  • Assumes that a typical scan-line has long run of
    pixels of the same type (b or w). The scheme is
    for b/w images. It is used for fax transmission
    and software based systems. Run length coding
    discussed above is used.
  • Huffman Coding - For Gray Images
  • Converts the pixel brightness ( intensity )
    values in the original image to a new variable
    length code based on their frequency of
    brightness values in the image.
  • The compression scheme begins by looking at
    brightness histogram of an image.

12
  • Huffman Coding
  • By ordering the brightness values by their
    frequency of occurrence, a list is created.
  • Shortest codes are assigned to most frequent
    values of brightness in the list and the longest
    to the least frequent brightness values
  • Consider a 640 x 480 pixel size image with 8
    brightness levels. A histogram is plotted and it
    is found that the intensity values can be
    assigned by 8 brightness values ( in the range
    of 0 - 255 levels).

69,980
67,181
Number of pixels
41,988
34,990
32,891
30,791
27,992
1387
0,0
255
64
128
192
Gray levels
13
Brightness Number of Pixels Huffman code
73 69,989 10 110 67,181
00 146 41,988
110 36 34,990 010 183 32,891
011 219 30,791
1110 255 27,992 11110 0 1,387
11111
0
0
0
307,200
172,138
0
135,062
1
1
0
67,881
102,158
1
1
1
0
60,170
0
1
29,379
1
1
14
  • Huffman Coding
  • The scheme is very simple to implement in HW/SW
    and is worldwide standard for fax which is
    accepted for document imaging applications.
  • The disadvantage is It is 1-D scheme and has
    no error protection scheme.
  • Number of bits required for the representation
    will never exceed the number of intensity values.
  • If the information content in an image is too
    high (high entropy), the compression may not be
    achieved.
  • However, this technique is very good for gray
    images.

15
  • CCITT Group 3-2D Compression
  • This scheme is known as modified run-length
    coding.
  • The scheme is commonly used for software-based
    document imaging systems and facsimile.
  • It is easy to decompress and the compression
    ratio of 10 to 20 can be achieved.
  • It combines one dimensional coding scheme with
    two dimensional scheme. The 2-D encoding offers
    higher compression because statistically many
    lines differ very little from line above/below.
  • It uses k factor, where the image is divided
    into several groups of k lines.

16
  • CCITT Group 3-2D Compression
  • The first line of every group is encoded using
    CCITT Gr3-1D method. This line becomes the
    reference line for the next line.
  • The scheme is based on the statistical nature of
    images the image data across the adjacent scan
    line are redundant.
  • If the black and white transition occurs on a
    reference scan line, there are fair chances that
    the same transition will occur within ?3 pixels
    in the next scan line. You code the relative
    transitions.
  • In a typical line of text, there may be as many
    as 20-30 scan lines, depending upon the scan
    resolution.

17
  • CCITT Group 3-2D Compression
  • Many of these scan lines have common areas of
    black and white pixels. The information that
    needs to be stored is only the changes in contour
    of object.
  • When this scheme is used, the algorithm embeds
    Group 3, 1D coding( as first line), between every
    k Group 3-2D coding, allowing this to be a
    synchronizing line in the event of a transmission
    error.

0000 0000 00 1111 111 0000 0000 1111 0000 0000 11
1111 111 1000 0011 1111 0X0A 1X07 0X08 1X04 1x02
0x01 1x02
18
  • CCITT Group 4-2D Compression
  • CCITT Gr 3 2D Standard has been successful.
    However the compression ratio is not too
    impressive (10-20).
  • CCITT Gr 4 compression is a 2-D coding scheme, is
    used without a K factor. In this method, the
    reference is first line, which is all white. The
    first group of scan line is coded using the
    imaginary white line.
  • The newly coded line becomes reference line for
    the next scan line.
  • This provides a high compression ratio. However,
    since the scheme has no reference line(s), a
    single error can result in the rest of the page
    being skewed.
  • It is basically the Group 3-2D coding technique
    without the K factor.

19
  • Color, Gray scale and Still-Video Image
    Compression
  • Emerging applications such as color fax, full
    color desk top publishing, scanners, and printers
    need a compression standard for data reduction
    which can be implemented at acceptable price
    performance levels.
  • The existing CCITT Gr 3 and Gr 4 are rally not
    designed for gray/color images and are unable to
    compress sufficiently for viable options.
  • The broad JPEG standards are designed to address
    price performance requirements of a variety of
    applications using high resolution graphics.
  • The details of JPEG standard are complex and not
    discussed in this course.
  • All you have to know on JPEG standard is
    summarized on next few transparencies.

20
  • Color, Gray scale and Still-Video Image
    Compression
  • JPEG is a compression standard for still color
    images/gray images. It has two parts
  • Part-1 Specifies mode of operation, the
    interchange formats, encoder/decoder
    specifications. Implementation guidelines are
    also provided.
  • Part-2 Describes compliance tests, which
    determines if the implementation of an
    encoder/decoder conforms to the standard
    specifications to part 1, to ensure
    inter-operability of systems compliant with JPEG
    standards.

21
  • Color, Gray scale and Still-Video Image
    Compression
  • Requirements for the compression standards also
    include
  • Image quality, applicability in any kind of
    continuous tone images, no restriction of image
    dimensions(size), colors, aspect ratios,
    switchover from loss-less to lossy ranges,
    sequential and progressive encoding (image is
    progressively filled with finer details- starting
    with course image).
  • Hierarchical Encoding (image is compressed to
    multiple resolution levels, so that lower
    resolution systems can decompress appropriately,
    based on system specifications).Requires multiple
    passes for encoding
  • Sequential Encoding entire image is coded in one
    pass- from left to right and top to bottom.

22
  • Color, Gray scale and Still-Video Image
    Compression
  • JPEG standard has three levels of definitions
  • Baseline system
  • Extended system
  • Special lossless system
  • The baseline system reasonably compresses/decompre
    sses color images, maintains a high compression
    ratio, and handle image resolutions from 4-16
    bits/pixel. At this level, the JPEG standard
    ensures that the software implementation, custom
    VLSI implementation and DSP implementation are
    cost effective.

23
  • Color, Gray scale and Still-Video Image
    Compression
  • The extended system covers the various encoding
    aspects such as variable length encoding,
    progressive encoding and hierarchical mode of
    encoding. This special purpose extensions are
    useful for variety of applications. All these
    methods are extension of baseline sequential
    encoding.
  • The special loss-less function ensures that at
    the resolution at which image is compressed, the
    decompression results in no loss of any detail
    that were there in the original source image.
  • In other words, there is no loss of details in
    compression/decompression process.

24
  • Lossy Image Compression
  • Truncation Coding
  • During this type of compression technique some of
    the information in the image is lost.
  • The technique works by discarding some image data
    using spatial down-sampling and brightness
    resolution-reduction.
  • Example Let us consider an image of 640 pixels X
    480 lines, and it has to be printed on a printer
    as 1.5 inches by 1.125 inches using 133 dpi. This
    will translate to 200 pixel x 150 lines image.
  • You can reduce the resolution by down sampling -
    regularly dropping pixels and lines
  • Similarly brightness levels can also be reduced
    from typically 8 bits (256 levels) to 3 bits (8
    levels) representation.

25
By this brightness compression technique a
reduction of 8/3 2.667 can be achieved.
Original image
4 is to 1 spatial- domain compression- lossy -
one quarter size image
Spatial - truncation coded (8/3) imaged, but
decompressed to full size after truncation
26
  • Lossy Image Compression
  • You can reconstruct the image coded with reduced
    brightness level with to 3 bits ( from 8
    original bits) by adding additional 5 bits (lsb)
    at receiving side by assigning random brightness
    values ( using random noise pattern generator).
  • Another popular form of lossy coding technique
    is
  • Transform Coding
  • This technique works in frequency domain. First,
    the image is converted into the frequency domain
    using DFT, FFT, etc.
  • In the frequency domain, the fundamental
    frequency components represent pixel brightness.
    These components tend to clump in the region
    around low frequency zones.
  • In the frequency domain representation, there are
    many high frequency component coefficients with
    very small values

27
  • Lossy Image Compression
  • This compression technique eliminates high
    frequency coefficients having very small values.
    Normally these components represent high spatial
    frequency contents in the image.
  • When the image is inverse transformed back to
    spatial domain, the removal of small valued
    components cause a very little distortion or loss
    of information.
  • In the frequency transformed coding, typically, a
    two dimensional image block of 8 x 8 pixel size
    is coded using frequency domain. Only the
    fundamental frequency components are retained and
    stored as the compressed image.
  • Decompression operation is merely inverse
    frequency transform of the remaining
    (fundamental) frequency components.

28
Lossy Image Compression
Image compression using Transform Coding . A
compression of 20 1 is achieved, without
significant information loss
29
  • Lossy Image Compression
  • The quality of the closeness of the decompressed
    image to original image is related by - how
    many coefficients of the frequency domain have
    been discarded?
  • Normally the frequency domain representation of
    the image is very efficient form of the image
    representation, and the frequency domain
    compression techniques are very powerful.
  • A compression of 20 1 or more can be easily
    achieved on gray level images.
  • This technique can be applied to color images
    also.
  • Check this operation using Matlab demo command on
    gray level images.

30
Moving Picture Expert Group Standards ( MPEG) H.
261 Uses DCT( discrete cosine transform) and
Huffman coding ( lossy compression technique) It
is used for low quality receptions at 64 k-bits
per seconds transportation links. There are two
more existing standards for moving images MPEG1
and MPEG2 MPEG1 is for relatively lower quality
transmission at 1.5 M bits per seconds
transportation links with resolution of about 320
x 240 pixels . MPEG2 is for higher quality
transmission at 4 - 10 M bits per seconds
transportation links with resolution of about
640 x 480 pixels.
Write a Comment
User Comments (0)
About PowerShow.com