3
Most read
11
Most read
12
Most read
Discrete Cosine, Walsh and Hadamard Transform for
2D Signal
Subject: Image Procesing & Computer Vision
Dr. Varun Kumar
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 1 / 14
Outlines
1 Discrete Cosine Transform
2 Walsh Transform
3 Hadamard Transform
4 References
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 2 / 14
Introduction to forward and inverse transform
Forward and inverse transform
Discrete Fourier transform (DFT) is a special class of transformation.
General forward transformation can be expressed as
T(u, v) =
N−1
x=0
N−1
y=0
f (x, y)g(x, y, u, v) (1)
In case of DFT, g(x, y, u, v) = 1
N e−j 2π
N
(ux+vy)
Inverse transformation
f (x, y) =
N−1
u=0
N−1
v=0
T(u, v)h(x, y, u, v) (2)
In case of I-DFT, h(x, y, u, v) = 1
N ej 2π
N
(ux+vy)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 3 / 14
Continued–
g(x, y, u, v) = g1(x, u)g2(y, v) General expression
= g1(x, u)g1(y, v) Symmetric form
(3)
In case of DFT,
g(x, y, u, v) =
1
N
e−j 2π
N
(ux+vy)
=
1
√
N
e−j 2π
N
ux
g1(x,u)
1
√
N
e−j 2π
N
vy
g1(y,v)
(4)
Note:
Symmetric and separable forward transformation.
Similarly, symmetric and separable inverse transformation.
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 4 / 14
Discrete cosine transform (DCT)
g(x, y, u, v) = α(u)α(v) cos
(2x + 1)uπ
2N
cos
(2y + 1)vπ
2N
(5)
g(x, y, u, v) → Forward transformation kernel.
α(u) =
1
√
N
, when u = 0
=
2
N
∀ u = 1, 2, ...N − 1
(6)
Hence forward transformation for DCT
C(u, v) = α(u)α(v)
N−1
x=0
N−1
y=0
f (x, y) cos
(2x + 1)uπ
2N
cos
(2y + 1)vπ
2N
(7)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 5 / 14
Inverse DCT
f (x, y) =
N−1
u=0
N−1
v=0
α(u)α(v)C(u, v) cos
(2x + 1)uπ
2N
cos
(2y + 1)vπ
2N
(8)
Note:
⇒ Periodicity of DCT (2N) does not remain same as the periodicity of
DFT (N).
⇒ The major application of DCT is for the data compression and energy
contraction.
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 6 / 14
Walsh transform
1D kernel and forward transformation
g(x, u) =
1
N
n−1
i=0
(−1)bi (x)bn−1−i (u)
(9)
⇒ N → Total number of samples
⇒ n → Number of bits x/u
⇒ bk(z) → kth bit in digital/binary representation of z.
Forward transformation
W (u) =
1
N
N−1
x=0
f (x)
n−1
i=0
(−1)bi (x)bn−1−i (x)
(10)
Inverse transformation kernel
h(x, u) =
n−1
i=0
(−1)bi (x)bn−1−i (u)
(11)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 7 / 14
Continued–
f (x) =
N−1
u=0
W (u)
n−1
i=0
(−1)bi (x)bn−1−i (u)
(12)
In case of 2D signal (forward transformation kernel)
g(x, y, u, v) =
1
N
n−1
i=0
(−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v)
(13)
(Inverse transformation kernel)
h(x, y, u, v) =
1
N
n−1
i=0
(−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v)
(14)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 8 / 14
Walsh transform for 2D signal
Forward and inverse transform
Forward transform
W (u, v) =
1
N
N−1
x=0
N−1
y=0
f (x, y)
n−1
i=0
(−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v)
(15)
Inverse transform
f (x, y) =
1
N
N−1
u=0
N−1
v=0
W (u, v)
n−1
i=0
(−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v)
(16)
Note
1 Walsh transformation is separable and symmetric.
2 It is faster 2D signal transformation compare to DFT.
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 9 / 14
Fast Walsh transform
Computational observation
1D signal
W (u) =
1
2
Weven(u) + Wodd (u) (17)
or
W (u + M) =
1
2
Weven(u) − Wodd (u) (18)
⇒ u = 0, 1, ...(N/2 − 1)
⇒ M = N/2
Note:
This is a recursive operation and like FFT, fast Walsh transform can
also be done.
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 10 / 14
Hadamard transformation
1D signal
g(x, u) =
1
N
(−1)
n−1
i=0 bi (x)bi (u)
(19)
and
H(u) =
1
N
N−1
x=0
f (x)(−1)
n−1
i=0 bi (x)bi (u)
(20)
Note:
⇒ Forward and inverse kernel both are identical like Walsh transform.
h(x, u) =
1
N
(−1)
n−1
i=0 bi (x)bi (u)
(21)
and
f (x) =
1
N
N−1
u=0
H(u)(−1)
n−1
i=0 bi (x)bi (u)
(22)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 11 / 14
Continued–
For 2D signal
g(x, y, u, v) =
1
N
(−1)
n−1
i=0 bi (x)bi (u)+bi (y)bi (v)
(23)
and
h(x, y, u, v) =
1
N
(−1)
n−1
i=0 bi (x)bi (u)+bi (y)bi (v)
(24)
Forward and inverse kernel are identical.
Hadamard matrix
H =
1 1
1 − 1
at N = 2 and H2N =
HN HN
HN − HN
(25)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 12 / 14
Modified Hadamard relation
g(x, u) =
1
N
(−1)
n−1
i=0 bi (x)pi (u)
(26)
where,
p0(u) = bn−1(u)
p1(u) = bn−1(u) + bn−2(u)
...
pn−1(u) = b1(u) + b0(u)
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 13 / 14
References
M. Sonka, V. Hlavac, and R. Boyle, Image processing, analysis, and machine vision.
Cengage Learning, 2014.
D. A. Forsyth and J. Ponce, “A modern approach,” Computer vision: a modern
approach, vol. 17, pp. 21–48, 2003.
L. Shapiro and G. Stockman, “Computer vision prentice hall,” Inc., New Jersey,
2001.
R. C. Gonzalez, R. E. Woods, and S. L. Eddins, Digital image processing using
MATLAB. Pearson Education India, 2004.
Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 14 / 14

More Related Content

PPT
Image trnsformations
PDF
03 image transform
PDF
Lecture 14 Properties of Fourier Transform for 2D Signal
PDF
Lecture 16 KL Transform in Image Processing
PPTX
Walsh transform
PDF
Lecture 13 (Usage of Fourier transform in image processing)
PPTX
PPT
Chapter 5 Image Processing: Fourier Transformation
Image trnsformations
03 image transform
Lecture 14 Properties of Fourier Transform for 2D Signal
Lecture 16 KL Transform in Image Processing
Walsh transform
Lecture 13 (Usage of Fourier transform in image processing)
Chapter 5 Image Processing: Fourier Transformation

What's hot (20)

PPT
Discrete cosine transform
PPTX
Image Enhancement - Point Processing
PPTX
Wavelet based image compression technique
PPTX
Image restoration and degradation model
PPT
Wavelet transform in image compression
PPT
Frequency Domain Image Enhancement Techniques
PPTX
Image compression models
PPTX
Homomorphic filtering
PPTX
Region based segmentation
PDF
Wiener Filter
PDF
Noise Models
PPT
08 frequency domain filtering DIP
PPTX
5. gray level transformation
PPTX
Point processing
ODP
image compression ppt
PPT
Chapter 4 Image Processing: Image Transformation
PPTX
Image Sampling and Quantization.pptx
PPTX
digital image processing
PPTX
Digital Image Processing
Discrete cosine transform
Image Enhancement - Point Processing
Wavelet based image compression technique
Image restoration and degradation model
Wavelet transform in image compression
Frequency Domain Image Enhancement Techniques
Image compression models
Homomorphic filtering
Region based segmentation
Wiener Filter
Noise Models
08 frequency domain filtering DIP
5. gray level transformation
Point processing
image compression ppt
Chapter 4 Image Processing: Image Transformation
Image Sampling and Quantization.pptx
digital image processing
Digital Image Processing
Ad

Similar to Lecture 15 DCT, Walsh and Hadamard Transform (20)

PPT
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
PPTX
Chapter no4 image transform3
PPTX
DISTINGUISH BETWEEN WALSH TRANSFORM AND HAAR TRANSFORMDip transforms
PPT
Unit - i-Image Transformations Gonzalez.ppt
PPT
Ch15 transforms
PPTX
Transformimet e sinjaleve numerike duke perdorur transformimet
PDF
Lecture 12 (Image transformation)
PPTX
sodapdf-converzxXxccccCCCCCCCSsted (1).pptx
PPT
PDF
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
PDF
Lecture 2 Introduction to digital image
PPTX
Filtering in frequency domain
PDF
DFT,DCT TRANSFORMS.pdf
PPT
Digital Image Processing_ ch3 enhancement freq-domain
PDF
Color image analyses using four deferent transformations
PDF
Color image analyses using four deferent transformations
PPTX
Image TransformsXSsSsSsSsSsSsSsSccd.pptx
PPTX
Fourier transform
PPTX
Image transforms
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Chapter no4 image transform3
DISTINGUISH BETWEEN WALSH TRANSFORM AND HAAR TRANSFORMDip transforms
Unit - i-Image Transformations Gonzalez.ppt
Ch15 transforms
Transformimet e sinjaleve numerike duke perdorur transformimet
Lecture 12 (Image transformation)
sodapdf-converzxXxccccCCCCCCCSsted (1).pptx
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
Lecture 2 Introduction to digital image
Filtering in frequency domain
DFT,DCT TRANSFORMS.pdf
Digital Image Processing_ ch3 enhancement freq-domain
Color image analyses using four deferent transformations
Color image analyses using four deferent transformations
Image TransformsXSsSsSsSsSsSsSsSccd.pptx
Fourier transform
Image transforms
Ad

More from VARUN KUMAR (20)

PDF
Distributed rc Model
PDF
Electrical Wire Model
PDF
Interconnect Parameter in Digital VLSI Design
PDF
Introduction to Digital VLSI Design
PDF
Challenges of Massive MIMO System
PDF
E-democracy or Digital Democracy
PDF
Ethics of Parasitic Computing
PDF
Action Lines of Geneva Plan of Action
PDF
Geneva Plan of Action
PDF
Fair Use in the Electronic Age
PDF
Software as a Property
PDF
Orthogonal Polynomial
PDF
Patent Protection
PDF
Copyright Vs Patent and Trade Secrecy Law
PDF
Property Right and Software
PDF
Investigating Data Trials
PDF
Gaussian Numerical Integration
PDF
Censorship and Controversy
PDF
Romberg's Integration
PDF
Introduction to Censorship
Distributed rc Model
Electrical Wire Model
Interconnect Parameter in Digital VLSI Design
Introduction to Digital VLSI Design
Challenges of Massive MIMO System
E-democracy or Digital Democracy
Ethics of Parasitic Computing
Action Lines of Geneva Plan of Action
Geneva Plan of Action
Fair Use in the Electronic Age
Software as a Property
Orthogonal Polynomial
Patent Protection
Copyright Vs Patent and Trade Secrecy Law
Property Right and Software
Investigating Data Trials
Gaussian Numerical Integration
Censorship and Controversy
Romberg's Integration
Introduction to Censorship

Recently uploaded (20)

PPTX
IOP Unit 1.pptx for btech 1st year students
PPTX
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
PDF
IAE-V2500 Engine Airbus Family A319/320
PDF
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PDF
Performance, energy consumption and costs: a comparative analysis of automati...
PDF
electrical machines course file-anna university
PDF
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PPTX
quantum theory on the next future in.pptx
PPTX
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
PDF
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
PDF
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
PPTX
chapter 1.pptx dotnet technology introduction
PDF
THE PEDAGOGICAL NEXUS IN TEACHING ELECTRICITY CONCEPTS IN THE GRADE 9 NATURAL...
PDF
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
PPTX
SC Robotics Team Safety Training Presentation
PPTX
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
PPT
UNIT-I Machine Learning Essentials for 2nd years
PPTX
Design ,Art Across Digital Realities and eXtended Reality
IOP Unit 1.pptx for btech 1st year students
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
IAE-V2500 Engine Airbus Family A319/320
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
Performance, energy consumption and costs: a comparative analysis of automati...
electrical machines course file-anna university
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
quantum theory on the next future in.pptx
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
chapter 1.pptx dotnet technology introduction
THE PEDAGOGICAL NEXUS IN TEACHING ELECTRICITY CONCEPTS IN THE GRADE 9 NATURAL...
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
SC Robotics Team Safety Training Presentation
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
UNIT-I Machine Learning Essentials for 2nd years
Design ,Art Across Digital Realities and eXtended Reality

