Session 5. (1) Principal component analysis and Karhunen-Loève transformation

Similar documents
Optimum LMSE Discrete Transform

Machine Learning for Data Science (CS 4786)

6. Kalman filter implementation for linear algebraic equations. Karhunen-Loeve decomposition

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

Notes The Incremental Motion Model:

Chimica Inorganica 3

TMA4205 Numerical Linear Algebra. The Poisson problem in R 2 : diagonalization methods

Principle Of Superposition

Machine Learning for Data Science (CS 4786)

Random Matrices with Blocks of Intermediate Scale Strongly Correlated Band Matrices

Linear Regression Demystified

The z-transform. 7.1 Introduction. 7.2 The z-transform Derivation of the z-transform: x[n] = z n LTI system, h[n] z = re j

Cov(aX, cy ) Var(X) Var(Y ) It is completely invariant to affine transformations: for any a, b, c, d R, ρ(ax + b, cy + d) = a.s. X i. as n.

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

THE KALMAN FILTER RAUL ROJAS

PAijpam.eu ON TENSOR PRODUCT DECOMPOSITION

BIOINF 585: Machine Learning for Systems Biology & Clinical Informatics

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

NAME: ALGEBRA 350 BLOCK 7. Simplifying Radicals Packet PART 1: ROOTS

APPENDIX F Complex Numbers

U8L1: Sec Equations of Lines in R 2

