# sample calculation of Eigen vectors for video component analysis

#### by barkkathulla 2012-09-20 16:29:36

The various steps to calculate Eigen faces are
i) Prepare the data: A 2-D facial image can be represented as 1-D vector by concatenating each row (or column) into a long thin vector.
Letâ��s suppose we have M vectors of size N (= rows x columns of image) representing a set of sampled images .Then the training set becomes: ï��1, ï��2, ï��3.....ï��M

ii) Subtract the mean: The average matrix ï�� has to be calculated, then subtracted from the original faces (ï��i ) and the result stored in the variable ï��i

Eqâ�¦3.1

Eqâ�¦.3.2

iii) Calculate the co-variance matrix In the next step the covariance matrix A is calculated according to:

Eqâ�¦3.3

iv) Calculate the Eigenvectors and Eigen values of the covariance matrix. In this step, the Eigen vectors (Eigen vectors) Xi and the corresponding Eigen values ï�¬i should be calculated.

v) Calculate Eigen faces

Eqâ�¦3.4

Where, Xi are eigenvectors and fi are Eigen faces.

Fig. 3.1 Sample Eigen face images of normal face images

vi) Classifying the faces: The new image is transformed into its Eigen face components. The resulting weights form the weight vector ï��T : k

Eqâ�¦3.5

Where,
k = 1,2,3,4
ï��T = [ï��1ï��2....ï��M ] k

3.2.2 Euclidean Distance

The Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space (or even any inner product space) becomes a metric space. The associated norm is called the Euclidean norm.

The Euclidean distance between two weight vectors d(ï��i, ï��j) provides a measure of similarity between the corresponding images i & j. It also known as the L2-norm, it is defined as follows:

Eqâ�¦3.6

The Euclidean distance between points p and q is the length of the line segment connecting them ( ). In Cartesian coordinates, if p = (p1, p2,..., pn) and q = (q1, q2,..., qn) are two points in Euclidean n-space, then the distance from p to q, or from q to p is given by,