Problem with the test2 of javacv

37 views
Skip to first unread message

etekno

unread,
Dec 28, 2010, 9:05:13 AM12/28/10
to javacv
I get this error while running the test2 example of javacv:

[ 0.99636316, 0.042701807, -23.595554
-0.043815516, 0.99894774, -4.3367324
2.283744E-4, 5.2293086E-5, 0.9971857 ]
OpenCV Error: Bad argument (Invalid classifier cascade)
in function cvHaarDetectObjects, C:\Users\etekno\Desktop
\OpenCV-2.1.0\src\cv\cvhaar.cpp(1007)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Unknown Source)
at
com.googlecode.javacv.JavaCvErrorCallback.callback(JavaCvErrorCallback.java:
67)
at com.googlecode.javacv.jna.cv.cvHaarDetectObjects(Native Method)
at com.googlecode.javacv.jna.cv.cvHaarDetectObjects(cv.java:2328)
at Test2.main(Test2.java:72)


I've compiled without sse,sse2,fastmath and o3 (otherwise whit this
same error i'd get a blue screen like it happened many times to me :-
D) but i get this errore and can't seem to understand why.
Looking in the javacv facvedetection page it seems that it is a know
problem of opencv but even if i do as it says t do ading this lines:

IplImage binBoard = IplImage.create(200,200,IPL_DEPTH_8U,1) ;
cvErode(binBoard,binBoard,null,3) ;

just before the:
CvSeq faces = cvHaarDetectObjects(grayImage, classifier, storage, 1.1,
3, 0/*CV_HAAR_DO_CANNY_PRUNING*/);

i still get the same error.
What can i do please? :-(

etekno

unread,
Dec 28, 2010, 10:30:09 AM12/28/10
to javacv
I've tried with only sse and sse2 disabled by ccmake or even editing
the ctypes.h file manually. I don't get blue screens but i still have
the same problem.
I'm running the program on my laptop with windows 7 professional
64bit, with eclipse galileo and the latest JVM.

Samuel Audet

unread,
Dec 28, 2010, 8:50:15 PM12/28/10
to jav...@googlegroups.com
This has nothing to do with JavaCV. Please read the FaceDetection guide
of OpenCV:
http://opencv.willowgarage.com/wiki/FaceDetection
You need to have a haar cascade XML file, and obviously your
installation of OpenCV does not come with one

Samuel

etekno

unread,
Dec 29, 2010, 5:16:11 AM12/29/10
to jav...@googlegroups.com
Oh you're right! I didn't notice cause the errore was in another line
of code...embarassing XD
Now the example works perfectly, thanks a lot :-)

2010/12/29 Samuel Audet <samuel...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages