SlideShare a Scribd company logo
1
UNIT-II
Prepared by
T. RAVI KUMAR NAIDU
1
Image Transformations
2
Contents
• Fourier Transform and DFT
• Walsh Transform
• Hadamard Transform
• Walsh-Hadamard Transform (WHT)
• Discrete Cosine Transform (DCT)
• Haar Transform
• Slant Transform
• Comparison of various Transforms
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
• To get some sense of what basis elements look like, we plot a
basis element --- or rather, its real part ---as a function of x,y
for some fixed u, v. We get a function that is constant when
(ux + vy) is constant.
• The magnitude of the vector (u, v) gives a frequency, and its
direction gives an orientation. The function is a sinusoid with
this frequency along the direction, and constant perpendicular
to the direction.
Here u and v are larger than in the previous slide.
And larger still...
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
DFT Properties: (1) Separability
• The 2D DFT can be computed using 1D transforms only:
Forward DFT:
2 ( ) 2 ( ) 2 ( )
ux vy ux vy
j j j
N N N
e e e
  

  

kernel is separable:
DFT Properties: (1) Separability (cont’d)
• Rewrite F(u,v) as follows:
• Let’s set:
• Then:
• How can we compute F(x,v)?
• How can we compute F(u,v)?
DFT Properties: (1) Separability (cont’d)
N x DFT of rows of f(x,y)
DFT of coloums of F(x,v)
DFT Properties: (1) Separability (cont’d)
DFT Properties: (2) Periodicity
• The DFT and its inverse are periodic with period N
DFT Properties: (3) Symmetry
DFT Properties: (4) Translation
f(x,y) F(u,v)
• Translation in spatial domain:
• Translation in frequency domain:
DFT Properties: (4) Translation (cont’d)
• To “see” a full period, we need to translate the origin of the
transform at u=N/2 (or (N/2,N/2) in 2D)
|F(u-N/2)|
|F(u)|
DFT Properties: (4) Translation (cont’d)
• To move F(u,v) at (N/2, N/2), take
DFT Properties: (4) Translation (cont’d)
no translation after translation
sinc
sinc
DFT Properties: (5) Rotation
• Rotating f(x,y) by θ rotates F(u,v) by θ
DFT Properties: (6) Addition/Multiplication
but …
DFT Properties: (7) Scale
DFT Properties: (8) Average value
So:
Average:
F(u,v) at u=0, v=0:
Magnitude and Phase of DFT
• What is more important?
• Hint: use the inverse DFT to reconstruct the input
image using only magnitude or phase information
magnitude phase
Magnitude and Phase of DFT (cont’d)
Reconstructed image using
magnitude only
(i.e., magnitude determines the
strength of each component)
Reconstructed image using
phase only
(i.e., phase determines
the phase of each component)
29
Walsh Transform
“+” denotes for +1 and “-” denotes for -1.
       







1
n
0
i
u
b
x
b i
1
n
i
1
N
1
u
,
x
g
In 1-D case we have :
In the following table N=8 so n=3 (23
=8).
1-D kernel
30
Walsh Transform
When N=2n
, the 2-D forward and inverse Walsh kernels are given by the relations
           
 
           
 




















