For starters, try detecting faces using vision.CascadeObjectDetector
in the Computer Vision System Toolbox.
If you have to roll your own, then take a look at this example, showing how to train a classifier to recognize digits using HOG features and SVM.
Note, that the classifier is only one part of the process. You would need to label a lot of faces in the images. You can do that automatically using vision.CascadeObjectDetector
, or manually, using the Training Image Labeler App. Then you need to generate a lot of non-face images. Then you need to train a classifier to tell a face from a non-face. Then you need to write a program that would slide a “window” across an image, and classify the region defined by the window as face or non-face.
solved face detection with svm and feature extraction using matlab [closed]