rindarith / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Problem in loading two file haar classifier xml at the same time? #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When i trying to load two haar classifier file to detect face, and then 
detect eye in the face's region.
2. I have try to put the file "haarcascade_lefteye_2splits.xml" in the project 
"libs" folder, in the /com/googlecode/javacv/facepreview/.. of the javacv.jar 
and do the same as loading the "haarcascade_frontalface_alt" file (Look at the 
code below), but it isn't working at all. 
3. Please help me, i am a new guy in javaCV!

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by thanhhoa...@gmail.com on 9 Sep 2011 at 3:15

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, One more thing, if i replace "haarcascade_frontalface_alt" with the 
"haarcascade_lefteye_2splits.xml", and rename it to 
"haarcascade_frontalface_alt". it's work in 10-15cm between eye and the 
device's camera. I am using Samsung Galaxy i9003.
Please give me a help! My thesis's deadline is coming.

Original comment by thanhhoa...@gmail.com on 9 Sep 2011 at 3:18

GoogleCodeExporter commented 9 years ago
You need to give them two different /temporary/ filenames as well. Something 
like
    File classifierFileEye = Loader.extractResource(getClass(), "haarcascade_lefteye_2splits.xml", 
            context.getCacheDir(), "classifier2", ".xml");
should work..

Original comment by samuel.a...@gmail.com on 10 Sep 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Thanks you Mr. Samuel
I will try it first!

Original comment by thanhhoa...@gmail.com on 10 Sep 2011 at 4:53

GoogleCodeExporter commented 9 years ago
HI, Mr.Samuel i have tried like this (file above) and i call the 
cvHaarDetectObjects:

 faces = cvHaarDetectObjects(grayImage, classifier_face, storage_face, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);
 eyes = cvHaarDetectObjects(grayImage, classifier_eye, storage_eye, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);
 BUt it isn't work. It doesn't error when i load xml file. But i shown " Force Close", you know, it's work when i run only Haar_face, I really don't know the reason.
Please take a look over my code!

Original comment by thanhhoa...@gmail.com on 10 Sep 2011 at 4:06

Attachments:

GoogleCodeExporter commented 9 years ago
Please refer to the error log to understand the error...

Original comment by samuel.a...@gmail.com on 11 Sep 2011 at 12:52