!empty() in function detectMultiScale with Java sample app
Hi All, I am trying to run the sample application and I think I managed to pack it correctly. Only, I created a maven project as opposed to an ant build. However, I run into this output:
OpenCV Error: Assertion failed (!empty()) in detectMultiScale, file /home/ste/Projects/opencv-3.1.0/modules/objdetect/src/cascadedetect.cpp, line 1639 Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: /home/ste/Projects/opencv-3.1.0/modules/objdetect/src/cascadedetect.cpp:1639: error: (-215) !empty() in function detectMultiScale ] at org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(Native Method) at org.opencv.objdetect.CascadeClassifier.detectMultiScale(CascadeClassifier.java:159) at com.funambol.opencv.OpenCVTest.run(OpenCVTest.java:38) at com.funambol.opencv.OpenCVTest.main(OpenCVTest.java:58)
Has anyone any clue of what the problem could be?
error means, that your cascade xml was not loaded.
no idea, how you package your project, just keep in mind, that opencv is basically a c++ library, and thus the CascadeClassifier can't read from a zip or such.
thanks for the comment, break. How does opencv load the cascade xml? what is this file and where is supposed to be in order to be laoded by the library?
you will find the name of it in the CascadeClassifier constructor, or the load() function of that.
"where is it supposed to be ?" somewhere on disk as a plain xml file (not in some zip or jar)