Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
image_focus-opencv_support.patch | 3.95 KB | stooit |
Comments
Comment #1
darrenmothersele CreditAttribution: darrenmothersele commentedIs 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?Comment #2
stooit CreditAttribution: stooit commentedNo 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.
Comment #3
darrenmothersele CreditAttribution: darrenmothersele commentedI'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!
Comment #4
Ratul Saha CreditAttribution: Ratul Saha commentedAny update along this work?