View
218
Download
1
Category
Preview:
Citation preview
8/10/2019 Ch3-Mathematical and Physical Backgrounds
1/53
3-0
3.1. Overview
3.2. Linear Integral Transforms
3.3. Images as Stochastic Processes
3.4. Image Formation Physics
Chapter 3: The Image, its Mathematical
and Physical Background
8/10/2019 Ch3-Mathematical and Physical Backgrounds
2/53
3-1
3.1. Overview
3.1.1. Linearity
(a)Additivity ( ) ( ) ( )L L L x y x y
( ) ( )L a aLx x
( ) ( ) ( )L a b aL bL x y x y
Let L : operator, mapping, function, or process
a,b: scalars
x,y: elements of a vector space
e.g., vectors, functions
(b)Homogeneity
(c)Linearity
8/10/2019 Ch3-Mathematical and Physical Backgrounds
3/53
3-2
3.1.2. Dirac Delta Function
Heaviside function:0 0
( )
1 0
tH t
t
0
( )1
t aH t a
t a
0a
0
( ) ( ) 1
0
t a
H t a H t b a t b
t b
1( ) [ ( ) ( )]t H t H t
0( ) lim ( )t t
Pulse:
Impulse:
Dirac Delta Function:
a b
1,t dt
0,t t 0
8/10/2019 Ch3-Mathematical and Physical Backgrounds
4/53
3-3
, , ,f x y f a b a x b y dadb
Sampling (shifting property):
, , ,f x y x a y b dxdy f a b
, 1,x y dxdy , 0 ( , )x y x y 02D delta function:
Image function:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
5/53
3-4
( ) ( ) ( ) ( ) ( ) ( ) ( )h x f x g x f g x d f x g d
3.1.3. Convolution ( )
( )f x f a a x da Assignment: Show
8/10/2019 Ch3-Mathematical and Physical Backgrounds
6/53
3-6
Discrete case:1 1
0 0( ) ( ) ( ) ( ) ( )
, : extended , ; 1
N N
e e e en n
e e
h k f n g k n f k n g n
f g f g N A B
WraparoundIfN
8/10/2019 Ch3-Mathematical and Physical Backgrounds
7/53
5-6
In practice,
8/10/2019 Ch3-Mathematical and Physical Backgrounds
8/53
5-7
1 2
1 2
( , ) ( , ) ( , )
( 1, 2) ( 1, 2) ( 1, 1) ( 1, 1)
(1,2) ( 1, 2)
s t
p x y m s t p x s y t
m p x y m p x y
m p x y
8/10/2019 Ch3-Mathematical and Physical Backgrounds
9/53
3-8
Properties: ,f g g f f g h f g h f g h f g f h
a f g af g f ag f g f g f g
Assignment : f g f g f g
, , ,
, , ,
f g x y f a b g x a y b dadb
f x a y b g a b dadb g f x y
2-D convolution:
Discrete: 1 1
0 0
, , ,M N
e em n
h i j g i m j n h m n
8/10/2019 Ch3-Mathematical and Physical Backgrounds
10/53
3-9
Correlation: ( )
( ) ( ) ( ) ( ) ( ) ( )f x g x f g x d f x g d
1
0
( ) ( ) ( ) ( ),N
e e e e
n
f k g k f n g k n
1N A B
8/10/2019 Ch3-Mathematical and Physical Backgrounds
11/53
3-10
Spatial
domain
3.2. Linear Integral Transforms
domain 1 domain 2
Transform:Frequency
domaine.g.,
Advantages: implicit explicit properties
3.2.3. Fourier Transform
Fourier series
Fourier analysis = Fourier transform
8/10/2019 Ch3-Mathematical and Physical Backgrounds
12/53
Fourier series-- A periodic (T) functionf(x) can
be written as 0 1( ) / 2 cos sinn nnf x a a n x b n x
/ 2 /20
/ 2 /2
/ 2
/2
1 2( ) , ( )cos
2 2
, ( )sin
T T
nT T
T
n T
a f x dx a f x n xdxT T
b f x n xdxT T
3-11
( ) exp( ),nn
f x c jn x
/ 2
/ 2
1
( )exp( )
T
n Tc f x jn x dxT
In complex form
(Assignment)
where
2
0( ) [ ( )cos2 ( )sin2 ] ( )
j xf x a x b x d c e d
In continuous case,
where
8/10/2019 Ch3-Mathematical and Physical Backgrounds
13/53
3-12
Some function is
formed by a finite
number of sinuous
functions
( ) sin (1/3)sin 2 (1/5)sin 4f x x x x
Some function requires
an infinite number of
sinuous functions tocompose
1 1 1 1( ) sin sin3 sin5 sin7 sin9
3 5 7 9f x x x x x x
8/10/2019 Ch3-Mathematical and Physical Backgrounds
14/53
3-13
The spectrumof a periodic function, which is
composed of a finite number of sinuous functions,
is discrete consisting of components at dc, 1/T,and its multiples
For non-periodic functions, or 0T The spectrum of the function continuous
8/10/2019 Ch3-Mathematical and Physical Backgrounds
15/53
3-14
2 cos2 sin2j te t j t
2
(cos2 sin 2 )
cos2 sin 2 ( )
j t
f t e dt f t t j t dt
f t tdt j f t tdt F
aggregates the sinuous
component of f. F frequency-
1-D:
Fourier transform (FT)
2 i tf t F f t e dt
F
-1 2 i tF f t F e d
F
8/10/2019 Ch3-Mathematical and Physical Backgrounds
16/53
3-15
Complex spectrum Re Im( )F F j F
Amplitudespectrum
Phasespectrum
Powerspectrum
2 2Re Im ( )F F F
1
tan Im / ReF F
2 2 2
Re Im ( )P F F F
0 , 0fF f t Fdt d
1.
2. 2 2
f t dt F d
(Parsevals theory)
Properties:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
17/53
3-16
Examples:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
18/53
3-17
Discrete Fourier transform
1
0
1 ( ) 2N
n
nkF k f n exp jN N
1
0
( ) 2N
k
nkf n F k exp j
N
( ), 0, 1, , 1f n n N Input signal:
where
8/10/2019 Ch3-Mathematical and Physical Backgrounds
19/53
3-18
Properties:
1 2 1 2af bf aF bF Linearity
Conjugate symmetry *, ( , )F u v F u v
Periodicity
, ( , )F u v F u N v
, ,F u v F M u v , ,F m n F M m n , ( , )F m n F m N n
8/10/2019 Ch3-Mathematical and Physical Backgrounds
20/53
3-19
0 1 1{ , , , },f Nf f f 0 1 1{ , , , }NF F F F
0 1 2 3 2 1{ , , , , , , }f N Nf f f f f f
/ 2 1 0 1 / 2 1{ , , , , , , }N N NF F F F F F
0 0Let / 2 exp( 2 / ) exp( )
( ) (cos sin ) ( 1)j x x x
u N j u x N j x
e j
0( ) ( )exp( 2 / ) ( 1) ( )x
f x f x j u x N f x
0 0
0 0
( )exp( 2 / ) ( )
( ) ( )exp( 2 / )
f x j u x N F u u
f x x F u j ux N
Shifting
8/10/2019 Ch3-Mathematical and Physical Backgrounds
21/53
Examples:
1-D signal {2 3 4 5 6 7 8 1}f
{36 - 9.6569 4 - 4 - 4 1.6569 - 4
4 1.6569 4 - 4 4 -9.6569 - 4 }
j j j
j j j
F
{2 -3 4 -5 6 -7 8 -1} f
{ 4 1.6569 4 -4 4 -9.6569 - 4
36 - 9.6569 4 - 4 - 4 1.6569 - 4 }
j j j
j j j
F
3-20
f F F
2-D image
8/10/2019 Ch3-Mathematical and Physical Backgrounds
22/53
Rotation
Polar coordinates:
cos , sinu w v w ( , ) ( , ),f x y f r ( , ) ( , )F u v F w
0 0( , ) ( , )f r F w
cos , sinx r y r
3-21
Convolution theorem ,f g F G f g F G
Correlation theorem
(Assignment)* *,f g F G f g F G
8/10/2019 Ch3-Mathematical and Physical Backgrounds
23/53
3-22
8/10/2019 Ch3-Mathematical and Physical Backgrounds
24/53
3-23
Any real function can always be decomposed
into its even and odd parts, i.e.,( )ef x ( )of x
( )f x
,2 2
e of t f t f t f tf t f t ( ) ( ) ( ),e of x f x f x
( ) ( ) ( )
( ) R{ ( )} I{ ( )}e o
f x f x f x
F u F u i F u
( ) R{ ( )}
( ) I{ ( )}
e
o
f x F u
f x F u
e.g.,
8/10/2019 Ch3-Mathematical and Physical Backgrounds
25/53
Convolution involving impulse function
( ) ( )
( ) ( )
f x g x
g x x T
( ) ( )
( ) ( ) ( ) ( )
f x g x
g x x T x x T
Copyf(x) at the location of each impulse
( ) ( )f x g x
( )g x
( )f x
3-24
8/10/2019 Ch3-Mathematical and Physical Backgrounds
26/53
3-25
3.2.5. Sampling theory
Objective: looking at the question of how
many sampling should be takenso that no information is lost in
the sampling process
Sparsesampling
Densesampling
Continuousfunction
8/10/2019 Ch3-Mathematical and Physical Backgrounds
27/53
f(x): band-limited
function
Sampling function
( ) ( )
( ) ( )
S x x x
x x x
Spatial domain Frequency domain
( ) ( )f x S x dxSampling
3-26
8/10/2019 Ch3-Mathematical and Physical Backgrounds
28/53
3-27
sin[2 ( )]( ) ( )
2 ( )
sinc[2 ( )] ( )
nn
n n
n n
n
x xf x f x
x x
x x f x
Interpolation Reconstruction Formula
Whittaker-Shannon sampling theory
1
2x w 1-D:
2-D:1 1
,2 2
x yu v
8/10/2019 Ch3-Mathematical and Physical Backgrounds
29/53
3-28
3.2.6. Discrete cosine transform
-- often used in image/video compression,
e.g.,JPEG, MPEG, FGS, H.261, H.263, JVT
1 1
0 0
1 1
0 0
2 ( ) ( ) 2 1 2 1( , ) ( , ) cos cos
2 2
1/ 2 0 where ( )
1 otherwise
2 2 1 2 1( , ) ( ) ( ) ( , ) cos cos ,
2 2
wh
N N
m n
N N
u v
c u c v m nF u v f m n u v
N N N
kc k
m nf m n c u c v F u v u v
N N N
ere 0,1..., 1, 0,1,..., 1m N n N
0,1..., 1
0,1,..., 1
u N
v N
8/10/2019 Ch3-Mathematical and Physical Backgrounds
30/53
Fourier spectrum provides all the frequencies
present in a signal but does not tell where they
are present.
Windowed Fourier transformsuffers from the
dilemma:
Small range poor frequency resolution
Large range poor localization
3.2.7. Wavelet transform
3-29
Wavelet: wave that is only nonzero in a small region
Wave Wavelet
8/10/2019 Ch3-Mathematical and Physical Backgrounds
31/53
3-30
Haar:
1 if 0 1/ 2
( ) 1 if 1/ 2 10 otherwise
x
x x
2
( ) sin ,x
x e xMorlet: Mexican hat: DOG, LOG
Types of wavelets:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
32/53
Operations on wavelet:
(a) Dilation:
i) Squashing ii) Expanding
(b) Translation:
i) Shift to the right ii) Shift to the left
(c) Magnitude change:
i) Amplification ii) Minification
(2 )x
( )x
( / 2)x
( 2)x ( 2)x
2 ( )x 1/ 2 ( )x
8/10/2019 Ch3-Mathematical and Physical Backgrounds
33/53
Any function can be expressed as a sum of wavelets
of the form ( )i i ia b x c
8/10/2019 Ch3-Mathematical and Physical Backgrounds
34/53
3-33
,
1( )s
tt
ss
Wavelet transform:decomposes a function into
a set of wavelets
: wavelets
New variables:
scale
translation
where
{0},s R R
Inverse wavelet transform:synthesize a functionfrom wavelets coefficients
,( , ) ( ) ( )sR
W s f t t dt
,( ) ( , ) ( )sR R
f t W s t d ds
t : mother wavelet
8/10/2019 Ch3-Mathematical and Physical Backgrounds
35/53
,
1( , ) ( ) ( ),k s
x
W k s f t t N
,1( , ) ( ) ( ),k s
x
W k s f t t N
0
, ,
1 1( ) ( , ) ( ) ( , ) ( )k s k s
k j j
f t W k s t W k s tN N
3-34
Discrete wavelet transform:
, ( )k s t
, ( )k s t
: scaling
functions
: wavelet
functions
Approximation coefficients (cA)
Detail coefficients (cD)
Inverse discrete wavelet transform:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
36/53
Multiresolution Analysisviews a function at various
levels of resolution
3-35
h: step size
8/10/2019 Ch3-Mathematical and Physical Backgrounds
37/53
Let
3-36
SA contain all the functions on the left-hand side
andS
W those on the right-hand side
2
, ,{ (2 ) : }s
k s k s
k k
c t k c SA2
, ,{ (2 ) : }sk s k sk k
d t k d SW
Function spaces:
SA
SW
is generated by the bases
is generated by the bases
/ 2
,( ) 2 (2 ),s s
k s t t k k Z
/ 2
, ( ) 2 (2 ),s s
k s t t k k Z
i.e.,(scaling
functions)
(wavelet
functions)
8/10/2019 Ch3-Mathematical and Physical Backgrounds
38/53
Scaling function1 0 1
( )0 otherwise
xx
/ 2( ) 2 (2 ), 0,...,2 1j j jji x x i i
/ 2( ) 2 (2 ), 0,...,2 1j j jji x x i i
1 0 1/ 2
( ) 1 1/ 2 1
0 otherwise
x
x x
Wavelet function
3-37
Example: Haar wavelet
8/10/2019 Ch3-Mathematical and Physical Backgrounds
39/53
Properties:
i) ii) iii)
iv)2
1 0 1 L A A A
S S
A W1 S S SA A W S SW A
3-38
Discrete signal ( ), 0, 1, , 1s i i N
is decomposed into wavelet coefficients
, ,1 ( ) ( )k s k si
d s i iN
Suppose scales and positions are based on
power of 2 (dyadic)
Approx. coefficients (cA)
Detail coefficients (cD)
, ,
1( ) ( ),k s k s
i
c s i iN
Fast Discrete Wavelet Transform:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
40/53
3-39
Inverse Discrete Wavelet Transform
, , , ,
1 1( ) ( ) ( )k s k s k s k s
k k
s t c t d tN N
8/10/2019 Ch3-Mathematical and Physical Backgrounds
41/53
Wavelet transforms
Low pass filtering: averaging ;
High pass filtering: differencingInput data: a, b
Average:s= (a+ b) / 2 (low pass filtering)
Difference: d= as (high pass filtering)
Wavelet coefficients: (s, d).
3-40
Inverse wavelet transforms
Addition; subtraction
Wavelet coefficients: (s, d).Addition:s + d=s+ (as)= a,
Subtraction:sd=s (as)= 2s a = b
Input data: (a, b).
8/10/2019 Ch3-Mathematical and Physical Backgrounds
42/53
3-41
Example:
Input data 14, 22
(i) Wavelet TransformAverage: s= (1422)/2 = 18,
Difference: d = 14-18= -4
Wavelet coefficients: (18, -4).(ii) Inverse Wavelet Transform (to recover the
input data)
sd= 18+(-4) = 14,
sd= 18-(-4) = 22
Input data: (14, 22).
8/10/2019 Ch3-Mathematical and Physical Backgrounds
43/53
3-42
2-D:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
44/53
3-43
8/10/2019 Ch3-Mathematical and Physical Backgrounds
45/53
3-44
8/10/2019 Ch3-Mathematical and Physical Backgrounds
46/53
3-45
Hadamard-Haar, Slant, Slant-Haar, Discrete sine,
Paley-Walsh, Radon, Hough
3.2.11. Other Orthogonal Image Transforms
3.2.8. Eigen Analysis
Let A be an nby n square matrix. x and are
corresponding eigenvalueand eigenvectorof A
if .
1 1
1, ( , , )
nA PDP D P AP diag
1[ ]
nP e e
: corresponding eigenvalues
Let : eigenvectors ofA
Let
Then
1, ,e en
1, , n
A x x
8/10/2019 Ch3-Mathematical and Physical Backgrounds
47/53
3.2.9. Singular Value Decomposition
m nA : real matrix
column-orthonormal matrix m nU T
nU U Id
n nVT
nVV Id TA UWV
1 2( , , , )nW diag 1 2, , , n
(i.e.,
(i.e., ), s.t.
) and row-orthonormal matrix
The singular values ofAare the eigenvaluesof and the corresponding eigenvectors
are the columns of V
TA A
where
: non-negative singular values
of A
3-46
8/10/2019 Ch3-Mathematical and Physical Backgrounds
48/53
3-47
1, ,e en
1, , n
1[ ]e enE
: corresponding eigenvalues
Let : eigenvectors of matrixB
Let
Then ,TB EDE 1( , , )nD diag
( )
T T T T T T T
A A UWV UWV VW U UWV 2 2 21 2( , , , )
T T T
nVW WV Vdiag V
Compare with TB EDE2
i T
A A
iTA A
(a) The eigenvalues of correspond
(b) The eigenvectors of are columns of V
to the singular values of A
8/10/2019 Ch3-Mathematical and Physical Backgrounds
49/53
3-48
3.2.10. Principal Component Analysis (PCA)
Karhunen-Loeve(KL) or Hotelling transforms
PCA: linearly transforms a number of correlated
variables into the same number of uncorrelated
variables (principal components)
1 2( , , , ) , 1, 2, ,T
i nx x x i M xData vectors:
Mean vectors: { }x Em x
Covariance matrix: {( )( ) }Tx x xC E = x m x m
n by n real symmetric matrix:xC
M
8/10/2019 Ch3-Mathematical and Physical Backgrounds
50/53
493-49
1
1,
M
x i
iM m x
1
1
1 1 1 1
1
1
1
( )( )
1( )
1[ ( ) )]
1
1
MT
x i x i x
i
MT T T T
i i i x x i x x
i
M M M MT T T T
i i x x i x x i
i i i i
MT T T T
i i x x x x x x
i
MT T
i i x x
i
C M
M
M
M
M
x m x m
x x x m m x m m
x x m m x m m x
x x m m m m m m
x x m m
Approximation:
8/10/2019 Ch3-Mathematical and Physical Backgrounds
51/53
503-50
Let be corresponding
eigenvalues and eigenvectors of .
Assume
Construct matrix
and , 1, , ,i i i n e
1 2 n 1 2 nA e e e
xC
( )i i xA y x m
The mean of ys:
y 0m
The covariance matrix of ys:T
y xC AC A=
1
2
0 0 00 0
0 0 0
0 0
y
n
C
8/10/2019 Ch3-Mathematical and Physical Backgrounds
52/53
( ),i i xA y x mFrom
The mean square error between
Let ,kA k n
1 1 1
n k n
i i i
i i i k
e
3-51
( )i k i xA y x m
,i iy x i iy x
1 T
i i x i xA A x y m y m
andi ix x
and
is
8/10/2019 Ch3-Mathematical and Physical Backgrounds
53/53
523 52
Eigen faces
Recommended