We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Face Detect Library (Mac) – feeding it images
Page Index Toggle Pages: 1
Face Detect Library (Mac) – feeding it images (Read 1275 times)
Face Detect Library (Mac) – feeding it images
May 7th, 2008, 7:57pm
 
Hi,

I've been using Jaegon Lee's Face Detect library for live camera input and it works wonderfully.

However, I am attempting another project that requires just the use of the face detection on still images, i.e. PImage.

Has anyone figured out a way to do that?


I have taken a look at Bryan Chung's PC version, and tried to compile an opencv jnilib on my mac using xcode. So far I've been unsuccessful in compiling and I wonder if anyone here has a solution.

All I need is to do face detection on a PImage on my mac.


Please help!
Re: Face Detect Library (Mac) – feeding it images
Reply #1 - May 22nd, 2008, 12:35am
 
Ya! help me too!
Re: Face Detect Library (Mac) – feeding it images
Reply #2 - May 22nd, 2008, 1:47am
 
ascorbin,

i've managed to do a successful re-compile of Bryan Chung's source code that he put up on his blog. it works exactly the same as his original PC version.

unfortunately i do not have the compiled jni and jar file now as my macbookpro is now running in an installation. if you can hang on for a couple of days i'll be able to get access to it and send it to you.

if you want to roll your own, it was a matter of getting the C includes to access the header files. i used the xcode java native library template as a starting point, and then replaced the function calls with Bryan's c source. the tricky part was getting the project to build properly with the opencv includes.

will post a reply here in a couple of days when i get access to the files.

...and thanks to Bryan for putting up your source code, this would have taken far longer without something to start with.
Re: Face Detect Library (Mac) – feeding it images
Reply #3 - May 22nd, 2008, 9:47am
 
Hey thank you very nice!

greetings ascorbin
Re: Face Detect Library (Mac) – feeding it images
Reply #4 - May 25th, 2008, 5:41pm
 
ascorbin,

here's the link:
http://dm.risd.edu/~akhoo/p5/pfacedetect_mac.zip


hope this helps!
Re: Face Detect Library (Mac) – feeding it images
Reply #5 - May 25th, 2008, 8:26pm
 
thank you! but it gives me this error:

OpenCV ERROR: Null pointer (Invalid classifier cascade)

in function cvHaarDetectObjects, /Users/david/Work/Development/Net/opencv/xcode/../cv/src/cvhaar.cpp(890)
Terminating the application...
/Users/david/Work/Development/Net/opencv/xcode/../cxcore/src/cxerror.cpp:360: failed assertion `0'

looks like an absolute path on your computer

EDIT: Hurra! Now it works! Thank you a lot (I had to put haarcascade into the data folder)

greetings
Re: Face Detect Library (Mac) – feeding it images
Reply #6 - Jun 4th, 2008, 12:52am
 
sorry i didn't get back to you sooner, it's been a long week.

glad you managed to get it working. i forgot to mention in my earlier post that you can specify different haarcascade xml files to use. Both absolute and relative paths will work.

detect = new PFaceDetect(papplet, imgW, haarPathandFilename);


cheers
Page Index Toggle Pages: 1