Hi Adam,
Yes, the framework might work on that. In order to do this, you can use the HaarObjectDetector as you mentioned. A fully functional example is given in the Face detection sample application, available with the framework installer. Once you install the framework, you will find a link to the sample applications (complete with source code) in your start menu. If you wish, you can also manually download the sample from here:
http://dl.dropbox.com/u/32601472/accord/samples/accord-vision-face-detection-(viola-jones).zip
// Process frame to detect objects
Rectangle[] objects = detector.ProcessFrame(picture);
if (objects.Length > 0)
{
RectanglesMarker marker = new RectanglesMarker(objects, Color.Fuchsia);
pictureBox1.Image = marker.Apply(picture);
}
In your case, instead of just marking boxes around the faces as the sample application does, you can use the
Crop filter to extract the face from the image.
In order to make the classifier work with the images you have provided, you might also need to tune it to allow for smaller detection windows. For this, you can try to use the following parameters, shown in the code below:
HaarCascade cascade = new FaceHaarCascade();
var detector = new HaarObjectDetector(cascade, minSize: 12);
detector.SearchMode = ObjectDetectorSearchMode.NoOverlap;
detector.ScalingMode = ObjectDetectorScalingMode.SmallerToGreater;
detector.ScalingFactor = 1.1f;
detector.UseParallelProcessing = true;
detector.Suppression = 1;
Hope it helps!
Best regards,
Cesar