0% found this document useful (0 votes)
25 views

Unit - 4

Uploaded by

camwarenpd24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Unit - 4

Uploaded by

camwarenpd24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

QB401 (a) Discuss Compression.

Relate the Compression ratio in redundancy techniques in


detail.
Define compression and data redundancy – 4 marks
Types list mentioned – 2 marks
Explaining each type – 7 marks

Compression: It is the process of reducing the size of the given data or an image. It will help us
to reduce the storage space required to store an image or File.
Data Redundancy:
• The data or words that either provide no relevant information or simply restate that which
is already known. It is said to be data redundancy.
• Consider N1 and N2 number of information carrying units in two data sets that represent
the same information,
• Data Redundancy Rd = 1- (1/Cr)
Where Cr is called the Compression Ratio.
Cr=N1/N2.
Types of Redundancy
There are three basic Redundancy and they are classified as
1) Coding Redundancy
2) Interpixel Redundancy
3) Psychovisual Redundancy.
1. Coding Redundancy:
We developed this technique for image enhancement by histogram processing on the assumption
that the grey levels of an image are random quantities. Here the grey level histogram of the
image also can provide a great deal of insight in the construction of codes to reduce the amount
of data used to represent it.
• Coding redundancy refers to the inefficiency in representing data using a specific coding
scheme.
• It arises when the chosen coding method does not make optimal use of available code
space or when there is unnecessary repetition in the coding.
• Compression techniques aim to reduce coding redundancy by using more efficient coding
schemes or removing unnecessary information.

2. Interpixel Redundancy:
In order to reduce the interpixel redundancy in an image, the 2-D pixel array normally used for
human viewing and interpretation must be transformed in to more efficient form.
• Interpixel redundancy, also known as spatial redundancy, refers to the correlation
between neighboring pixels in an image.
• In natural images, adjacent pixels often have similar values, and encoding each pixel
independently may result in redundancy.
• Compression methods, such as predictive coding, exploit interpixel redundancy by
predicting the value of a pixel based on its neighbors and encoding only the prediction
error.
3. Psychovisual Redundancy:
Certain information simply has less relative importance than other information in the normal
visual processing. This information is called Psycovisual Redundant.
• Psychovisual redundancy involves exploiting the limitations and characteristics of the
human visual system.
• Not all information in an image is equally important to human perception. Some details
may be less noticeable or even imperceptible to the human eye.
• Compression algorithms take advantage of psychovisual redundancy by allocating more
bits to essential information and fewer bits to less critical information, reducing the
overall amount of data without a significant impact on perceived quality.

QB402 (b) Construct Huffman coding for the given 7 symbols and its probabilities. Also
calculate the following Average length, Entropy, Efficiency and Redundancy.
A B C D E F G
0.2 0.1 0.2 0.05 0.3 0.05 0.1

HUFFMAN CODE(Pg 10)


QB403 (a) Develop the channel Encoder and Decoder of hamming coding technique with a
suitable example.
QB404 (b) Summarize the concepts of run length coding in detail.
Run-length coding is a form of data compression that takes advantage of the structure and
patterns within the data. In the context you provided, run-length coding is applied to facsimile
images using a two-state Markov model with states "sw" (white) and "sb" (black).

1. Capon Model and Markov Model:


• The underlying model is the Capon model, a two-state Markov model with states "sw"
and "sb."
• Transition probabilities p(w/b) and p(b/w), along with probabilities of being in each state
p(sw) and p(sb), completely define this model.

2. Transition Probabilities in Facsimile Images:


• In facsimile images, the probabilities p(w/w) and p(w/b) are generally higher than p(b/w)
and p(b/b).
• This suggests that once a pixel takes on a particular color, it is highly likely that the
following pixels will be of the same color.

3. State Diagram and Entropy:


• The Markov model is represented by a state diagram.
• Entropy using a probability model and the independent and identically distributed (iid)
assumption is compared to the entropy using the Markov model.

4. Skewed Probabilities and Data Structure:


• The highly skewed nature of probabilities p(b/w) and p(w/w), and to a lesser extent
p(w/b) and p(b/b), implies that runs of the same color are likely.
• This observation forms the basis for run-length coding.

5. Run-Length Coding Concept:


