This is not a trivial project. I would first suggest you do a web search for facial recognition to get a lay of the land for the algorithms out there. One of which, termed "eigenfaces", would be...