Facebook like automatic cropping images with smart results

I noticed that every image that I upload to Facebook is automatically cropped for thumbnails. Automatically, I mean that the user is not involved in setting crop parameters in any way. My concern is that even with the automatic cropping of the thumbnails that Facebook receives, they are ultimately intelligent (they somehow crop the exact area where the person’s face or figure is located). How is this possible and how to do it in PHP?

PS I can not install the installation on the server. And even without face detection, there is a way to make a good guess. I noticed that for large images, facebook requires manual crops and does automatic cropping only for small images. The main goal is to make smart square cultures, and then resize them for sketches.

+7
source share
3 answers

There is also a jquery plugin that can perform face detection, so you can use the coordinates that it uses in the PHP script to crop the image. http://papermashup.com/jquery-face-detection/

+1
source

Perhaps they analyze the image using the face-object detection algorithm.

http://corpocrat.com/2009/08/18/automatic-face-detection-with-php-in-linux/

+1
source

I don’t know if this is really what Facebook does, but I’m sure that it is possible thanks to the “Face Detection” function, like in any digital camera these days.

I think this is what you are looking for:

http://www.xarg.org/project/php-facedetect/

but you should be able to install add-ons on the server. I think if you want to do this via phl, you still have to install something on the server.

0
source

All Articles