• Instead of coding each pixel individually, run-length coding encodes the lengths of
consecutive runs of the same color.
• For example, a sequence of 190 white pixels, followed by 30 black pixels, and another
210 white pixels would be coded as 190, 30, 210, along with an indication of the color of
the first string of pixels.
In summary, run-length coding capitalizes on the predictability of consecutive pixels having the
same color in facsimile images. By encoding the lengths of these runs, rather than individual
pixel values, the compression technique is achieved. This method is particularly effective when
there are long runs of consecutive pixels with the same color.

QB405 (b) Analyze the issues in compression method selection in detail.


Explanation about issues in compression - 13 marks

Issues in compression method selection


When choosing a specific compression method, one should consider the following issues:
• Lossless or lossy. This is usually dictated by the coding efficiency requirements.

• Coding efficiency. Even in a lossy compression process, the desirable coding efficiency
might not be achievable. This is especially the case when there are specific constraints on
output signal quality.

• Variability in coding efficiency. In some applications, large variations in coding


efficiency among different data sets may not be acceptable.

• Resilience to transmission errors. Some compression methods are more robust to


transmission errors than others. If retransmissions are not permitted, then this
requirement may impact on the overall encoder- decoder design.

• Complexity trade-offs. In most implementations, it is important to keep the overall


encoder- decoder complexity low. However, certain applications may require only a low
decoding complexity.

• Nature of degradations in decoder output. Lossy compression methods introduce artifacts


in the decoded signal. The nature of artifacts depends on the compression method that is
employed. The degree to which these artifacts are judged also varies from application to
application. In communication systems, there is often an interplay between the
transmission errors and the coding artifacts introduced by the coder. Thus, it is important
to consider all types of error in a system design.

• Data representation. In many applications, there is a need to support two decoding


phases. In the first phase, decoding is performed to derive an intelligible signal; this is the
case in data browsing. In the second phase, decoding is performed to derive a higher
quality signal. One can generalize this notion to suggest that some applications require a
hierarchical representation of the data. In the compression context, we refer to such
compression schemes as scalable compression methods. The notion of scalability has
been adopted in the compression standards.

• Multiple usage of the encoding-decoding tandem. In many applications, such as video


editing, there is a need to perform multiple encode-decode operations using results from a
previous encode-decode operation. This is not an issue for lossless compression;
however, for lossy schemes, resilience to multiple encoding-decoding cycles is essential.

• Interplay with other data modalities, such as audio and video. In a system where several
data modalities have to be supported, the compression methods for each modality should
have some common elements. For instance, in an interactive videophone system, the
audio compression method should have a frame structure that is consistent with the video
frame structure. Otherwise, there will be unnecessary requirements on buffers at the
decoder and a reduced tolerance to timing errors.

• Interworking with other systems. In a mass-market environment, there will be multiple


data modalities and multiple compression systems. In such an environment, transcoding
from one compression method to another may be needed. For instance, video editing
might be done on a frame by frame basis; hence, a compression method that does not
exploit temporal redundancies might be used here. After video editing, there might be a
need to broadcast this video. In this case, temporal redundancies can be exploited to
achieve a higher coding efficiency. In such a scenario, it is important to select
compression methods that support transcoding from one compressed stream format to
another. Interworking is important in many communications environments as well.
QC401 (a) Discuss in brief about the general compression system model with an
appropriate diagram.
Compression: It is the process of reducing the size of the given data or an image. It will help us
to reduce the storage space required to store an image or File.
Image Compression Model:
There are two Structural model and they are broadly Classified as follows
1. An Encoder
2. A Decoder.

An Input image f(x,y) is fed in to encoder and create a set of symbols and after transmission over
the channel ,the encoded representation is fed in to the decoder. A General Compression system
model:
The General system model consist of the following components. They are broadly classified as
1. Source Encoder
2. Channel Encoder
3. Channel
4. Channel Decoder
5. Source Decoder