1 1 2 = show that: over variables x and y. [2 marks] Write down necessary conditions involving first and second-order partial derivatives for ( x0, y

4 Multidimensional quantitative data

CEE 522 Autumn Uncertainty Concepts for Geotechnical Engineering

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

5.1 Review of Singular Value Decomposition (SVD)

Assumptions. Motivation. Linear Transforms. Standard measures. Correlation. Cofactor. γ k

Signal Processing in Mechatronics

Soo King Lim Figure 1: Figure 2: Figure 3: Figure 4: Figure 5: Figure 6: Figure 7:

A NOTE ON THE TOTAL LEAST SQUARES FIT TO COPLANAR POINTS

Inverse Matrix. A meaning that matrix B is an inverse of matrix A.

Recurrence Relations

Topic 9: Sampling Distributions of Estimators

Properties and Hypothesis Testing

ECON 3150/4150, Spring term Lecture 3

Chapter If n is odd, the median is the exact middle number If n is even, the median is the average of the two middle numbers

2 Geometric interpretation of complex numbers

Gernot Hoffmann. Faddejev Algorithm for Eigenvalues and Eigenvectors

Matrix Algebra from a Statistician s Perspective BIOS 524/ Scalar multiple: ka

11 Correlation and Regression

Linear regression. Daniel Hsu (COMS 4771) (y i x T i β)2 2πσ. 2 2σ 2. 1 n. (x T i β y i ) 2. 1 ˆβ arg min. β R n d

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram.

Matrices and vectors

6.3 Testing Series With Positive Terms

Statistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons

Let us give one more example of MLE. Example 3. The uniform distribution U[0, θ] on the interval [0, θ] has p.d.f.

Where do eigenvalues/eigenvectors/eigenfunctions come from, and why are they important anyway?

Symmetric Matrices and Quadratic Forms

Factor Analysis. Lecture 10: Factor Analysis and Principal Component Analysis. Sam Roweis

Since X n /n P p, we know that X n (n. Xn (n X n ) Using the asymptotic result above to obtain an approximation for fixed n, we obtain

Discrete Orthogonal Moment Features Using Chebyshev Polynomials

Homework Set #3 - Solutions

Algebra of Least Squares

Singular value decomposition. Mathématiques appliquées (MATH0504-1) B. Dewals, Ch. Geuzaine

TEACHER CERTIFICATION STUDY GUIDE

Chapter 10 Advanced Topics in Random Processes

U8L1: Sec Equations of Lines in R 2

Random Variables, Sampling and Estimation

SOME TRIBONACCI IDENTITIES

Chapter 12 EM algorithms The Expectation-Maximization (EM) algorithm is a maximum likelihood method for models that have hidden variables eg. Gaussian

The Phi Power Series

(VII.A) Review of Orthogonality

Algorithm Analysis. Chapter 3

LINEAR ALGEBRA. Paul Dawkins

Tridiagonal reduction redux

Time-Domain Representations of LTI Systems

3 The Scalar Algebra of Variances, Covariances, and Correlations

The Method of Least Squares. To understand least squares fitting of data.

1. Hydrogen Atom: 3p State

1 Introduction to reducing variance in Monte Carlo simulations

Appendix F: Complex Numbers

THE SYSTEMATIC AND THE RANDOM. ERRORS - DUE TO ELEMENT TOLERANCES OF ELECTRICAL NETWORKS

Output Analysis (2, Chapters 10 &11 Law)

THE EIGENVALUE PROBLEM

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1

Physics 324, Fall Dirac Notation. These notes were produced by David Kaplan for Phys. 324 in Autumn 2001.

Matrix Representation of Data in Experiment

Regression, Inference, and Model Building

Frequency Response of FIR Filters

Frequency Domain Filtering

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.

Topic 9: Sampling Distributions of Estimators

G r a d e 1 1 P r e - C a l c u l u s M a t h e m a t i c s ( 3 0 S )

Topic 9: Sampling Distributions of Estimators

Complex Analysis Spring 2001 Homework I Solution

Polynomial Functions and Their Graphs

S Y Y = ΣY 2 n. Using the above expressions, the correlation coefficient is. r = SXX S Y Y

Determinants of order 2 and 3 were defined in Chapter 2 by the formulae (5.1)

The Random Walk For Dummies

Addition: Property Name Property Description Examples. a+b = b+a. a+(b+c) = (a+b)+c

Dr. Maddah ENMG 617 EM Statistics 11/26/12. Multiple Regression (2) (Chapter 15, Hines)

For a 3 3 diagonal matrix we find. Thus e 1 is a eigenvector corresponding to eigenvalue λ = a 11. Thus matrix A has eigenvalues 2 and 3.

CHAPTER I: Vector Spaces

Scheduling under Uncertainty using MILP Sensitivity Analysis

Similarity Solutions to Unsteady Pseudoplastic. Flow Near a Moving Wall

Lecture 2: Monte Carlo Simulation

1 Last time: similar and diagonalizable matrices

A proposed discrete distribution for the statistical modeling of

Transcription:

200 Autum semester Patter Iformatio Processig Topic 2 Image compressio by orthogoal trasformatio Sessio 5 () Pricipal compoet aalysis ad Karhue-Loève trasformatio Topic 2 of this course explais the image compressio by orthogoal trasformatios This method expresses a image by a weighted summatio of somethig, ad reduce the data amout by omittig some terms i the summatio Successful data amout reductio without sigificat degradatio of image quality should separate the terms correspodig to visually more importat compoets ad those correspodig to visually less importat compoets i the weighted summatio, ad remove the latter This topic cosists of the followig three sessios; ) Derivatio of the statistically optimal weighted summatio by the pricipal compoet aalysis ad Karhue-Loève trasformatio, 2) Itroductio of uitary trasformatios of matrices for geeral formalizatio of the KL trasformatio ad itroductio of basis images as the terms i the weighted summatio, ad 3) image compressio usig cosie trasformatio ad JPEG method as a empirically optimal formalizatio of the weighted summatio of is small, i e does ot vary very much for all images This meas that oly is importat for expressig the differece of the images, ad that is ot importat ad ca be replaced with a costat, for example the average of for all images How ca we create such distributio as Fig 2 if the origial distributio of images is as Fig? The aswer is rotatig the coordiates as show i Fig 3 The coordiates z ad z 2 are created by a rotatio of ad, respectively The variace of z is the maximum subject to all possible rotatios i the case of Fig 3 The trasformed pixel value z is the most importat compoet ad z 2 is the less importat compoet i this case Pricipal compoet aalysis We derive the above z ad z 2 i the followigs We assume the relatioship betwee z ad (, ) as follows : z = a a 2 () Visually more importat compoets ad less importat compoets We cosider here a image cosisig of oly two pixels for simplicity, ad cosider treatig various twopixel images It is obvious that there ca be may combiatios of pixel values i a image Let the two pixel values be ad, ad cosider illustratig the distributio of the images by locatig each image o plae Figure is a example of the distributio, ad each of symbol correspods to a image I the case of Fig, the variaces of both ad are large It idicates that both coordiates have meaigful roles ad either or ca be omitted O the other had, i the case of the distributio as show i Fig 2, the variace of is large while that Let i ad i be the values of pixels ad of the ith image, respectively The averages of ad, deoted ad, respectively, the variaces s ad s 22, ad the covariace s 2 = s 2 are defied as follows: s = = i, = (i ) 2, s 22 = s 2 = s 2 = i (i ) 2 (i )(i ) (2) Dividig the covariace s 2 = s 2 by (the stadard deviatio of ) (the stadard deviatio of ), i e s s22, we get the correlatio coefficiet The covariace is zero if ad do ot correlate This is It is ofte assumed alteratively as z = a ( ) a 2 ( ) The covariace matrices are the same as the case i the mai text A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page /6

