Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Image Compression Algorithmes

Uploaded by

malkmoh781.mm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Image Compression Algorithmes

Uploaded by

malkmoh781.mm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

‫‪Image Compression‬‬

‫‪Algorithmes‬‬
‫الغن محمد‬
‫ي‬ ‫ملك محمد عبد‬ ‫•‬
‫منة عالء أبو الفتح طه‬ ‫•‬
‫كيلس نبيل فهيم‬ ‫ر‬ ‫•‬
‫الجارح‬
‫ي‬ ‫احمد عبد العزيز‬ ‫•‬
‫احمد صابر رجب محمد‬ ‫•‬
-What is image compression?

The main idea of image compression is


It’s some methods and algorithms used to cut out the “less critical” image data
to reduce image size without belonging to an image to make it small
significantly affecting its quality. enough without compromising on its
visual aspects.
For website optimization: Websites with bulky images can take
longer to load and cause high bounce rates.

- Why is To decrease the amount of data being transmitted


Compressing
Images
To save storage speed
Important?

For sending and uploading images without the hassle.


- Image
compression
algorithms
There are multiple methods to compress an image,
but they can be summarized into two categories:
• Lossy compression
• Lossless compression
Lossy
Compression
• This type of image compression
method reduces the image file
size by removing some of the less
critical data of an image,
particularly redundant data.
• However, it doesn’t affect the
visual appearance of images
while uploading or sending.
Lossy Compression

Pros: Cons:
• It provides a highly reduced image size. • Quality hurts due to the high rate of compression.
• Faster loading time. • Removes image components.
• Ideal for web-based platforms. • It is irreversible.
• Supported by a variety of tools, plugins, and software.
-Lossless
Compression
• Lossless image compression
algorithms resize an image
into smaller versions but
don't compromise the image
quality. Simply, this method
compresses images without
eliminating critical data or
reducing image quality.
-Lossless Compression

Pros: Cons:
• Retains critical image information. • Compression files are larger than lossy file.
• Zero loss in image quality. • Decoding is complex.
• Changes are reversed.
• Slightly decreases file sizes.
•JPEG
compression
• JPEG stands for Joint Photographic
Experts Groups which is a type of lossy
compression, and such image
compression algorithms are performed
to reduce the file size without hurting its
quality.
How does
JPEG
compression
work?
• Every image consists of a matrix of pixels
• Every pixel contain a number which is the shade of
color of the pixel
How does JPEG
compression
work?‍

• JPEJ compression is lossy


compression, so we take the
unnecessary parts of the
image and remove them.
How does JPEG
compression
work?‍
• Convert the image from RGB to
YCbCr using color space
conversion by doing matrix
multiplication.
• The YCbCr separates the luminance
from colors.
• The human eye is less sensitive to
luminance than colors, so we can
downsize the colors to save some
space (chroma subsampling).
How does JPEG
compression
work?‍
• contrast decreases from
top to bottom and spatial
frequency increases from
left to right)
• The bars under the curve
are more visible than the
rest
• We can compress the rest
more
How does JPEG
compression work?

• First, we Divide the image to


8x8 blocks
• Compare each block of them
with a 64-frequency pattern
where the spatial frequency
increases from left to write
and top to bottom.
Discrete Cosine transform

How does
JPEG
compression • we decompose the image to 8x8 block of frequency
components where each element represent a brightness level
work?
• Then convert each element to 8x8 blocks where each
element of it represents the presence of a particular
frequency component
How does JPEG
compression
work?
• We can easily compress the frequencies
less visible to us more by dividing those
frequencies by large constants
• The frequencies more visible to us we
divide them by smaller constants
• We quantizes the results by rounding
them to the nearest integer
• The components divided by larger
constants are rounded to zero
• This results in higher compression rate
but lower image quality
• After quantizing, all the high frequencies become zeros
How does JPEG • We can optimize saving the zeros by rearranging them in
compression a zigzag order and grouping the zeros together
work? • Instead of storing each zero separately we can store the
value (zero) and how many time they repeated
consecutively
• Finally, we can further compress what's left by encoding
the more frequent values with fewer bits and less
How does frequent values with more bits. Doing so reduces the

JPEG average number of bits per symbol.


• This process is called entropy coding.
compression • Both run-length encoding and Huffman coding are
work? lossless compression methods. No information is thrown
out in these steps. The compression is achieved solely by
storing redundant data more efficiently.
Uncompressing
images

• When it's time to decode an image, all


these steps are reversed.
• Since some information is lost during
subsampling and quantization steps,
the decoded image won't be identical
to the original one.
• However, the compressed images
should look almost as good as the
original ones when a reasonable
compression rate is used.

You might also like