Fig. 3.1 shows, a compression system consists of two distinct structural blocks: an
encoder and a decoder. An input image f(x, y) is fed into the encoder, which creates a set of
symbols from the input data. After transmission over the channel, the encoded representation is
fed to the decoder, where a reconstructed output image f^(x, y) is generated. In general, f(x, y)
may or may not be an exact replica of f(x, y). If it is, the system is error free or information
preserving; if not, some level of distortion is present in the reconstructed image. Both the
encoder and decoder shown in Fig. 3.1 consist of two relatively independent functions or
subblocks. The encoder is made up of a source encoder, which removes input redundancies, and
a channel encoder, which increases the noise immunity of the source encoder's output. As would
be expected, the decoder includes a channel decoder followed by a source decoder. If the channel
between the encoder and decoder is noise free (not prone to error), the channel encoder and
decoder are omitted, and the general encoder and decoder become the source encoder and
decoder, respectively.
The Source Encoder and Decoder:

The source encoder is responsible for reducing or eliminating any coding, interpixel, or
psychovisual redundancies in the input image. The specific application and associated fidelity
requirements dictate the best encoding approach to use in any given situation. Normally, the
approach can be modeled by a series of three independent operations. As Fig. 3.2 (a) shows, each
operation is designed to reduce one of the three redundancies. Figure 3.2 (b) depicts the
corresponding source decoder. In the first stage of the source encoding process, the mapper
transforms the input data into a (usually nonvisual) format designed to reduce interpixel
redundancies in the input image. This operation generally is reversible and may or may not
reduce directly the amount of data required to represent the image.

• Run-length coding is an example of a mapping that directly results in data compression in


this initial stage of the overall source encoding process. The representation of an image
by a set of transform coefficients is an example of the opposite case. Here, the mapper
transforms the image into an array of coefficients, making its interpixel redundancies
more accessible for compression in later stages of the encoding process.
• The second stage, or quantizer block in Fig. 3.2 (a), reduces the accuracy of the
mapper's output in accordance with some preestablished fidelity criterion. This stage
reduces the psychovisual redundancies of the input image. This operation is irreversible.
Thus it must be omitted when error-free compression is desired.
• In the third and final stage of the source encoding process, the symbol coder creates a
fixed or variable-length code to represent the quantizer output and maps the output in
accordance with the code. The term symbol coder distinguishes this coding operation
from the overall source encoding process. In most cases, a variable-length code is used to
represent the mapped and quantized data set. It assigns the shortest code words to the mo
frequently occurring output values and thus reduces coding redundancy. The operation,
course, is reversible. Upon completion of the symbol coding step, the input image has
been processed to remove each of the three redundancies.
Figure 3.2(a) shows the source encoding process as three successive operations, but all three
operations are not necessarily included in every compression system. Recall, for example, that
the quantizer must be omitted when error-free compression is desired. In addition, some
compression techniques normally are modeled by merging blocks that are physically separate in
Fig. 3.2(a). In the predictive compression systems, for instance, the mapper and quantizer are
often represented by a single block, which simultaneously performs both operations.
The source decoder shown in Fig. 3.2(b) contains only two components: a symbol decoder and
an inverse mapper. These blocks perform, in reverse order, the inverse operations of the source
encoder's symbol encoder and mapper blocks. Because quantization results in irreversible
information loss, an inverse quantizer block is not included in the general source decoder model
shown in Fig. 3.2(b).

QC402 (a) Develop a Huffman coding with appropriate examples in detail.


This technique was developed by David Huffman. – 5 marks
Discuss the example of Huffman with example and calculated Average length, Entropy,
Efficiency and Redundancy – (10)marks

This technique was developed by David Huffman. The codes generated using this technique or
procedure are called Huffman codes. These codes are prefix codes and are optimum for a given
model. The Huffman procedure is based on two observations regarding optimum prefix codes
1. In an optimum code, symbols that occur more frequently will have shorter code words than
symbols that occur less frequently.
2. In an optimum code, the two symbols that occur least frequently will have the same length

Huffman coding is a widely used algorithm for lossless data compression. Developed by David A.
Huffman in 1952, it is a variable-length prefix coding algorithm that assigns shorter codes to more
frequently occurring symbols and longer codes to less frequent symbols. The basic idea is to construct
a binary tree, called the Huffman tree, in which the leaves correspond to the symbols to be encoded.
Discuss the example of Huffman with example and calculated Average length, Entropy,
Efficiency and Redundancy

You might also like