Course Name Multimedia and Human Computer Interaction Course Code: ITEC - M3021 Individual Assignment
Course Name Multimedia and Human Computer Interaction Course Code: ITEC - M3021 Individual Assignment
[Type the abstract of the document here. The abstract is typically a short summary of the contents of the
document. Type the abstract of the document here. The abstract is typically a short summary of the
contents of the document.]
Content ……………………………………………………………………….Page
Introduction ………………………………………………………………… 1
Quantization ………………………………………………. 10
8.1 Introduction:
8.11 what is compression:
Compression in multimedia : involves reducing the file size of images, audio, and
videos without significantly affecting their quality. This makes it easier to store, share, and
stream media. Here’s a quick rundown:
Lossless Compression: Reduces file size without any loss of quality. Examples include PNG for
images and FLAC for audio.
Loss Compression: Reduces file size by removing some data, which may lead to a slight loss in
quality. Examples include JPEG for images, MP3 for audio, and MPEG for videos.
Compression techniques allow for faster downloads and more efficient storage, making
To alleviate the potentially extremely high cost of storage and delivery everyone uses some
form of compression algorithms to reduce file size.
The use of compression is of utmost importance to your success because it reduces the file
size while maintaining the same user-perceived quality.
Well-designed loss compression technology often reduces file sizes significantly before degradation is
noticed by the end-user. Even when noticeable by the user, further data reduction may be desirable (e.g.,
for real-time communication or to reduce transmission times or storage needs). Loss compression is most
commonly used to compress multimedia data (audio, video, and images), especially in applications such
as streaming media and internet telephony. By contrast, lossless compression is typically required for text
and data files, such as bank records and text articles. It can be advantageous to make a master lossless file
which can then be used to produce additional copies from. This allows one to avoid basing new
compressed copies off of a loss source file, which would yield additional artifacts and further unnecessary
information loss.
It is possible to compress many types of digital data in a way that reduces the size of a computer file
needed to store it, or the bandwidth needed to transmit it, with no loss of the full information contained
in the original file. A picture, for example, is converted to a digital file by considering it to be an array of
dots and specifying the color and brightness of each dot. If the picture contains an area of the same color,
it can be compressed without loss by saying "200 red dots" instead of "red dot, red dot, ...(197 more
times)..., red dot."
The original data contains a certain amount of information, and there is a lower bound to the size of a file
that can still carry all the information. Basic information theory says that there is an absolute limit in
reducing the size of this data. When data is compressed, its entropy increases, and it cannot increase
indefinitely. For example, a compressed ZIP file is smaller than its original, but repeatedly compressing the
same file will not reduce the size to nothing. Most compression algorithms can recognize when further
compression would be pointless and would in fact increase the size of the data.
In many cases, files or data streams contain more information than is needed. For example, a picture may
have more detail than the eye can distinguish when reproduced at the largest size intended; likewise, an
audio file does not need a lot of fine detail during a very loud passage. Developing loss compression
techniques as closely matched to human perception as possible is a complex task. Sometimes the ideal is
a file that provides exactly the same perception as the original, with as much digital information as
possible removed; other times, perceptible loss of quality is considered a valid tradeoff.
The terms "irreversible" and "reversible" are preferred over "loss" and "lossless" respectively for some
applications, such as medical image compression, to circumvent the negative implications of "loss". The
type and amount of loss can affect the utility of the images. Artifacts or undesirable effects of
compression may be clearly discernible yet the result still useful for the intended purpose. Or loss
compressed images may be 'visually lossless', or in the case of medical images, so-called diagnostically
acceptable irreversible compression (DAIC)[1] may have been applied.
Loss compression algorithms are techniques that reduce file size by discarding the less important
information.
Nobody likes losing information, but some types of files are so large that there's just not enough space to
keep all the original data, plus we didn't need all that data in the first place. That's often the case with
photos, videos, and audio recordings; files that try to capture the beautiful complexity of the world we
live in.
Computers can capture an incredible amount of detail in a photo—but how much of that detail can
humans actually perceive? As it turns out, there's a lot of detail that we can remove. Loss compression
algorithms are all about figuring out clever ways to remove detail without humans noticing (too much).
JPEG — This standard image file is the go-to choice for non-transparent online images.
GlTF — A standard file format for 3D scenes and models; sometimes known as the “JPEG of 3D”.
MP3 — A standard audio file, often out of favour with the most discerning audiophiles due to lossy
compression.
WebP — Google introduced this file format to replace web mainstays like JPEG, PNG and GIF. WebP files
support lossy and lossless compression.
TIFF — With their high resolutions, transparency and flexibility, TIFF files are a common file format for
graphic design and high-resolution imagery. They offer creators a choice between lossy and lossless
Irretrievable data loss — When you use lossy compression, you can’t retrieve the data. You’ll need
backups if you want to restore your image to its original quality.
File limitations — Once you’ve compressed your image file, there is only very limited potential for editing,
post-production and archiving. Any photo perfectionists out there should take note!
Lack of control — Digital cameras sometimes compress image data automatically. Similarly, continued
edits, saves and resizes can deteriorate your file automatically without input.
8.2 Distortion measures
Distortion measures are used to evaluate the quality of a compressed signal compared to the original.
Common measures include:
Mean Squared Error (MSE): The average of the squares of the errors between the original and
compressed signals. Mean Squared Error (MSE) measures the average of the squares of the
differences (errors) between actual values and predicted values. It's used to quantify the quality of a
model or algorithm. Lower MSE means better accuracy.
MSE is calculated by taking the sum of squared differences between actual and predicted values, then
dividing by the number of observations. Mathematically:
n
1
MSE= ∑ ( y i− y
2
n i=1
∧
i
)
Peak Signal-to-Noise Ratio (PSNR): A measure used in image and video compression to assess the
quality of reconstruction.
Peak Signal-to-Noise Ratio (PSNR) measures the quality of a compressed image or video compared to
the original. A higher PSNR value indicates better quality, as it signifies less distortion from the
original. It’s often used in loss
Signal-to-Noise Ratio (SNR): Compares the level of the desired signal to the level of background noise.
Measures
the level of the desired signal compared to the level of background noise. A higher SNR indicates a cle
arer and higher-quality signal. It’s calculated as:
SNR is crucial in fields like audio processing, telecommunications, and data transmission, as it helps de
Total Harmonic Distortion (THD) measures the distortion in a signal caused by harmonics. It’s calculate
d as the ratio of the sum of the powers of all harmonic components to the power of the fundamental f
requency.
THD= √
∑ ∞=2 p n 2
Mathematically : n
p1
Where P1 is the power of the fundamental frequency and Pn is the power of the n-th harmonic.
THD is crucial in audio and signal processing, as it helps assess the fidelity of audio systems and ampli
fiers. Lower THD means less distortion and higher audio quality.
Rate-Distortion Function
This function helps determine the minimum possible distortion for a given bitrate. The aim is to compress
data as much as possible without noticeable loss in quality.
Key Concepts
Distortion (D): The error or difference between the original and the compressed signal.
R-D Function
R(D)=min{I(x;x^)∣E[d(x,x^)]≤d}
Where:
I(x;x^) is the mutual information between the source x and the encoded signal x^.
d(x,x^) is a distortion measure.
Applications in Multimedia
Image Compression (JPEG): Ensures that images are compressed to a small size while maintaining visual
quality.
Video Compression (MPEG): Balances file size and quality, making streaming and storage efficient.
Audio Compression (MP3): Reduces file size with minimal perceptible loss in sound quality.
Practical Example:
Imagine encoding a video. If you lower the bitrate too much, you'll see noticeable artifacts (distortion). Rate-
distortion optimization helps find the sweet spot where the video looks good and the file size is manageable.
This optimization is critical for efficient storage and fast transmission of multimedia content.
Practical Use
It helps determine the optimal balance between compression efficiency (lower bitrate) and signal quality
(lower distortion). For instance:
In video compression: It ensures videos maintain good quality while reducing file size.
In image compression: It balances image quality and file size, crucial for formats like JPEG.
The R-D function is essential for optimizing loss compression algorithms, ensuring that we get the best
possible quality at the smallest possible file size.
8.3 Quantization
Quantization and lossy compression algorithms are essential for reducing the size of multimedia files wh
ile maintaining acceptable quality. Here's a brief overview:
Quantization:
Quantization reduces the number of distinct values in a signal, which is a key source of loss in lossy com
pression. There are different types of quantization:
Vector Quantization: Groups values into vectors and quantizes them as a whole, often used in
image compression1.
These algorithms reduce file size by removing some data, which may result in a loss of quality:
JPEG: Uses Discrete Cosine Transform (DCT) and quantization for image compression2 .
MPEG: Utilizes motion compensation and DCT for video compression2.
Wavelet-Based Coding: Used in JPEG 2000 and some video compression schemes, offering better sca
lability and performance2.
These techniques help balance the trade-off between compression efficiency and signal quality, making
multimedia content more manageable for storage and transmission.