/    Sign up×
Community /Pin to ProfileBookmark

shape / face detection in image ?

Hi all. Just wondering if this exists at all. It may not be in PHP.

Say I have thousands of pictures and I want to create thumbnails out of them. But I don’t want to simply resize the whole images, I’d like to crop them so it feathers around the person’s face.

So the script would have to detect the approximate area where a human face is found. Then draw a rectangle around the area, add 100 pixels to each side and crop that area.

I know it’s asking for much.. but maybe someone’s done this already and you know about it.. just going out on a limb here. If you know of a script, or a software that does this, please let me know!

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMar 28.2008 — I'm not aware of anything, but my guess is that if such a thing is available, it's probably done in C or other compiled language.
Copy linkTweet thisAlerts:
@pexOct 31.2008 — There is already a stable solution for this problem. You only have to install OpenCV and if you want, there is also a PHP Extension on xarg
Copy linkTweet thisAlerts:
@bejitto101Oct 31.2008 — Well it returns the coordinates of the face, but can you crop images with PHP? Looks pretty cool though.
Copy linkTweet thisAlerts:
@JustinOct 31.2008 — Yea you can, look into GD functions http://us.php.net/manual/en/function.imagecopy.php
×

Success!

Help @vesper8 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...