I've started work on implementing OpenCV support for better face detection.
(http://www.xarg.org/project/php-facedetect/)

Theoretically this should provide more accurate and faster detection of faces, as well as support for multiple faces.

This is just a starting point, the logic/math isn't finished yet.

CommentFileSizeAuthor
image_focus-opencv_support.patch3.95 KBstooit
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darrenmothersele’s picture

Is there a reason why you're using the system temp folder, rather than the one set by Drupal?

Where's the face_detect function defined?

stooit’s picture

No you're right, it should be using file_directory_temp instead of system temp.

face_detect is provided by the OpenCV PHP extension (http://www.xarg.org/project/php-facedetect/). OpenCV does a good job of detecting faces, the patch needs work though, the co-ordinates it returns aren't great.

darrenmothersele’s picture

I've been tasked with doing a short spike to investigate possibility of doing face detection in Drupal. Ideally I'd like to affect the cropping of pictures, but also prompt to create entity references (to User) based on the detected positions.

I considered using relation to store this. But then you would always need both endpoints (the image file, and the user entity?).

Needs more thought!

Ratul Saha’s picture

Any update along this work?