1
0
1
0
1
1
1
1
1
1
,
,
,
1
1
,
,
,
n
i
v
b
y
b
u
b
x
b
n
i
v
b
y
b
u
b
x
b
i
n
i
i
n
i
i
n
i
i
n
i
N
v
u
y
x
h
and
N
v
u
y
x
g
Where bk(z) is the kth
bit in the binary representation of z.
So the forward and inverse Walsh transforms are equal in form; that is:
31
Walsh Transform
This figure shows the basis functions
(kernels) as a function of u and v
(excluding the 1/N constant term) for
computing the Walsh transform when
N=4. Each block corresponds to varying x
and y form 0 to 3 (that is, 0 to N-1), while
keeping u and v fixed at the values
corresponding to that block. Thus each
block consists of an array of 4×4 binary
elements (White means “+1” and Black
means “-1”). To use these basis functions
to compute the Walsh transform of an
image of size 4×4 simply requires
obtaining W(0,0) by multiplying the image
array point-by-point with the 4×4 basis
block corresponding to u=0 and v=0,
adding the results, and dividing by 4, and
continue for other values of u and v.
32
1D-Walsh Transform
33
1D – Inverse Walsh Transform
34
2D-Walsh Transform
35
2D – Inverse Walsh Transform
Implementation of the 2-D Walsh Transform
• The 2-D Walsh transform is separable and symmetric.
• Therefore it can be implemented as a sequence of two 1-D
Walsh transforms, in a fashion similar to that of the 2-D DFT.
• Remember that the Fourier transform is based on
trigonometric terms.
• The Walsh transform consists of basis functions whose
values are only 1 and -1.
• They have the form of square waves.
• These functions can be implemented more efficiently in a digital
environment than the exponential basis functions of the Fourier
transform.
36
Kernels of Forward and Inverse Walsh Transform
• For 1-D signals the forward and inverse Walsh kernels differ
only in a constant multiplicative factor of N .
• This is because the array formed by the kernels is a
symmetric matrix having orthogonal rows and columns,
so its inverse array is the same as the array itself!
• In 2-D signals the forward and inverse Walsh kernels are
identical!
• The Concept of Sequency : We can think of frequency as
the number of zero crossings or the number of transitions in
a basis vector and we call this number sequency.
37
The Concept of Sequency
38
Sequency: 0 1 3 2 7 6 4 5
2-D Hadamard Transform
39
2-D Inverse Hadamard Transform
40
41
Hadamard Transform
When N=2n
, the 2-D forward and inverse Hadamard kernels are given by the relations
           
 
           
 












1
0
1
0
1
1
,
,
,
1
1
,
,
,
n
i
i
i
i
i
n
i
i
i
i
i
v
b
y
b
u
b
x
b
v
b
y
b
u
b
x
b
N
v
u
y
x
h
N
v
u
y
x
g
Where bk(z) is the kth bit in the binary representation of z.
So the forward and inverse Hadamard transforms are equal in form; that is:
42
Hadamard Transform
       





1
0
1
1
,
n
i
i
i u
b
x
b
N
u
x
g
In 1-D case we
have :
In the following table N=8 so n=3 (23
=8).
1-D kernel
“+” denotes for +1 and “-” denotes for -1.
       








