5.3 Classifying Face Images
The eigenfaces derived from the previous section seem adequate for describing face images under very controlled conditions, we decided to investigate their usefulness as a tool for face recognition. Since the accurate reconstruction of the image is not a requirement , a smaller number of eigenfaces are sufficient for the identification process. So identification becomes a pattern recognition task.
Algorithm :
1. Convert image into a matrix []
so that all pixels of the test image are
stored in a matrix of 256*256[rows] by 1 [column] size.
2. Find weights associated with each training image . This operation can simply be performed by,
Weight Matrix = TransposeOf (EigenVector-of-CovarianceMatrix) * DifferenceImageMatrix .
This matrix will be of size N by N , where N is the total number of face images. Each entry in the column will then represent the corresponding weight of that particular image with respect to a particular eigenvector.
2. Project into
"face space" by a simple operation, this operation is same as
defined above . But here we are projecting a single image and hence we will get
a matrix of size N [rows] by 1 [columns] .Let's call this matrix as 'TestProjection'
matrix.
for k=1,2.....N. Where N is the total number of training images.
3. Find the distance between the each element of the testProjection matrix and the corresponding element of Weight matrix. We will get a new matrix of N [rows] by N [columns] .
4. Find the 2-Norm for the above derived matrix. This will be a matrix of 1 [rows] by N [columns] . Find the minimum value for all the column values. If it is with in some threshold value then return that column number. That number represents the image number . That number shows that the test image is nearest to that particular image from the set of training images. If the minimum value is above the threshold value , then that test image can be considered as a new image which is not in our training image set . And that can be stored in our training image set by applying the same procedure [mentioned in section 5.2] . So the system is a kind of learning system which automatically increases its knowledge if it encounters some unknown image [ the 1 which it couldn't detect ].