-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Face centering #75
Comments
Sounds interesting. I would think about this as an extension package (suggested by composer). I think it's more like a special interest feature and it would be nice if the face detection code (and its requirements) is only installed if this particular feature is needed. |
Well, I was thinking on integrating something like https://github.com/infusion/PHP-Facedetect and OpenCV (http://opencv.org). Sure, there are LOTS of requirements (building OpenCV and adding a PHP extension). But all the image manipulation you've done is great, so this additions are only to get the coordinates of the first face. I'm already using Cloudinary (great service) just for this feature. But it's a vendor lock in. Is there any suggested architecture for extension packages to this library? |
I also found this package https://github.com/mauricesvay/php-facedetection This package returns rectangular coordinates, which can be passed to current intervention/image crop method. The ideal way would be something like this: $img->selectFace()->crop(); But this would require an implementation of the possibility to make selection and apply manipulations on selected parts. |
That one's nice, since it doesn't require to build extensions. I'll try to work something this weekend. On Mon, Jan 20, 2014 at 8:16 PM, Oliver Vogel notifications@github.comwrote:
|
👍 |
👍, face detection would be a sweet addition. |
👍 |
2 similar comments
👍 |
+1 |
Would be nice, php-facedetection looks pretty light (no external deps) It would be nice if this was optional. |
I've tested a bit, but php-facedetection is pretty slow and I couldn't really get proper results (and it only supports 1 face). Alternative is https://github.com/stojg/crop but requires imagick extension and not sure if that has better results (with Entropy based centering). So might be a bit to specific to include here. |
I think face detection is better off in a separate package. |
Is there any possibility to integrate some algorithm to center on faces when smart cropping? I'm using Cloudinary right now to achieve this. I can try to implement some open source algorithms. What do you think?
The text was updated successfully, but these errors were encountered: