FaceRecognitionLib is a library to recognize (not only detect) faces in an image. The library uses Eigenface (PCA) method for face recognition and can also be used for the recognition of any kind of objects, not only faces.
The library has a simple API based on input and events: the developer provides the library with a bitmap and listen to certain events (e.g. face detected or not detected). The corresponding event is fired based on the results. When the library detects faces in an image, it dispatches a face cropped event which has a vector with all those detected faces.
Sample
import com.oskarwicha.images.FaceRecognition.FaceRecognition; import com.oskarwicha.images.FaceRecognition.Face; import com.oskarwicha.images.FaceRecognition.Events.FaceEvent; import com.oskarwicha.images.FaceRecognition.Events.FaceRecognitionEvent; private var face:Face; // TODO: init with appropriate face private var faceRecognition:FaceRecognition = new FaceRecognition(); faceRecognition.addEventListener(FaceRecognitionEvent.TRAINED, onFaceRecognitionTrained); faceRecognition.addEventListener(FaceRecognitionEvent.LOADED_TRAINING_FACES, onFaceRecognitionLoadedTrainingFaces); faceRecognition.addEventListener(FaceRecognitionEvent.PROBED, onFaceRecognitionProbed); private function onFaceRecognitionTrained(e:Event):void { progressShower.htmlText += "System trained successfully."; faceRecognition.probe(face); } private function onFaceRecognitionLoadedTrainingFaces(e:Event):void { progressShower.htmlText += "All images from training set are now loaded."; faceRecognition.train(); } private function onFaceRecognitionProbed(e:FaceRecognitionEvent):void { progressShower.htmlText += "Face recognized as: " + e.classification; } faceRecognition.loadTrainingFaces(faceClasificationList, faceUrlList);
RT @as3gamegears: New: FaceRecognitionLib (lib to recognize, not only detect, faces) http://t.co/YgCdrprPLN #as3 #flash #gamedev
Hi Fernando,
In version 1.3 of library face cropped event contains vector with all detected faces.
P.S
Thanks for showing interest in library.
Hi, Oskar! Thanks for the heads up! I’ve updated the lib description to reflect the new feature. About the lib interest, thank YOU for creating such a cool project!
Thanks for that. Oh, the pleasure was mine. I had a great time creating it.
Seeing people use and write about the lib also gives me satisfaction.