Compression and Decompression
Compression and Decompression
The three classes of communications are, 1.Unsolicted or Unexpected communication affects the user only to extent ,that it prevents the user performing their normal tasks. 2.The next method of communication is where the user is actually waiting for the communication to be complete before performing the next task. 3.The third classes of communication is the task already in progress where the proper speed must be maintained until completion.
Types of compression
The compression & decompression techniques are used in no. of applications such as facsimile systems , printer systems ,document storage and retrieval system , video conferencing and electronic messaging system. Types: Lossless compression Lossy compression
Lossless compression
In loss less compression, data is not altered or lost in the procession of compression or decompression. In this decompression generates an exact replica of the original image. Audio and text compression is an example of lossless compression. Lossless compression is good for text data and repetitive data in image like binary images and gray scale images.
This method provide reduction in size in the range of 1/10 to 1/50 of the original uncompressed size without affect image quality. The lossless compression standards are,
Packbits encoding CCITT Group 3 1D CCITT Group 3 2D CCITT Group 4 LZW algorithm
Lossy compression
In lossy compression,the decompression provides in loss of some information and the key issues is the effect of this loss. For some types of data destined to be heard or visualized by human ear or eye,the natural tendency of human sense to bridge over discontinuities comes into play and human eye fills in the missing information.
The issue is how much information can be lost before the human eye or ear fails to bridge the gaps in information. Lossy compression is used for audio , gray or color scale images and video objects in which the absolute data accuracy is not essential. Its is used in application such as medical screening systems,video teleconferencing and multimedia electronic messaging system. Mechanisms are,
JPEG ,MPEG, Intel DVI,Fractals
Each scanline is scanned from the left of the page to the right of page generating black and white pixels for that scanline.The binary image compression methods are,
Packbits encoding CCITT Group 3 1D CCITT Group 3 2D CCITT Group 4 2D
Packbits Encoding It is the simplest data compression and is used for compressing back and white binary images
In this method , the consecutive repeated string of characters is replaced by two bytes. The first byte contains number representing the no. of time s character is repeated and second bytes contains the character itself. Disadvantage of packbits encoding This scheme does not span across multiple rows of scanlines and it is one dimensional scheme. In a busy image ,adjacent pixels or group of adjacent pixel change rapidly and these leads to shorter run lengths of black pixels or white pixels,so it takes more bits for code to represents the run length.
CCITT group 3 compression utilizes huffman coding generate as set of make up codes and set of terminating codes for a given bit stream. Make up codes are used to represent run length in multiples of 64 pixels and terminating codes are used to represents run length of less than 64 pixels The run length of 132 pixels is encoded by following two codes
Makeup codes -128 white pixels Terminating codes -4 white pixels
Advantages
Simple to implement in both hardware and software. Worldwide std for facsimile. Disadvantage: It is one dimension as it encodes each row or line separately. It assumes a reliable communication link and does not provide any error protection mechanism.
KFactor
When this scheme is used the algo embeds group 31D coding between every K groups of group 3 2D coding ,allowing the group 31 D coding to be synchronizing line in the event of transmission error. When a transmission error occurs due to a bad communication link ,the group 31 D coding can be used to synchronize and correct error.
It is worldwide facsimile std , also accepted for document imaging application. Since its 2D ,the compression ratios achieved with this scheme Disadvantage: It does not provide as dense a compression and it is complex and difficult to implement in software. CCITT Group 4 2D compression: It is used for facsimile machines and low end s/w based document imaging systems.
This is the 2D coding scheme without k factor and in this , the first reference line is an white line. The first group of pixel is encoded utilizing the imaginary white line as the reference white line. The new coded line becomes the reference line for next scan line Disadvantage: Since there are no reference line ,single error can result in the rest of the page being skewed.
JPEG
Used for still color images and gray scale images and has 2 parts.
Part 1-specifies mode of operation Part 2-determines compliance test Requirement of JPEG: Design should address image quality Should be applicable to any continuous tone digital source image. Scalable & provide sequential encoding Provide progressive encoding Provide hierarchical encoding
JPEG standards
Three levels are , Baseline system Extended system Special lossless function. JPEG components: Baseline sequential code DCT progressive mode Predictive lossless encoding Hierarchical mode Quantization /Dequantization Entrophy encoder/decoder
Jpeg methodology
This scheme is lossy and utilizes fwd DCT , a uniform quantizer and entropy encoding and this DCT function removes data redundancy by transforming data from spatial domain to frequency domain. Discrete cosine tranform: The signal requires lot of data points to represent time in x axis & amplitude in y axis. It is optimal tranform for large classes of images.
DCT is an orthogonal transform and generates coefficients that are easily quantized. It can be computed effectively and symmetrical. Zigzag ordering is designed to facilitate the entropy by placing low frequency coefficients. Before DC coefficient are compressed , the DC prediction is processed first. AC coefficient is encoded by 2 symbols.
VCR paradigm Audio and video synchronization Multiplexing multiple compressed audio and video bit stream. Editability Playback device flexibility CCITT H.261 video coding algorithm: The CCITT adopted CIF and QCIF as video format for visual telephony. CIF and QCIF use hierarchical block structure for encoding data and these includes pictures,GOBS, and macro blocks.
MPEG
MPEG std consists of mpeg2 video,mpeg2 audio,mpeg2 systems and has various system levels called profiles. MPEG audio std is defined in 3 layers
Layers 1 & 2 called musician Layer 3 based on aspect ,an AT and T.
Motion compensation
Motion compensation assumes that the current pictures is some translation of a previous picture. Picture coding method : In mpeg ,picture coding method differs from H261 such that the motion compensation is applied hierarchy. Mpeg encoder: The mpeg encoder has DCT,quantizer,huffamn coder and motion compensation and they are the key modules in mpeg encoder. To have the sequence of events of mpeg .the initial stages of DCT compression,both the full motion mpeg and still image are identitical.
MPEG-2
Its supports,
Video coding Audio coding Multiplexing Vector quantization: DCT provides 2D scalar quantization of imaging data, vector quantization provides multi dimensional representation of information stored in look up tables. Decoding vector quantization coded information involves looking up appropriate values in a code block created during the encoding process .
Audio compression
Audio provides natural way of communication and can be used as both input or output and the input can be voice command or tones and output can be speech or music. Audio consists of analog signals of varying levels of frequencies and they are converted to digital form and then processed for transmission. ADPCM: It is used for sound compression.
It provides a form of compression by encoding and storing in the data stream with values of differences between the successive samples. FRACTALS: A fractal is a multi dimensional object with an irregular shape that has approximately the same shape or body irrespective of size .