Lecture 15 DCT, Walsh and Hadamard Transform

  • 1. Discrete Cosine, Walsh and Hadamard Transform for 2D Signal Subject: Image Procesing & Computer Vision Dr. Varun Kumar Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 1 / 14
  • 2. Outlines 1 Discrete Cosine Transform 2 Walsh Transform 3 Hadamard Transform 4 References Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 2 / 14
  • 3. Introduction to forward and inverse transform Forward and inverse transform Discrete Fourier transform (DFT) is a special class of transformation. General forward transformation can be expressed as T(u, v) = N−1 x=0 N−1 y=0 f (x, y)g(x, y, u, v) (1) In case of DFT, g(x, y, u, v) = 1 N e−j 2π N (ux+vy) Inverse transformation f (x, y) = N−1 u=0 N−1 v=0 T(u, v)h(x, y, u, v) (2) In case of I-DFT, h(x, y, u, v) = 1 N ej 2π N (ux+vy) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 3 / 14
  • 4. Continued– g(x, y, u, v) = g1(x, u)g2(y, v) General expression = g1(x, u)g1(y, v) Symmetric form (3) In case of DFT, g(x, y, u, v) = 1 N e−j 2π N (ux+vy) = 1 √ N e−j 2π N ux g1(x,u) 1 √ N e−j 2π N vy g1(y,v) (4) Note: Symmetric and separable forward transformation. Similarly, symmetric and separable inverse transformation. Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 4 / 14
  • 5. Discrete cosine transform (DCT) g(x, y, u, v) = α(u)α(v) cos (2x + 1)uπ 2N cos (2y + 1)vπ 2N (5) g(x, y, u, v) → Forward transformation kernel. α(u) = 1 √ N , when u = 0 = 2 N ∀ u = 1, 2, ...N − 1 (6) Hence forward transformation for DCT C(u, v) = α(u)α(v) N−1 x=0 N−1 y=0 f (x, y) cos (2x + 1)uπ 2N cos (2y + 1)vπ 2N (7) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 5 / 14
  • 6. Inverse DCT f (x, y) = N−1 u=0 N−1 v=0 α(u)α(v)C(u, v) cos (2x + 1)uπ 2N cos (2y + 1)vπ 2N (8) Note: ⇒ Periodicity of DCT (2N) does not remain same as the periodicity of DFT (N). ⇒ The major application of DCT is for the data compression and energy contraction. Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 6 / 14
  • 7. Walsh transform 1D kernel and forward transformation g(x, u) = 1 N n−1 i=0 (−1)bi (x)bn−1−i (u) (9) ⇒ N → Total number of samples ⇒ n → Number of bits x/u ⇒ bk(z) → kth bit in digital/binary representation of z. Forward transformation W (u) = 1 N N−1 x=0 f (x) n−1 i=0 (−1)bi (x)bn−1−i (x) (10) Inverse transformation kernel h(x, u) = n−1 i=0 (−1)bi (x)bn−1−i (u) (11) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 7 / 14
  • 8. Continued– f (x) = N−1 u=0 W (u) n−1 i=0 (−1)bi (x)bn−1−i (u) (12) In case of 2D signal (forward transformation kernel) g(x, y, u, v) = 1 N n−1 i=0 (−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v) (13) (Inverse transformation kernel) h(x, y, u, v) = 1 N n−1 i=0 (−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v) (14) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 8 / 14
  • 9. Walsh transform for 2D signal Forward and inverse transform Forward transform W (u, v) = 1 N N−1 x=0 N−1 y=0 f (x, y) n−1 i=0 (−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v) (15) Inverse transform f (x, y) = 1 N N−1 u=0 N−1 v=0 W (u, v) n−1 i=0 (−1)bi (x)bn−1−i (u)+bi (y)bn−1−i (v) (16) Note 1 Walsh transformation is separable and symmetric. 2 It is faster 2D signal transformation compare to DFT. Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 9 / 14
  • 10. Fast Walsh transform Computational observation 1D signal W (u) = 1 2 Weven(u) + Wodd (u) (17) or W (u + M) = 1 2 Weven(u) − Wodd (u) (18) ⇒ u = 0, 1, ...(N/2 − 1) ⇒ M = N/2 Note: This is a recursive operation and like FFT, fast Walsh transform can also be done. Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 10 / 14
  • 11. Hadamard transformation 1D signal g(x, u) = 1 N (−1) n−1 i=0 bi (x)bi (u) (19) and H(u) = 1 N N−1 x=0 f (x)(−1) n−1 i=0 bi (x)bi (u) (20) Note: ⇒ Forward and inverse kernel both are identical like Walsh transform. h(x, u) = 1 N (−1) n−1 i=0 bi (x)bi (u) (21) and f (x) = 1 N N−1 u=0 H(u)(−1) n−1 i=0 bi (x)bi (u) (22) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 11 / 14
  • 12. Continued– For 2D signal g(x, y, u, v) = 1 N (−1) n−1 i=0 bi (x)bi (u)+bi (y)bi (v) (23) and h(x, y, u, v) = 1 N (−1) n−1 i=0 bi (x)bi (u)+bi (y)bi (v) (24) Forward and inverse kernel are identical. Hadamard matrix H = 1 1 1 − 1 at N = 2 and H2N = HN HN HN − HN (25) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 12 / 14
  • 13. Modified Hadamard relation g(x, u) = 1 N (−1) n−1 i=0 bi (x)pi (u) (26) where, p0(u) = bn−1(u) p1(u) = bn−1(u) + bn−2(u) ... pn−1(u) = b1(u) + b0(u) Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 13 / 14
  • 14. References M. Sonka, V. Hlavac, and R. Boyle, Image processing, analysis, and machine vision. Cengage Learning, 2014. D. A. Forsyth and J. Ponce, “A modern approach,” Computer vision: a modern approach, vol. 17, pp. 21–48, 2003. L. Shapiro and G. Stockman, “Computer vision prentice hall,” Inc., New Jersey, 2001. R. C. Gonzalez, R. E. Woods, and S. L. Eddins, Digital image processing using MATLAB. Pearson Education India, 2004. Subject: Image Procesing & Computer Vision Dr. Varun Kumar (IIIT Surat)Lecture 15 14 / 14