I want to try to improve an image processing technique for finding faces in images. I want to stop the Viola Jones face detector before it finds all faces, and do histogram equalization and other techniques on "candidate" faces. For example, say we have an image with one face. I would like to cut off facial detection before it has determined there is only one face, i.e. where there might be 3 prospective faces and Viola Jones has not yet taken out those regions which are not actually faces. Is this possible, and if so how do I do it?

1 Answer
1

Viola-Jones works in stages. Only areas of the image that have a high enough "maybe" score get passed to the next stages. If you implement your own Viola-Jones detector, then you should be able to stop between each stage and apply color/lighting corrections before going on to the next stage.

As an alternative to implementing your own, you might take a look at the openCV implementation. You might be able to modify it for your needs.

The source is here for the cascade detector, which is the openCV Viola-Jones implementation. You will need to examine the area after the comment //---------------------------------------- Classifier Cascade

That is where the actual detector is implemented. I think the interesting places are operator and ocl_detectMultiScaleNoGrouping, and I really think operator is where you would need to start.