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

Image Compression Module 5 (1)

Image compression reduces file sizes while maintaining quality by removing redundant data through various algorithms. A typical compression system includes an encoder and decoder, with blocks for source and channel encoding to manage redundancies. Types of redundancies include coding, interpixel, and psychovisual, which can be exploited for efficient image storage and transmission.

Uploaded by

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

Image Compression Module 5 (1)

Image compression reduces file sizes while maintaining quality by removing redundant data through various algorithms. A typical compression system includes an encoder and decoder, with blocks for source and channel encoding to manage redundancies. Types of redundancies include coding, interpixel, and psychovisual, which can be exploited for efficient image storage and transmission.

Uploaded by

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

In digital image processing, image compression is the process of reducing the

file size of an image while maintaining its quality or, in some cases, sacrificing
some quality for a smaller file size. The basis of reduction process is removal of
redundant data. This is achieved through various algorithms that identify and
remove redundant or less important information, enabling efficient storage and
transmission.
 Why Compress?
Image files can be very large, especially high-resolution images. Compression
addresses this by reducing the storage space needed for images and the
bandwidth required for their transmission over networks.

Image Compression Model

Atypical image compression system comprises of two main blocks An Encoder


(Compressor) and Decoder (Decompressor). The image f(x,y) is fed to the
encoder which encodes the image so as to make it suitable for transmission. The
decoder receives this transmitted signal and reconstructs the output image
f(x,y). If the system is an error free one f(x,y) will be a replica of f(x,y).
The encoder and the decoder are made up of two blocks each. The encoder is
made up of a Source encoder and a Channel encoder. The source encoder
removes the input redundancies while the channel encoder increases the noise
immunity of the source encoders. The decoder consists of a channel decoder and
a source decoder. The function of the channel decoder is to ensure that the
system is immune to noise. Hence if the channel between the encoder and the
decoder is noise free, the channel encoder and the channel decoder are omitted.
Source encoder and decoder:
The three basic types of the redundancies in an image are interpixel, coding
redundancies and psychovisual redundancies. Run length coding is used to
eliminate or reduce interpixel redundancies Huffman encoding is used to
eliminate or reduce coding redundancies while I.G.S is used to eliminate
interpixel redundancies. The job of the source decoders is to get back the
original signal. The problem solved by runlength coding, Huffman encoding
and I.G.S coding are examples of source encoders and decoders.

The input image is passed through a mapper. The mapper reduces the interpixel
redundancies. The mapping stage is a lossless technique and hence is an
reversible operation. The output of a mapper is passed through a Quantizer
block. The quantizer block reduces the psychovisual redundancies. It
compresses teh data by eliminating some information and hence is an
irreversible operation. The quantizer block uses JPEG compression which
means a lossy compression. Hence in case of lossless compression, the
quantizer block is eliminated. The final block of the source encoder is that of a
symbol encoder. This block creates a variable length code to represent the
output of the quantizer. The Huffman code is a typical example of the symbol
encoder. The symbol encoder reduces coding redundancies.

The source decoder block performs exactly the reverse operation of the symbol
encoder and the mapper blocks. It is important to note that the source decoder
has only two blocks. Since quantization is irreversible, an inverse quantizer
block does not exist. The channel is noise free and hence have ignored the
channel encoder and channel decoder.
Channel encoder and decoder:
The channel encoder is used to make the system immune to transmission noise.
Since the output of the source encoder has very little redundancy, it is highly
susceptible to noise. The channel encoder inserts a controlled form of
redundancy to the source encoder output making it more noise resistant.
Redundancy means repetitive data.
In image processing, "redundancy" refers to the presence of unnecessary or
repetitive information that can be removed without significant loss of image
quality or content. This redundancy can be exploited for efficient image
compression and storage.
Types of Image Redundancy:
 Coding Redundancy:
This arises from the way images are encoded, where certain pixel values or
patterns occur more frequently than others. In this, redundancy refers
to unnecessary or repetitive code that doesn't contribute to the program's
functionality and can lead to inefficiencies, maintenance issues, and reduced
code quality.
What is Redundant Code?
 Unnecessary Repetition:
Redundant code involves repeating the same logic or operations in multiple
places within a program when a single, reusable implementation would suffice.
 Unused Code:
It can also include code that is never executed (dead code) or code that has no
external effect.
 Inefficiency:
Redundant code can lead to slower execution times and increased memory
usage.
 Maintenance Challenges:
Redundant code makes it harder to find and fix bugs, as developers have to
check multiple locations for the same functionality.
 Reduced Code Quality:
Redundant code is a sign of poor coding practices and can make the codebase
harder to understand and maintain.
Examples of Redundant Code:
 Recomputing Values:
Calculating the same value multiple times when it could be stored and reused.
 Duplicate Code Blocks:
Having the same code block in multiple functions or methods when a single
function or method could handle the logic.
 Unused Variables or Functions:
Declaring variables or functions that are never used in the program.
 Hardcoded Values:
Repeating the same values (like URLs or database names) throughout the code
instead of using constants or configuration files.
How to Identify and Eliminate Redundancy:
 Code Review: Have other developers review your code to identify
potential redundancies.
 Refactoring: Rewrite the code to remove redundancies and improve the
code structure.
 Use Functions/Methods: Encapsulate repetitive logic into functions or
methods to promote code reuse.
 Use Constants/Configuration Files: Store frequently used values in
constants or configuration files instead of hardcoding them.
 Static Analysis Tools: Use static analysis tools to automatically identify
potential redundancies.
 Interpixel Redundancy:
This refers to the correlation between neighboring pixels, where adjacent pixels
often have similar values or patterns. Interpixel redundancy in image
processing refers to the correlation or similarity between neighboring pixels in
an image, which can be exploited for efficient compression and storage.
Here's a more detailed explanation:
 What it is:
Interpixel redundancy arises because nearby pixels in an image often have
similar or related values, especially in areas with smooth gradients or constant
colors.
 Why it matters:
This redundancy means that not all pixel values are truly independent and can
be predicted from their neighbors. This predictability allows for compression
techniques that encode only the differences or "new" information between
pixels, rather than storing all pixel values individually.
 Psychovisual Redundancy:
This type of redundancy relates to how the human visual system perceives and
interprets images, where certain details or variations are less important or
noticeable than others.
Psychovisual redundancy refers to information in an image that the human
visual system doesn't perceive with the same sensitivity, and therefore can be
eliminated without significantly impacting image perception or quality.
Here's a more detailed explanation:
 The Human Visual System's Selective Processing:
The human eye and brain don't process all visual information equally. Certain
details, like subtle variations in brightness or color, are less important for overall
image understanding than others, such as edges or textures.
 Examples of Psychovisual Redundancy:
 Intensity Variations: The eye can perceive intensity variations
(like Mach bands) even in areas of constant intensity, indicating
that the brain doesn't process every pixel value with the same
attention.
 Color Differences: Humans are more sensitive to differences in
dark intensities than bright ones, and to high spatial frequencies of
green than red or blue.

Huffman Coding

You might also like