Skip to content
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

Closed
fedeisas opened this issue Jan 20, 2014 · 12 comments
Closed

Face centering #75

fedeisas opened this issue Jan 20, 2014 · 12 comments

Comments

@fedeisas
Copy link

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?

@olivervogel
Copy link
Member

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.

@fedeisas
Copy link
Author

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?

@olivervogel
Copy link
Member

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.

@fedeisas
Copy link
Author

fedeisas commented Jan 21, 2014

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:

I also found this package https://github.com/mauricesvay/php-facedetection

This package returns rectangular coordinates, which can be passed to
intervention/image crop method.

The ideal way would be something like this:

$img->selectFace()->crop();

But this would require an implementation of possibility to make selection
and apply manipulations on selected parts.


Reply to this email directly or view it on GitHubhttps://github.com//issues/75#issuecomment-32806637
.

@Nirlah
Copy link

Nirlah commented Mar 24, 2014

👍

@maknz
Copy link

maknz commented Apr 14, 2014

👍, face detection would be a sweet addition.

@webnificent
Copy link

👍

2 similar comments
@fer-ri
Copy link

fer-ri commented Jun 28, 2014

👍

@Leenug
Copy link

Leenug commented Aug 26, 2014

+1

@barryvdh
Copy link
Contributor

Would be nice, php-facedetection looks pretty light (no external deps) It would be nice if this was optional.

@barryvdh
Copy link
Contributor

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.

@olivervogel
Copy link
Member

I think face detection is better off in a separate package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants