0% found this document useful (0 votes)
506 views5 pages

KLT Example

This document provides steps to perform a Karhunen-Loeve (KL) transform on a 2x2 matrix. It first extracts vectors from the matrix, calculates the covariance matrix, and determines the eigenvalues and eigenvectors. The eigenvectors are used to form the KL transformation matrix. This matrix is then used to transform the input matrix into transformed coefficients. Finally, the input values are reconstructed from the transformed coefficients. The KL transform aims to represent the input data with minimal loss of information by decorrelating the variables.

Uploaded by

deepu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views5 pages

KLT Example

This document provides steps to perform a Karhunen-Loeve (KL) transform on a 2x2 matrix. It first extracts vectors from the matrix, calculates the covariance matrix, and determines the eigenvalues and eigenvectors. The eigenvectors are used to form the KL transformation matrix. This matrix is then used to transform the input matrix into transformed coefficients. Finally, the input values are reconstructed from the transformed coefficients. The KL transform aims to represent the input data with minimal loss of information by decorrelating the variables.

Uploaded by

deepu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

204 Digital

Image Processing

mage Compression pertormance evaluation.


The KL transform is heavily utilised forthe
compression of an in
algorithms
th
sinceit has been proven to be the optimal transform tor

nat the KL spectrum contains the largest number of zero-valued coefficients, mage ssomeyaureentoteg
Example 4.11 Perform KL transformfor the following matk:

x-
Solution
Step 1 Formation of vectors from the given matrix
The given matrix is a 2x2 matrix; hence two vectors can be extracted fraom the given matrix, Letit

X and X1.
Ait be
4
and 1

Step 2 Determination of covariance matrir


The formula to compute covariance ofthe matrix is cov(x) = E[er' 1-fF
In the formula for covariance matrix, + denotes the mean of the input matrix. The formula to compute
the mean of the given matrix is given below:

M-1

(4.89
where M is the number of vectors in x.

)-
The mean value is calculated as =

Now multiplying the mean value with its transpose yields

Now to find the E|xr we use the formula

El-M (40
Image Transforms 205

hence
In our case, M= 2

F7 find the covariance matrix,


Now using the value
of E|xx|and , we

(4.91)
cov(x)=E[x]-FT"

cov()1
covariance matrix
Step 3
Determination ofeigen valhues ofthe
solve the characteristic equation,
To find the eigen values ), we (4.92)
cov(x)-|=0

-6-
|-2_ =0
de2 al

- 0
det-2-A)
(1-(-)+2(-2)=0,

-A+A2-4 =0
2-X-4=0
the above equation.
we have
to find the eigen
values
A and A Solving
From the ast equation,
we get
1tv1+16 1+v171t4.1231
2 2
206 Digital Image Processing

1+4.1232.5615
2

1-4.125-1.5615
2

2.5615 and Ap=-1.5615.


herefore, the eigenvalues ofcov(x) are A
covariance matrix
Step 4 Determination ofeigen vectors of the
The first eigen vector en is found from the equation,

cov(x)-Ao)6%=0.

-22.5615 0 0
(cov)-/)2 0 o 2.5615||oo
-1.5615
2 -2,5615 o1
be a free variable. So, we choose the value of
Using row detection method, we have found oo1 to
as 1.

-1.5615000-20=0

2 1,2808
-1:5615

-1.2808
The eigen vector Ùo=|

Similarly, find the next eigen vectoroj; the eigen value is A= -1.5615

.5615 0 ljo
(covC)-A/)=-2
(cov(x)-A,/)o=|
-1.5615||
2.5615 -2 o
-2 -1.5615 o
Using row detection method, we have found o11 to be a free variable. So choose, we the value

2.561500-21=0
Image Transforms 207

2=0.7808
O102.5615
The eigen vector o=F
0.7808
1

véctors
Step 5 Normalisation ofthe eigen below
formula to normalise the eigen vector øo is given
The normalisation

oo

-1.2808-0.7882
eo-1.2808)+11 0.6154

vector o is given by
normalisation of the eigen
Similarly, the
T 0.7808
80.6154
1 0.7808)2+1?1 ]o.7882

covariance matrix
the eigen vector ofthe
KL transformation
matrix from transformation
matrix.
the
Step 6 vector, we
have to form
the n o r m a l i s e d
eigen
From
-0.7882 0.6154
T0.6154 0.7882
TT"= T T = I
orthogonal (i.e., )
which is
have to check, 0
Now we
0.61540.9999
0.6154||-0.7882
-0.7882 0 0.9999
0.6154 0.7882
TT 0.6154 0.7882||

matrix

7 KL
transformation of the input the formula used is Y= el.
Step the input matrix,
transform of
KL
To find the
-0.7882 0.6154||4-3.7682
Y=T¥%l0.6154 0.7882|- i.6734
=T1=-0.7882 0.6154|-2 [3.42261
=7% 0.6154 0.7882| 31.1338
,
208 Digital Image Processing

The final transform matrix

Y =-3.7682 3.4226
1.6734 1.1338

Step 8 Reconstruction of input values from the transformed coefficients


From the transform matrix, we have to reconstruct value of the given sample matrix X using the formula
X= TY.

-0.7882 0.6154||-3.7682 3.9998


XoTY0 0.6154 0.7882 1.6734 |-1
-0.7882 0.6154||3.4226-1.9999
T= 0.6154 0.7882|1.1338 2.9999
= =4-

You might also like