ituitively explaied as follows: If we take ad as ew coordiates, (i )(i ) is positive i the first ad the third quadrats, ad egative i the secod ad the fourth quadrats If ad do ot correlate, as show i Fig 4, positive values ad egative values of the products (i )(i ) cacel each other ad their summatio is zero The variace of z, deoted V(z ), is derived from Eqs () ad (2), as follows: V(z ) = (z i z ) 2 = = = {(a i a 2 i ) (a a 2 i )} 2 {(a (i ) a 2 (i )} 2 {(a 2 (i ) 2 2a a 2 (i )(i ) (a 2 2 (i ) 2 } = a 2 { (i ) 2 } 2a a 2 (i )(i ) a 2 2 { (i ) 2 } = a 2 s 2a a 2 s 2 a 2 2 s 22 (3) We derive a ad a 2 that maximize V(z ) Assumig that θ ad θ 2 are the agles betwee the vector z ad the coordiates ad, respectively, ad assumig that a = cos θ, a 2 = cos θ 2, (4) we get that (a, a 2 ) is the directio cosie of the ew coordiate z, ad a ad a 2 satisfy a 2 a2 2 = (5) Thus derivig (a, a 2 ) is the maximizatio of V(z ) uder the coditio of Eq (5) Fig : A example of the distributio of two-pixel images () Fig 2: A example of the distributio of two-pixel images (2) This kid of coditioal maximizatio problem is solved by Lagrage s method of idetermiate coefficiet By this method, this problem is reduced to the ucoditioal maximizatio problem of maximizig F(a, a 2,λ) = a 2 s 2a a 2 s 2 a 2 2 s 22 λ(a 2 a2 2 ), (6) where λ is the idetermiate coefficiet Derivig the partial derivatives of F with respect to a, a 2, ad λ, ad settig them to zero, we get F a = 2a s 2a 2 s 2 2a λ = 0 F a 2 = 2a 2 s 22 2a s 2 2a 2 λ = 0 F λ = λ(a 2 a2 2 ) = 0 (7) A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page 2/6

z 2 z Fig 3: Rotatio of the coordiates ( i )( i ) < 0 ( i )( i ) > 0 ucorrelated: the same umber of the positive ad egative products ( i )( i ) > 0 ( i )( i ) < 0 (a) (b) Fig 4: Meaig of covariace (a) sigature of (i )(i ) i each quadrat (b) the case of o correlatio The third equatio i Eq (7) has bee already satisfied sice it is idetical to Eq (5) From the other two equatios, we get a s a 2 s 2 = a λ a 2 s 22 a s 2 = a 2 λ (8) Rewritig this ito the matrix form, we get s s 2 s 2 s a 22 a = λ a 2 a (9) 2 The matrix i the left side of Eq (9) is called covariace matrix Solvig Eq (9) is a eigevalue problem, where λ is called eigevalue ad a a is called eigevector 2 The variace V(z ) is derived as follows: Multiplyig a to the upper equatio ad a 2 to the lower equatio i Eq (8), we get ad the a 2 s a a 2 s 2 = λa 2 a a 2 s 2 a 2 2 s 22 = λa 2 2 (0) a 2 s 2a a 2 s 2 = λ(a 2 a2 2 ) () From Eq (3) ad Eq (5), we get V(z ) = λ (2) The eigevalue problem of Eq (9) yields two pairs of the eigevalue λ ad the eigevector as the solutios Sice the problem is the maximizatio of V(z ) ad the maximum of V(z ) is equal to λ, the trasformed basis z is obtaied from the pair with the larger eigevalue This basis is called the first A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page 3/6

pricipal compoet, which is the most importat compoet of image data The covariace matrix is symmetric, as show i Eq (9), ad it is kow that the eigevectors of a symmetric matrix are orthogoal Thus the other basis z 2 is derived from the other eigevalue - eigevector pair yielded as a solutio of Eq (9) The rotatio as show i Fig 3 is realized by the ew coordiates z ad z 2 This method is called the pricipal compoet aalysis (PCA) Pricipal compoet aalysis ad diagoalizatio We have cosidered two-pixel images so far I this sectio we exted the method to the case of p- pixel images I case that the image cosists of the pixels,,,x p, we derive the trasformed pixel value z = a a 2 a p x p (3) where the variace of z is maximized subject to a, a 2,, a p This problem is reduced, similarly to the previous sectio, to the eigevalue problem of s s 2 s p s 2 s 22 s 2p s p s p2 s pp a a 2 a p = λ a a 2 a p (4) where s ij deotes the covariace of x i ad x j The p eigevalues derived from Eq (4) are, also similarly to the previous sectio, the variaces of p trasformed pixel values z, z 2,,z p Let the eigevalues be λ,λ 2,,λ p i descedig order, ad the correspodig trasformed pixel values be z, z 2,,z p, respectively The pixel value z is the compoet of the maximum variace, i e the most importat compoet, ad z 2 is the compoet where the variace is the maximum of the compoets which are orthogoal to z, ad so o The larger the suffix is, the less importat the compoet is The trasformed pixel value z k is called the k-th pricipal compoet Let (a (k), a 2(k),,a p(k) ) be the eigevector correspodig to the eigevalue λ k 2 From Eq (3), the 2 The symbol deotes the traspositio of a matrix k-th pricipal compoet z k is expressed as z k = a (k) a 2(k) a p(k) x p = ( a (k) a 2(k) a p(k) ) x p (5) If we deote the covariace matrix i Eq (4) by S, we get from Eq (4) as follows: S a (k) a 2(k) a p(k) = λ k a (k) a 2(k) a p(k) (k =, 2,,p) (6) Combiig these equatio for k =, 2,,p, weget a () a (2) a (p) a 2() a 2(2) a 2(p) S a p() a p(2) a p(p) a () a (2) a (p) λ 0 a 2() a 2(2) a 2(p) λ 2 = a p() a p(2) a p(p) 0 λ p (7) We defie a matrix P whose colums are the eigevectors arraged i descedig order of correspodig eigevalues, i e a () a (2) a (p) a 2() a 2(2) a 2(p) P =, (8) a p() a p(2) a p(p) ad defie the matrix Λ as follows: λ 0 λ 2 Λ= (9) 0 λ p Usig these expressio, we get from Eq (7) that SP= PΛ, ie P SP=Λ (20) A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page 4/6

The eigevectors are ormalized, as i Eq (5) i the case of two-pixel images, ad they are orthogoal sice S is symmetric, i e the eigevectors form a orthoormal basis Thus the matrix P is orthoormal Sice P = P if P is orthogoal, we get P SP=Λ, or S = PΛP (2) The operatio is called diagoalizatio of a symmetric matrix S Sice it follows from Eq (5) for k =, 2,,p that z a () a (2) a (p) z 2 a 2() a 2(2) a 2(p) = z p a p() a p(2) a p(p) x p = P x p, (22) the matrix P trasforms the origial pixel values,,,x p to the ew pixel values z, z 2,,z p Such a trasformatio by a orthogoal matrix is called orthogoal trasformatio of a image Equatio (2 shows that the covariace matrix of the origial image set i terms of the pixel values,,,x p is obtaied by the followig operatios: trasformig it to the image set i terms of the pixel values z, z 2,,z p (by P ), obtaiig the diagoal matrix Λ by arragig the eigevalues, ad iverse-trasformig to the image set i terms of the pixel values,,,x p (by (P ) = P) This meas that the covariace matrix of the image set by the pixel values z, z 2,,z p is diagoal ad all the covariaces are zero, i e o pixel values of z, z 2,,z p correlate to each other Karhue-Loève trasformatio The cotributio of the k-th pricipal compoet is defied as the ratio of λ k to (λ λ 2 λ p ), i e the ratio of the variace of the k-th pricipal compoet to the summatio of variaces The cotributio idicates the importace of the trasformed pixel, as explaied i the first sectio Cosider the case that the cotributios of the -th pricipal compoets are zero or almost zero for all > k I the example of the twopixel images i Fig 2, the cotributio of the secod pricipal compoet is cosidered almost zero This meas that the variace o the basis correspodig to the secod pricipal compoet is almost zero, i e the variace of the trasformed pixel value z 2 is almost zero It follows that the two-pixel images i terms of pixels ad ca be almost expressed by z oly ad z 2 of all the images ca be replaced with a sigle value, for example z 2 The pricipal compoet aalysis at first makes the cotributio of the first pricipal compoet as large as possible, ad the the cotributio of the secod oe as large as possible, ad so o I other words, the pricipal compoet aalysis makes the cotributio of the last pricipal compoets as small as possible It meas that omittig the several last pricipal compoets yields the smallest errors i the cases that a certai umber of pixels are omitted The pricipal compoet aalysis has a ability of reducig the data amout while the iformatio of the origial data is preserved as much as possible If we cosider the case that there are may p-pixel images, ad assume that oly p/2 pixels are available for oe commuicatio chael at a time How ca we trasmit the images while the iformatio of the origial image is preserved as much as possible? As show so far, the aswer is as follows: the image is trasformed to the pricipal compoets ad oly the top p/2 pricipal compoets are trasmitted I this sese, the orthogoal trasformatio of Eq (22) is called Karhue-Loève trasformatio The receiver calculates the iverse trasformatio, i e trasformatio from z to x, to obtai the images which are almost the same as the origial oes This A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page 5/6

iverse trasformatio is as follows: x p (P ) z z 2 z p/2 z p/2 z p = P z z 2 z p/2 z p/2 z p (23) This method requires the covariace matrix of all the images; it is geerally impossible If we assume the ergodicity 3, which is the property that the covariaces amog the images ca be replaced with the covariaces withi a image, of the images uder cosideratio, the covariace matrix ca be calculated from oe image; This property, however, does ot hold for practical images geerally To avoid this problem, it is widely applied to choose a fixed set of basis vectors istead of calculatig the pricipal compoets The data compressio error of this basis is ot the smallest, but sufficietly small for almost all practical images It will be explaied i the followig two sessios how to choose a appropriate basis p-pixel images p-pixel images (with the mimimum loss of the iformatio) p trasformatio to the pricipal compoetts trasmissio of the top p / 2 pricipal compoets iverse trasformatio Fig 5: Image compressio by the KL trasformatio 3 See the refereces preseted at the begiig of this course, for example: M Petrou ad P Bosdogiai, Image Processig The Fudametals, for details A Asao / Patter Iformatio Processig (200 Autum semester) Sessio 5 (Nov 8, 200) Page 6/6