Facial recognition can be done in Matlab using several methods such as eigenfaces, fisherfaces, and local binary patterns histograms. Here is an example of how to do facial recognition using eigenfaces:
main.m1475 chars43 lines
This code loads a dataset of images, resizes them to the same size, flattens them into a matrix, computes the average face, subtracts the mean from each image, computes the eigenvectors of the covariance matrix, projects each image onto the principal components, and finally tests an unknown image by computing its Euclidean distance to each known image and finding the closest match.
gistlibby LogSnag