IntroductionFaceDetect is a matlab script for detecting faces in passport images. The idea is that if you need a simple way to detect the faces (in terms of eye locations), you can first run facedetect and then browse through the results to manually correct the mistakes (by making a note of which images has failed and then correcting them with your preferred image browser). If you have a set of passport images (or other kinds of face images) in /data/faces/ and you want the results in /data/detectedfaces/ (and both directories exist and have the proper permissions of course) this is accomplished by the following command sequence:
$ wget http://www.hig.no/~erikh/projects/facedetect/facedetect-0.1.tgz $ tar zxvf facedetect-0.1.tgz $ cd facedetect $ matlab -nojvm >> facedetect('/data/faces/','/data/detectedfaces/') Scanning image ... . . . >> browseface('/data/detectedfaces/',2)NOTE: I highly recommend resizing input images to no more than 150 by 150 pixels before applying facedetect since its very slow... (can take a few minutes for each image)
Feel free to use this code how you like, let me know if its useful for you.
Some possible improvements
Back to homepage