Upload
aravind
View
458
Download
43
Embed Size (px)
DESCRIPTION
A property of MVG_OMALLOOR
Citation preview
Image Transforms
Refers to a class of unitary matrices used for representing images
Unitary TransformsUnitary Transforms• Unitary Transformation for 1-Dim. Sequence
– Series representation of
– Basis vectors :
– Energy conservation :
}10),({ Nnnu
1
0
10),(),()(N
n
NknunkakvAuv
) ( *1 matrixunitaryAAwhere T
1
0
** 10),(),()(N
n
NnkvnkanuA vu
TNnnka }10),,({ * *ka
22 |||||||| uvuv A
)|||||)(||)(||||| ( 21
0
2*1
0
22 uuuuuv T*T*
N
n
TN
k
nuAAkv
Here is the proof
• Unitary Transformation for 2-Dim. SequenceUnitary Transformation for 2-Dim. Sequence– Separable Unitary Transforms
• separable transform reduces the number of multiplications and additions from to
– Energy conservation
)()(),(, nbmanma lklk
Tl
N
m
N
nk AUAVnanmumalkv
)(),()(),(1
0
1
0
***1
0
1
0
* )(),()(),( VAAUnalkvmanmu Tl
N
k
N
lk
)( 4NO )( 3NO
1
0
1
0
21
0
1
0
2 |),(||),(|N
k
N
l
N
m
N
n
lkvnmu
1,N0,1,nwkvN
nu
1,N0,1,kwnuN
kv
ew
Nkwnuv(k)
,N-10,1,2,nn
N
k
knN
N
n
knN
jN
N
n
knN
N
,)(1
)(
,)(1
)(
ansformunitary tr be oproperly t scalednot
where
1,,1,0)(
is , of DFT The
1
0
1
0
1
0
2
)u(
Discrete Fourier Transform (DFT)Discrete Fourier Transform (DFT)
New notation
allymathematic handle easy to
11
)3(
)2(
)1(
)0(
1
1
1
1111
2
1
)3(
)2(
)1(
)0(
For
2
14
24
34
24
04
24
34
24
14
knjknN
NeN
wN
u
u
u
u
www
www
www
v
v
v
v
4N
F
uFv
NNNN
and
NnmwwlkvN
nmu
NlkwwnmuN
lkv
N
k
N
l
lnN
kmN
N
m
N
n
lnN
kmN
2
*
1
0
1
0
1
0
1
0
log2 DFT D-1 2separable.2
where
notation spacevector
since.1
1,0,),(1
),(
1,0,),(1
),(
is DFTunitary D2
O
FF
vuuv
VFFU
FFFUFV**
t
F
FF
2-D DFT2-D DFT
• 2-Dim. DFT (cont.)– example
image Lena 512512 a of DFT dim2
(a) Original Image (b) Magnitude (c) Phase
• 2-Dim. DFT (cont.) – Properties of 2D DFT
• SeparabilitySeparability
1,,0, ,),(11
),(1
0
1
0
NlkWnmfN
WN
lkFN
m
N
n
lnN
kmN
1,,0 ,),(11
),(1
0
1
0
Nm,nWlkFN
WN
nmfN
k
N
l
lnN
kmN
• 2-Dim. DFT (cont.) – Properties of 2D DFT (cont.)
• RotationRotation
),(),( 00 Frf
(a) a sample image (b) its spectrum (c) rotated image (d) resulting spectrum
• 2-Dim. DFT (cont.) – Properties of 2D DFT
• Circular convolution and DFTCircular convolution and DFT
• CorrelationCorrelation
p q
C qnpmgqpfnmgnmf ),(),(),(),(
),(*),(),(),(
),(),(),(*),(
lkGlkFnmgnmf
lkGlkFnmgnmf
p q
Cfg qnpmgqpfnmgnmfnmR ),(),(),(),(),( *
),(),(),(),(
),(),(),(),(*
*
lkGlkFnmgnmf
lkGlkFnmgnmf
Category of transformsCategory of transforms
Discrete Discrete Cosine Transform Cosine Transform (DCT)(DCT)
This is DCT
The N point DFT X(k) of a real sequence x(n) is a complex sequence satisfying the symmetry condition X(k)=X*(-K))N For N even ,DFT samples X(0) and X(N-2)/2) are real and distinct.Remaining N-2 samples are complex ,and only half of these samples are distinct and remaining are the complex conjugate of these samples .For N odd,DFT samples X(0) is real,and remaining N-1 samples are comples of which only half of these samples are distinct>There is a redundancy in DFT based frequency domain representation
Discrete Discrete Cosine Transform Cosine Transform (DCT)(DCT)
This is DCT
Discrete Discrete Cosine Transform Cosine Transform (DCT)(DCT)
This is DCT
DCT is an orthogonal transformm so its DCT is an orthogonal transformm so its inverse kernel is the same as forward kernelinverse kernel is the same as forward kernel
This is inverse DCT
DCT can be obtained from DFTDCT can be obtained from DFT
100
1
00
1
001
bygiven ,matrix al tridiagonsymmetric the
of orseigen vect theare DCT theof vectorsbasis 3.The
2-MEPG 1,-MPEG JPEG,
coding transformcompactionenergy excellent .2
.orthogonal and real is DCT 1.The
DCT theof Properties
1
c
c
Q
Q
tCCCC
Properties of DCT: real, Properties of DCT: real, orthogonal, energy-orthogonal, energy-
compacting, compacting, eigenvector-eigenvector-basedbased
120,12
10,
algorithmfast DCT
NnnNx
Nnnxny
!algorithms DCTfast Many
otherwise,0
10,
by from obtained is DCTpoint -N
120,12cos2
12
120,
is DFTpoint 2Then
2
222
22
22
22
2
1
02
121
0
12
0
NkkYwkv
ky
Nknknxe
enNxenx
Nkenyky
N
k
kN
NN
N
N
N
nN
j
knjN
Nn
knjN
n
knjN
n
0 1 2 3 4 5 76 x n( )
y n( )
There are many DCT fast algorithms and hardware There are many DCT fast algorithms and hardware designs.designs.
5.0 that provided KLT, the toclose is DST
algorithmfast
1,0,sin,
10,sin
10,sin
1
111
12
1
01
111
2
1
01
112
2
SSSS
Nnknk
Nnkvnu
Nknukv
T
Nnk
N
N
kN
nkN
N
nN
nkN
Discrete Sine Discrete Sine Transform(DST)Transform(DST)
Similar to DCT.
Walsh TransformWalsh Transform
Here we calculate the matrix of Walsh coefficients
Here we calculate the matrix of Walsh coefficients
Here we calculate the matrix of Walsh coefficients
Here we calculate the matrix of Walsh coefficients
We have We have done it done it earlier in earlier in different different waysways
Symmetry of WalshSymmetry of Walsh
Think about other transforms that you know, are they symmetric?
Two-Dimensional Walsh TransformTwo-Dimensional Walsh Transform
Two-dimensional Walsh
Inverse Two-dimensional Walsh
Properties of Walsh TransformsProperties of Walsh Transforms
Here is the separable 2-Dim Inverse Walsh
Example for N=4
even
odd
Discuss the importance of this figure
HadamardHadamard TransformTransform
We will go quickly through this material since it is very similar to Walsh
separable
Example of calculating Hadamard coefficients – analogous to what was before
Standard Trivial Functions for HadamardStandard Trivial Functions for Hadamard
One change
two changes
2
1
3
0
1111
1111
1111
1111
2
1
sequency
changessignof#
2
1
11
11
2
1
m transforHadamard1)
2
11
11
11
1
H
HH
HHHHH
H
nn
nn
nn
Discrete Walsh-Hadamard Discrete Walsh-Hadamard transformtransform
Now we meet our old friend in a new light again!
Walsh)(1923,function Walsh thesamplingby generated becan also
order Hadamardor natural
5
2
6
1
4
3
7
0
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
8
1
8
1
22
22
3
HH
HHH
sequency
order or Walsh sequency
7
6
5
4
3
2
1
0
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
8
1
sequency
m transforHadamard - Walsh
3
H
algorithmfast3.
tionmultiplicano2.
.1
Properties
22
22
andoftionrepresentabinarytheareandand
log,),(where
)1)((1
)(
)1)((1
)(
1
11
10
11
10
2
1
0
1
0
),(
1
0
),(
HHHH
mmmm
kkkk
mkmk
Nnmkmkb
kvN
mu
muN
kv
t
nn
nn
ii
n
iii
N
k
mkb
N
m
mkb
i(Walshordered)
i(binary)reverseorder
graycode
decimal(Hadamardordered)
01234567
000001010011100101110111
000100010110001101011111
000111011100001110010101
07341625
Relationship between Walsh-ordered Relationship between Walsh-ordered and Hadamard-orderedand Hadamard-ordered
1,,1,0, lettingby obtained is transformHaar
)1,0(forelsewhere 0
222
22
12
),,(
)1,0(,1
),0,0(
21
21
2
2
NmN
mt
t
mt
mN
mt
mN
tmrhaar
tN
thaar
rr
rr
r
r
Nonsinusoidal orthogonal functionNonsinusoidal orthogonal function
• Haar transform– Haar function (1910, Haar) : periodic,
orthonormal, complete
Haar TransformHaar Transform
22000000
00220000
00002200
00000022
22220000
00002222
11111111
11111111
8
1
2200
0022
1111
1111
4
1
8
4
H
H
compactionenergypoorvery3.
vector1for
operations)(algorithm,fast.2
,.1
Properties1
N
NO
HHHH t
Fourier Transform
• ‘Fourier Transform’ transforms one function into another domain , which is called the frequency domain representation of the original function
• The original function is often a function in the Time domain
• In image Processing the original function is in the Spatial Domain
• The term Fourier transform can refer to either the Frequency domain representation of a function or to the process/formula that "transforms" one function into the other.
Our Interest in Fourier Transform
• We will be dealing only with functions (images) of finite duration so we will be interested only in Fourier Transform
Applications of Fourier Transforms
1-D Fourier transforms are used in Signal Processing 2-D Fourier transforms are used in Image Processing 3-D Fourier transforms are used in Computer Vision Applications of Fourier transforms in Image processing: –
– Image enhancement,
– Image restoration,
– Image encoding / decoding,
– Image description