Dr. Tania Stathaki's Lecture Notes on DCT in Image Processing, Slides of Digital Image Processing

An in-depth exploration of the Discrete Cosine Transform (DCT), a crucial concept in Digital Image Processing. both one-dimensional (1D) and two-dimensional (2D) DCT, explaining their definitions, properties, and applications. The reader will learn about the difference between DCT and Discrete Fourier Transform (DFT), the basis functions, and the advantages of using DCT. Visualizations of 1D and 2D basis functions are also included.

Typology: Slides

2021/2022

Uploaded on 08/01/2022

fioh_ji
fioh_ji ๐Ÿ‡ฐ๐Ÿ‡ผ

4.5

(70)

814 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Digital Image Processing
Image Transforms
The 2D Discrete Cosine Transform
DR TANIA STATHAKI
READER (ASSOCIATE PROFESSOR) IN SIGNAL PROCESSING
IMPERIAL COLLEGE LONDON
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Dr. Tania Stathaki's Lecture Notes on DCT in Image Processing and more Slides Digital Image Processing in PDF only on Docsity!

Digital Image Processing

Image Transforms

The 2D Discrete Cosine Transform

DR TANIA STATHAKI

READER (ASSOCIATE PROFESSOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON

What is this lecture about?

  • Welcome back to the Digital Image Processing lecture!
  • In this lecture we will learn about one of the so-called Discrete Cosine Transform (DCT).
  • The DCT is not a single transform but a family of transforms.
  • We will call the one that we will see here, DCT. In various textbooks different versions of the DCT have names such as Type I DCT, Type II DCT etc.
  • We will start with the one-dimensional Discrete Cosine Transform (1D DCT) and show how this transform can be extended into two dimensions.
  • The 1D DCT is also a member of the family of unitary transforms.
  • For a signal ๐‘“(๐‘ฅ) with 8 samples, the rows of the 8 ร— 8 transformation

1 - D Basis Functions N= 16

  • For a signal ๐‘“(๐‘ฅ) with 16 samples, the rows of the 16 ร— 16 transformation matrix of the DCT are depicted below.

Two-dimensional Discrete Cosine Transform (2D-DCT)

  • Consider an image ๐‘“(๐‘ฅ, ๐‘ฆ) of size ๐‘€ ร— ๐‘.
  • The two-dimensional Discrete Cosine Transform (DCT) is defined as:

๐ถ ๐‘ข, ๐‘ฃ = ๐‘Ž(๐‘ข)๐‘Ž(๐‘ฃ) ๐‘€โˆ’1๐‘ฅ=0 ๐‘โˆ’1๐‘ฆ=0๐‘“(๐‘ฅ, ๐‘ฆ)cos 2๐‘ฅ+1 ๐‘ข๐œ‹ 2๐‘€ cos^

2๐‘ฆ+1 ๐‘ฃ๐œ‹ 2๐‘ , 0 โ‰ค ๐‘ข โ‰ค ๐‘€ โˆ’ 1, 0 โ‰ค ๐‘ฃ โ‰ค ๐‘ โˆ’ 1

  • The inverse transform is:

๐‘“(๐‘ฅ, ๐‘ฆ) = ๐‘Ž ๐‘ข ๐‘Ž ๐‘ฃ ๐ถ(๐‘ข, ๐‘ฃ)

๐‘โˆ’

๐‘ฃ=

๐‘€โˆ’

๐‘ข=

cos

cos

  • ๐‘Ž(๐‘ข) is defined as previously.

Example: Two-dimensional Discrete Cosine Transform (DCT)

  • Consider the two-dimensional signal

๐‘“(๐‘ฅ, ๐‘ฆ) = 1 0 โ‰ค ๐‘ฅ โ‰ค 2, 0 โ‰ค ๐‘ฆ โ‰ค 4 0 elsewhere

  • Its DCT is shown in the figure below.

0

1

2

3

0 1 2 3 u

v

How to visualise 2D Basis Functions ๐‘ = 4

 - 1-D Basis Functions N= 
  • -0.
  • -1. - u= - 1. - 0. - -0. - -1. - u= - 1. - 0. - -0. - -1. - u= - 1. - 0. - -0. - -1. - u=
  • -0.
  • -1. - u= - 1. - 0. - -0. - -1. - u= - 1. - 0. - -0. - -1. - u= - 1. - 0. - -0. - -1. - u=
  • 2-D Basis Functions ๐‘ =

Example: ๐Ÿ– ร— ๐Ÿ– Block DCT

  • The image below left is divided in patches (blocks) of size 8 ร— 8 pixels.
  • The 2D-DCT is applied in each block.
  • The result is depicted in the image below right.
  • This is a standard way to use 2D-DCT in Image Compression Standards (JPEG). Details will be presented in Part 4 of the course.

Example: Energy Compaction

  • Observe the excellent compaction property of 2D-DCT.
  • Lena is shown on the left and its 2D-DCT on the right.