Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why don't you try to cut the face by yourself? You have the face rectangle, so let's just create a mask in the form of ellipse, put it on the rectangle and fill everything outside of the ellipse with black color? If you don't trust to the face detector, you can try to find eyes and improve the positioning of the ellipse.

So, for all the above you need only ellipse function and setTo with mask.

You can find some more details here, search for "elliptical mask" in "How to preprocess facial images for Face Recognition" post.