Face Detection & Crop

Ask about a PHP problem here.
Post Reply
ashwood
Posts: 144
Joined: Thu May 12, 2011 7:17 am

Face Detection & Crop

Post by ashwood »

I was wondering how i would let my users upload a profile picture but aswell as the original being uploaded i would like a thumbnail version to be saved from it like facebook does has original and a thumbnail version for comments etc.. how would i go about doing this?

Thanks
I would put a signature.. BUT, i don't have the time.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Face Detection & Crop

Post by jacek »

Cropping is very easy have a look at my image gallery tutorial for how to do that.

Face detection though, would be pretty hard to do ! Your best bet would be looking for a php extension that provides a function to do it, since implementing the actual detection with php would be too slow to process. Luckily it's somethign a lot of people are trying to get right http://www.google.co.uk/search?hl=en&q= ... +detection
Image
ashwood
Posts: 144
Joined: Thu May 12, 2011 7:17 am

Re: Face Detection & Crop

Post by ashwood »

Yeah the crop is easy but don't want the image to look stretched and I can't install any extensions to the server
I would put a signature.. BUT, i don't have the time.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Face Detection & Crop

Post by jacek »

You can crop it and keep the aspect ratio easily. I did that in my image gallery video.
Image
ashwood
Posts: 144
Joined: Thu May 12, 2011 7:17 am

Re: Face Detection & Crop

Post by ashwood »

im going to do your tutorial tonight see if it does the job on my website.. ill let you know how it goes thanks
I would put a signature.. BUT, i don't have the time.
ashwood
Posts: 144
Joined: Thu May 12, 2011 7:17 am

Re: Face Detection & Crop

Post by ashwood »

Just been watching your tutorial on the image gallery.. its exactly what i need just without the face detection? correct?
I would put a signature.. BUT, i don't have the time.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Face Detection & Crop

Post by jacek »

ashwood wrote:Just been watching your tutorial on the image gallery.. its exactly what i need just without the face detection? correct?
Well it should show you how to crop an image if that is what you want ?
Image
ashwood
Posts: 144
Joined: Thu May 12, 2011 7:17 am

Re: Face Detection & Crop

Post by ashwood »

jacek wrote:
ashwood wrote:Just been watching your tutorial on the image gallery.. its exactly what i need just without the face detection? correct?
Well it should show you how to crop an image if that is what you want ?
crop with face detection
I would put a signature.. BUT, i don't have the time.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Face Detection & Crop

Post by jacek »

Face detection will be a lot harder, check the link I posted above for info on how to do it though.
Image
Post Reply