This week, we were able to advance on the face recognition component of the biometric recognition project. The steps for the MATLAB algorithm (pseudocode) are given below. In addition, we have decided on a fingerprint scanner and advanced with minutiae analysis of fingerprinting and Fourier analysis of voice.
1. Create a test
database. Take a picture and convert it into grayscale to reduce the number of channels (R, G, B).
2. Then, reduce into a
1-D vector because all images share this property (R^m).
3. Add every
"reshaped" vector to a matrix known as the "test" matrix of
dimensions mxn concatenating vertically.
4. Taking this mxn
matrix, take the mean along every row and output a column vector averaging
every pixel in all 20 images.
5. Creating a new
matrix, known as the SCATTER MATRIX, every individual column is subtracted by
the mean vector (R^m) evaluated before.
6. The SCATTER MATRIX
has dimensions mxn.
7. Because the SCATTER
MATRIX is not necessarily square, it can be multiplied by its transpose to
create a square matrix. It is known that the maximum number of eigenvalues for a mxn matrix (non-square) is
min(m-1, n-1). Therefore, new eigenvalues will not be generated just because
the square matrix with larger dimensions is chosen.
8. The objective is to
make the process minimally computationally expensive. Because m is the number
of pixels and n is the number of images, left-transposition yields nxm x mxn =
nxn matrix. Right-transposition yields mxn x nxm = mxm, which is considerably
larger than nxn. Therefore, nxn is the best choice.
9. After finding the
eigenvalues and eigenvectors of nxn, the eigenfaces
is a measure of how much faces differ from the mean face based on the data set.
These eigenfaces are not unique to the faces used to compile them, but will be
projected onto the original images themselves to determine how “different” an
image is from others.
10. Once the eigenfaces
have been computed, this matrix has at most nx(n-1) dimensions.
11. Once the eigenface
matrix has been obtained (it has only numerical value and is in the
eigenspace), it can be projected into imagespace by multiplying into the
original grayscale matrix of pixels. This
process has essentially extracted the principal components, hence the name PCA,
that are unique to individuals such as the hairline, where the nose is, where
the mouth is, etc. The background details become trivial because they are
averaged with the mean face (a green-screen would be ideal and will be
implemented in the final design).
12. The scatter of the
test image will be obtained by subtracting from the mean of all images in the
database. Multiplying by the eigenface matrix yields a “feature vector” that
contains the principal component details.
13. The total Euclidean
distance in imagespace between the projected test image and the training images
is computed for every image. The image with smallest scatter when compared to
the appropriate image is the best match!
No comments:
Post a Comment