1
0
1
)
(
1 1
0
n
i
i
i u
b
x
b
N
x
x
f
N
u
H
43
Hadamard Transform
This figure shows the basis functions
(kernels) as a function of u and v
(excluding the 1/N constant term) for
computing the Hadamard transform
when N=4. Each block corresponds to
varying x and y form 0 to 3 (that is, 0 to
N-1), while keeping u and v fixed at the
values corresponding to that block. Thus
each block consists of an array of 4×4
binary elements (White means “+1” and
Black means “-1”) like Walsh transform.
If we compare these two transforms we
can see that they only differ in the sense
that the functions in Hadamard transform
are ordered in increasing sequency and
thus are more “natural” to interpret.
Recursive Relationship of the
Hadamard Transform
44
45
The Concept of Sequency
Sequency: 0 7 3 4 1 6 2 5
46
1-D WHT Kernel Functions
1-D WHT Kernel Functions
Sequency: 0 1 2 3 4 5 6 7
48
2-D Walsh-Hadamard Transform (WHT)
49
2-D WHT Kernel Functions
50
WHT and Fourier Transform
1-D Discrete Cosine Transform
1-D Discrete Cosine Transform
53
2-D Discrete Cosine Transform
54
Discrete Cosine Transform (DCT)
Each block consists of 4×4 elements, corresponding to x and y varying
from 0 to 3. The highest value is shown in white. Other values are shown
in grays, with darker meaning smaller.
55
Slant Transform
• The Slant Transform matrix of order N*N is the recursive expression








1
1
1
1
2
1
S2
 
2
1
2
2
N
1
N
4
N
3
a 







Where I is the identity matrix, and
 
2
1
2
2
N
1
N
4
4
N
b 








Slant Transform
57
Haar Transform
The Haar transform is based on the Haar functions, hk(z), which are
defined over the continuous, closed interval [0,1] for z, and for
k=0,1,2,…,N-1, where N=2n
.
The first step in generating the Haar transform is to note that the
integer k can be decomposed uniquely as k=2p
+q-1
where 0≤p≤n-1, q=0 or 1 for p=0, and 1≤q≤2p
for p≠0.
With this background, the Haar functions are defined as
     
   
 























1
,
0
z
for
otherwise
0
2
q
z
2
2
/
1
q
2
2
2
/
1
q
z
2
1
q
2
N
1
z
h
z
h
and
1
,
0
z
for
N
1
z
h
z
h
p
p
2
/
p
p
p
2
/
p
00
k
00
0


Haar Transform
Or
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt
The End
64

More Related Content

PPTX
Chapter no4 image transform3
PDF
Lecture 15 DCT, Walsh and Hadamard Transform
PPT
Unit - i-Image Transformations Gonzalez.ppt
PPT
Image trnsformations
PPTX
Walsh transform
PPT
PPTX
Transformimet e sinjaleve numerike duke perdorur transformimet
PPTX
Chapter no4 image transform3
Lecture 15 DCT, Walsh and Hadamard Transform
Unit - i-Image Transformations Gonzalez.ppt
Image trnsformations
Walsh transform
Transformimet e sinjaleve numerike duke perdorur transformimet

Similar to Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt (20)

PDF
DFT,DCT TRANSFORMS.pdf
PPT
Ch15 transforms
PPT
Digital Image Processing_ ch3 enhancement freq-domain
PPTX
Fourier transform
PDF
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
PPTX
DISTINGUISH BETWEEN WALSH TRANSFORM AND HAAR TRANSFORMDip transforms
PPT
DSP12_PP 8 POINT RADIX-2 pptDIT-FFT.ppt
PPT
FourierTransform detailed power point presentation
PDF
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
PPT
15Tarique_DSP_8ETC.PPT
PPTX
Image TransformsXSsSsSsSsSsSsSsSccd.pptx
PPTX
imagetransforms1-210417050321.pptx
PPTX
The Discrete Fourier Transform by Group 7..pptx
PDF
Resourceful fast dht algorithm for vlsi implementation by split radix algorithm
PDF
Phase Preserving Denoising of Images
PDF
Fourier slide
PDF
lec08_computation_of_DFT.pdf
PPT
Image transforms 2
DFT,DCT TRANSFORMS.pdf
Ch15 transforms
Digital Image Processing_ ch3 enhancement freq-domain
Fourier transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DISTINGUISH BETWEEN WALSH TRANSFORM AND HAAR TRANSFORMDip transforms
DSP12_PP 8 POINT RADIX-2 pptDIT-FFT.ppt
FourierTransform detailed power point presentation
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
15Tarique_DSP_8ETC.PPT
Image TransformsXSsSsSsSsSsSsSsSccd.pptx
imagetransforms1-210417050321.pptx
The Discrete Fourier Transform by Group 7..pptx
Resourceful fast dht algorithm for vlsi implementation by split radix algorithm
Phase Preserving Denoising of Images
Fourier slide
lec08_computation_of_DFT.pdf
Image transforms 2
Ad

Recently uploaded (20)

PDF
The scientific heritage No 166 (166) (2025)
PPTX
2. Earth - The Living Planet Module 2ELS
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PPTX
Introduction to Cardiovascular system_structure and functions-1
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PPT
POSITIONING IN OPERATION THEATRE ROOM.ppt
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PDF
. Radiology Case Scenariosssssssssssssss
PPT
protein biochemistry.ppt for university classes
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
Cell Membrane: Structure, Composition & Functions
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
2. Earth - The Living Planet earth and life
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PDF
HPLC-PPT.docx high performance liquid chromatography
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
The scientific heritage No 166 (166) (2025)
2. Earth - The Living Planet Module 2ELS
bbec55_b34400a7914c42429908233dbd381773.pdf
Introduction to Cardiovascular system_structure and functions-1
Viruses (History, structure and composition, classification, Bacteriophage Re...
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
Biophysics 2.pdffffffffffffffffffffffffff
POSITIONING IN OPERATION THEATRE ROOM.ppt
Taita Taveta Laboratory Technician Workshop Presentation.pptx
The KM-GBF monitoring framework – status & key messages.pptx
Derivatives of integument scales, beaks, horns,.pptx
. Radiology Case Scenariosssssssssssssss
protein biochemistry.ppt for university classes
Comparative Structure of Integument in Vertebrates.pptx
Cell Membrane: Structure, Composition & Functions
Classification Systems_TAXONOMY_SCIENCE8.pptx
2. Earth - The Living Planet earth and life
INTRODUCTION TO EVS | Concept of sustainability
HPLC-PPT.docx high performance liquid chromatography
TOTAL hIP ARTHROPLASTY Presentation.pptx
Ad

Unit-1.B IMAGE TRANSFORMATIONS and fundamental.ppt

  • 1. 1 UNIT-II Prepared by T. RAVI KUMAR NAIDU 1 Image Transformations
  • 2. 2 Contents • Fourier Transform and DFT • Walsh Transform • Hadamard Transform • Walsh-Hadamard Transform (WHT) • Discrete Cosine Transform (DCT) • Haar Transform • Slant Transform • Comparison of various Transforms
  • 6. • To get some sense of what basis elements look like, we plot a basis element --- or rather, its real part ---as a function of x,y for some fixed u, v. We get a function that is constant when (ux + vy) is constant. • The magnitude of the vector (u, v) gives a frequency, and its direction gives an orientation. The function is a sinusoid with this frequency along the direction, and constant perpendicular to the direction.
  • 7. Here u and v are larger than in the previous slide. And larger still...
  • 14. DFT Properties: (1) Separability • The 2D DFT can be computed using 1D transforms only: Forward DFT: 2 ( ) 2 ( ) 2 ( ) ux vy ux vy j j j N N N e e e         kernel is separable:
  • 15. DFT Properties: (1) Separability (cont’d) • Rewrite F(u,v) as follows: • Let’s set: • Then:
  • 16. • How can we compute F(x,v)? • How can we compute F(u,v)? DFT Properties: (1) Separability (cont’d) N x DFT of rows of f(x,y) DFT of coloums of F(x,v)
  • 17. DFT Properties: (1) Separability (cont’d)
  • 18. DFT Properties: (2) Periodicity • The DFT and its inverse are periodic with period N
  • 20. DFT Properties: (4) Translation f(x,y) F(u,v) • Translation in spatial domain: • Translation in frequency domain:
  • 21. DFT Properties: (4) Translation (cont’d) • To “see” a full period, we need to translate the origin of the transform at u=N/2 (or (N/2,N/2) in 2D) |F(u-N/2)| |F(u)|
  • 22. DFT Properties: (4) Translation (cont’d) • To move F(u,v) at (N/2, N/2), take
  • 23. DFT Properties: (4) Translation (cont’d) no translation after translation sinc sinc
  • 24. DFT Properties: (5) Rotation • Rotating f(x,y) by θ rotates F(u,v) by θ
  • 25. DFT Properties: (6) Addition/Multiplication but … DFT Properties: (7) Scale
  • 26. DFT Properties: (8) Average value So: Average: F(u,v) at u=0, v=0:
  • 27. Magnitude and Phase of DFT • What is more important? • Hint: use the inverse DFT to reconstruct the input image using only magnitude or phase information magnitude phase
  • 28. Magnitude and Phase of DFT (cont’d) Reconstructed image using magnitude only (i.e., magnitude determines the strength of each component) Reconstructed image using phase only (i.e., phase determines the phase of each component)
  • 29. 29 Walsh Transform “+” denotes for +1 and “-” denotes for -1.                1 n 0 i u b x b i 1 n i 1 N 1 u , x g In 1-D case we have : In the following table N=8 so n=3 (23 =8). 1-D kernel
  • 30. 30 Walsh Transform When N=2n , the 2-D forward and inverse Walsh kernels are given by the relations                                                 1 0 1 0 1 1 1 1 1 1 , , , 1 1 , , , n i v b y b u b x b n i v b y b u b x b i n i i n i i n i i n i N v u y x h and N v u y x g Where bk(z) is the kth bit in the binary representation of z. So the forward and inverse Walsh transforms are equal in form; that is:
  • 31. 31 Walsh Transform This figure shows the basis functions (kernels) as a function of u and v (excluding the 1/N constant term) for computing the Walsh transform when N=4. Each block corresponds to varying x and y form 0 to 3 (that is, 0 to N-1), while keeping u and v fixed at the values corresponding to that block. Thus each block consists of an array of 4×4 binary elements (White means “+1” and Black means “-1”). To use these basis functions to compute the Walsh transform of an image of size 4×4 simply requires obtaining W(0,0) by multiplying the image array point-by-point with the 4×4 basis block corresponding to u=0 and v=0, adding the results, and dividing by 4, and continue for other values of u and v.
  • 33. 33 1D – Inverse Walsh Transform
  • 35. 35 2D – Inverse Walsh Transform
  • 36. Implementation of the 2-D Walsh Transform • The 2-D Walsh transform is separable and symmetric. • Therefore it can be implemented as a sequence of two 1-D Walsh transforms, in a fashion similar to that of the 2-D DFT. • Remember that the Fourier transform is based on trigonometric terms. • The Walsh transform consists of basis functions whose values are only 1 and -1. • They have the form of square waves. • These functions can be implemented more efficiently in a digital environment than the exponential basis functions of the Fourier transform. 36
  • 37. Kernels of Forward and Inverse Walsh Transform • For 1-D signals the forward and inverse Walsh kernels differ only in a constant multiplicative factor of N . • This is because the array formed by the kernels is a symmetric matrix having orthogonal rows and columns, so its inverse array is the same as the array itself! • In 2-D signals the forward and inverse Walsh kernels are identical! • The Concept of Sequency : We can think of frequency as the number of zero crossings or the number of transitions in a basis vector and we call this number sequency. 37
  • 38. The Concept of Sequency 38 Sequency: 0 1 3 2 7 6 4 5
  • 40. 2-D Inverse Hadamard Transform 40
  • 41. 41 Hadamard Transform When N=2n , the 2-D forward and inverse Hadamard kernels are given by the relations                                         1 0 1 0 1 1 , , , 1 1 , , , n i i i i i n i i i i i v b y b u b x b v b y b u b x b N v u y x h N v u y x g Where bk(z) is the kth bit in the binary representation of z. So the forward and inverse Hadamard transforms are equal in form; that is:
  • 42. 42 Hadamard Transform              1 0 1 1 , n i i i u b x b N u x g In 1-D case we have : In the following table N=8 so n=3 (23 =8). 1-D kernel “+” denotes for +1 and “-” denotes for -1.                 1 0 1 ) ( 1 1 0 n i i i u b x b N x x f N u H
  • 43. 43 Hadamard Transform This figure shows the basis functions (kernels) as a function of u and v (excluding the 1/N constant term) for computing the Hadamard transform when N=4. Each block corresponds to varying x and y form 0 to 3 (that is, 0 to N-1), while keeping u and v fixed at the values corresponding to that block. Thus each block consists of an array of 4×4 binary elements (White means “+1” and Black means “-1”) like Walsh transform. If we compare these two transforms we can see that they only differ in the sense that the functions in Hadamard transform are ordered in increasing sequency and thus are more “natural” to interpret.
  • 44. Recursive Relationship of the Hadamard Transform 44
  • 45. 45 The Concept of Sequency Sequency: 0 7 3 4 1 6 2 5
  • 46. 46 1-D WHT Kernel Functions
  • 47. 1-D WHT Kernel Functions Sequency: 0 1 2 3 4 5 6 7
  • 49. 49 2-D WHT Kernel Functions
  • 50. 50 WHT and Fourier Transform
  • 51. 1-D Discrete Cosine Transform
  • 52. 1-D Discrete Cosine Transform
  • 54. 54 Discrete Cosine Transform (DCT) Each block consists of 4×4 elements, corresponding to x and y varying from 0 to 3. The highest value is shown in white. Other values are shown in grays, with darker meaning smaller.
  • 55. 55 Slant Transform • The Slant Transform matrix of order N*N is the recursive expression         1 1 1 1 2 1 S2   2 1 2 2 N 1 N 4 N 3 a         Where I is the identity matrix, and   2 1 2 2 N 1 N 4 4 N b         
  • 57. 57 Haar Transform The Haar transform is based on the Haar functions, hk(z), which are defined over the continuous, closed interval [0,1] for z, and for k=0,1,2,…,N-1, where N=2n . The first step in generating the Haar transform is to note that the integer k can be decomposed uniquely as k=2p +q-1 where 0≤p≤n-1, q=0 or 1 for p=0, and 1≤q≤2p for p≠0. With this background, the Haar functions are defined as                                    1 , 0 z for otherwise 0 2 q z 2 2 / 1 q 2 2 2 / 1 q z 2 1 q 2 N 1 z h z h and 1 , 0 z for N 1 z h z h p p 2 / p p p 2 / p 00 k 00 0  