Академический Документы
Профессиональный Документы
Культура Документы
LECTURE 17
1
Karhunen-Loeve Transform (KLT)
mx = E [x]
where E[ ] is the ’expectation’ or mean operator.
2
• We define the covariance matrix
· ¸
T
Cx = E (x − mx)(x − mx)
which equals the outer product of the vector x − mx with
itself. Hence if x is a length N vector, Cx is a NxN symmetric
matrix such that CxT = Cx.
· ¸ · ¸ · ¸ · ¸
T T T T
Cx = E xx − E xmx − E mx x + E mx mx
· ¸ · ¸
T T
Cx = E xx − E mx mx
3
Example
0 1 1 1
0 0 1 0
0 0 0 1
3 9 3 3
• then mx = 14 1 and so mxmxT = 16
1
3 1 1
1 3 1 1
To calculate Cx also need to know E[xxT], the mean of the
outer products of each vector with itself.
0 0 0 1 0 0
x1 x1 T = 0 0 0 x2 x2 T = 0 0 0
0 0 0 0 0 0
1 1 0 1 0 1
x3 x3 T = 1 1 0 x4 x4 T = 0 0 0
0 0 0 1 0 1
3 1 1
then E[xxT] = 41 1 1 0
1 0 1
4
• It follows that Cx = E[mxmxT] − E[xxT] equals,
3 1 1
1
Cx = 1 3 −1
16
1 −1 3
5
• Given the covariance matrix CX the KLT transformation ma-
trix A is defined such that after transformation of each vector
via;
y = A(x − xm)
the covariance matrix of the vectors y which we denote Cy
is diagonal - so that each pixel of the output vector set is
uncorrelated with every other pixel.
Cy = ACxAT
6
• To see this choice of A is the correct one. Consider ma-
trix A whose rows are the normalized (total vector length
1) eigenvectors of Cx, e1, e2... placed in order of decreasing
eigenvalue λ1 > λ2 > λ2... Then
−− e1 −− | | |
Cy = −− e2 −− Cx e1 e2 e3
−− e3 −− | | |
−− e1 −− | | | λ1 0 0
Cy = −− e2 −− λ1e1 λ2e2 λ3e3 = 0 λ2 0
−− e3 −− | | | 0 0 λ3
7
Geometrical Interpretation
x(2)
y(1)
y(2)
x(1)
8
Optimum Compression
• It can be shown theoretically that the ID transform using the
KLT matrix A, is optimum in packing as much information
(largest coefficients) as possible into as few components as
possible.
9
KLT/PCA of Remote Sensing Images
SPECTRAL BAND 4
SPECTRAL BAND 3
x1
x2 SPECTRAL BAND 2
x =
x3
x4
SPECTRAL BAND 1
10
Transform Coding
5 4 3 4 57 -2 5 2
4 3 5 5 10 3 1 0
4 3 4 4 -7 3 1 -4
2 2 2 3 1 4 0 .1
• In fact that most images are well modelled as noise like signals
is not correct(!), In particular image statistics vary over image
from object to object. Hence later in 1990’s found wavelet
transforms to be more efficient (basis of JPEF2000).
11
Block Coding
N 2LogM
12
Choosing Components -Zonal Mask
13
Fixed Zonal Mask Zonal Bit allocation
1 1 1 1 1 0 0 0 8 7 6 4 3 2 1 0
1 1 1 1 0 0 0 0 7 6 5 4 3 2 1 0
1 1 1 0 0 0 0 0 6 5 4 3 3 1 1 0
1 1 0 0 0 0 0 0 4 4 3 3 2 1 0 0
1 0 0 0 0 0 0 0 3 3 3 2 1 0 0 0
0 0 0 0 0 0 0 0 2 2 1 1 1 0 0 0
0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 1 1 0 0 0 0 1 5 6 14 15 27 28
1 1 1 1 0 0 0 0 2 4 7 13 16 26 29 42
1 1 0 0 0 0 0 0 3 8 12 17 25 30 41 43
1 0 0 0 0 0 0 0 9 11 18 24 31 40 44 53
0 0 0 0 0 0 0 0 10 19 23 32 39 45 52 54
0 1 0 0 0 0 0 0 20 22 33 38 46 51 55 60
0 0 0 0 0 0 0 0 21 34 37 47 50 56 59 61
0 0 0 0 0 0 0 0 35 36 48 49 57 58 62 63
14
Choosing Components - Threshold Mask
15
• JPEG uses (for intensity) a threshold mask like
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
16
Figure 1: Input images
17