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

Image Compression 1

The document discusses image compression, which aims to reduce data size while preserving information, addressing issues like storage, computational costs, and transmission efficiency. It outlines two main types of compression algorithms: lossless and lossy, detailing their characteristics and compression ratios. Additionally, it explains data redundancy types and the components of an encoder and decoder in the compression process.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Image Compression 1

The document discusses image compression, which aims to reduce data size while preserving information, addressing issues like storage, computational costs, and transmission efficiency. It outlines two main types of compression algorithms: lossless and lossy, detailing their characteristics and compression ratios. Additionally, it explains data redundancy types and the components of an encoder and decoder in the compression process.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 93

Digital Image Processing, 2nd ed. www.imageprocessingbook.

com

Image Compression

The goal of image compression is to reduce the amount of data


required to represent a digital image while at the same time
preserving as much information as possible.

Lower memory requirements, faster transmission rates.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Compression

Data and information are not synonymous terms!

Data is the means by which information is conveyed.

The same information can be represented by different amount of


data!

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Why Image Compression?

Storage – Image data is by its nature multidimensional and tend to


take up a lot of space

Computational expenses – Encryption of data is computationally


expensive

Transmission time & costs – ISPs charge by the data amount,


phone companies by the time unit

Limited hardware resources (memory, CPU etc) – Cell phones


with cameras, USB memory sticks

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Compression

We need maximum utilization of storage devices & quick


transmission.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Compression Types

The fundamental task of image compression is to reduce the


amount of data required to represent the image. This is done by
transforming and removing image data redundancies

There are two major categories of compression algorithms:


• Lossless compression algorithms
• Lossy compression algorithms

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Compression Types

• Lossless compression algorithms


The original data is reconstructed perfectly
Theoretical limit on maximal compression
Practical compression ratios of <10 : 1 (still images)

•Lossy compression algorithms


Decompression results in an approximation of the original image
Maximal compression rate is a function of reconstruction quality
Practical compression ratios of >10 : 1 (still images)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Compression Types

The reduced file created by the compression process is


called the compressed file and is used to reconstruct the
image, resulting in the decompressed image

The original image, before any compression is performed,


is called the uncompressed image file

The ratio of the original, uncompressed image file and the


compressed file is referred to as the compression ratio

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Compression Ratio

The compression ratio is denoted by:

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Compression Example

The reduction in file size is necessary to meet the


bandwidth requirements for many transmission
systems, and for the storage requirements in computer
databases

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Data & Information

Image compression involves reducing the size of image


data files, while retaining necessary information
Key to a successful compression scheme is retaining necessary
information
1. Data:
• For digital images, data refers to the pixel gray level values that
correspond to the brightness of a pixel at a point in space
• Data are used to convey information, much like the way the alphabet
is used to convey information via words

2. Information:

• Information is an interpretation of the data in a meaningful way


• Information is an elusive concept; it can be application specific
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Relevant Data Redundancy

1st: No redundant data

Significant compression & Highly


Redundant data
n= number of information carrying units in two data sets that represent
same information.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Types of Data Redundancy

(1) Coding Redundancy


(2) Interpixel (or Spatial) Redundancy
(3) Psychovisual (or Irrelevant Information)
Redundancy
• The goal of data compression is to reduce
one or more of these redundancy types.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Coding Redundancy
• A code is a system of rules to convert information (e.g.,
an image) into another form for efficient storage or
transmission.
– A code consists of a list of
symbols (e.g., letters, numbers,
bits etc.)
– A code word is a sequence of
symbols used to represent some
information (e.g., gray levels).
– The length of a code word is the
number of symbols in the code
word; could be fixed or variable.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Coding Redundancy (cont’d)


• Coding redundancy results from employing inefficient
coding schemes.

• To compare the efficiency of different coding schemes,


we can compute the average number of symbols Lavg
per code word (or average data content).

• Coding schemes with lower Lavg are more efficient since


they save more memory.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Coding Redundancy (cont’d)

N x M image
(symbols: bits)

rk: k-th gray level


l(rk): # of bits for representing rk
P(rk): probability of rk

(average length of symbols per code word


or average data content (bits) per pixel)

Average Image Size:

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Coding Redundancy - Example

• Case 1: l(rk) = fixed length

L=8

/pixel

Average image size: 3NM


© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Coding Redundancy – Example (cont’d)

• Case 2: l(rk) = variable length

L=8

/pixel

Average image size: 2.7NM


© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Interpixel Redundancy
• Interpixel redundancy results from pixel correlations (i.e.,
a pixel value can be reasonably predicted by its neighbors).

histograms

auto-correlation


f ( x) o g ( x)  f ( x) g ( x  a )da


auto-correlation: f(x)=g(x)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Interpixel redundancy (cont’d)


• To reduce interpixel redundancy, some transformation needs
to be applied on the data.

Example: gray-levels of line #100

Grayscale threshold

thresholding
transformation 11 ……………0000……………………..11…..000…..

Original: 1024 bytes


Binary
Thresholded: 1024 bits

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Psychovisual redundancy
• The human eye is more sensitive to the lower frequencies
than to the higher frequencies in the visual spectrum.
• Idea: discard data that is perceptually insignificant (e.g., using
quantization).
256 gray levels 16 gray levels random noise + 16 gray levels

Add a small
Example: random
number
to each pixel
prior to
quantization

CR=8/4 = 2:1
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com

General Image Compression and


Transmission Model

We will focus on the Source Encoder/Decoder only.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Encoder – Three Main Components

• Mapper: applies a transformation to the data to account for


interpixel redundancies.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Encoder (cont’d)

• Quantizer: quantizes the data to account for psychovisual


redundancies.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Encoder (cont’d)

• Symbol encoder: encodes the data to account for coding


redundancies.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Decoder - Three Main Components

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Fidelity Criteria

• How close is to ?
• Criteria
– Subjective: based on human observers.
– Objective: based on mathematically defined
criteria.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

Table 8.14 (Cont’)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression
Table 8.19 (Con’t)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Chapter 8
Image Compression

© 2002 R. C. Gonzalez & R. E. Woods

You might also like