SOLVED Does the Cascade Classifier work with OpenCV 2.4.11
I have created a program to detect faces in a live camera feed from a Webcam. It works fine in OpenCV 3.4.1 Java! However, I am trying to make a robot with face detection on the Lego EV3. The Lego EV3 uses leJOS and OpenCV 2.4.11! The program does not complete with OpenCV 2.4.11! It halts on line 34.
CascadeClassifier face_cascade = new CascadeClassifier();
I get the error . . .
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.objdetect.CascadeClassifier.CascadeClassifier_0()J at org.opencv.objdetect.CascadeClassifier.CascadeClassifier_0(Native Method) at org.opencv.objdetect.CascadeClassifier.<init>(CascadeClassifier.java:38) at samples.face_detection.main(face_detection.java:34)
Does anyone know the cause/solution?
My program in it's entirety follows . . . (NOT)
EDIT 4/17/2018
Here is my test program . . .
import org.opencv.core.Core;
import org.opencv.objdetect.CascadeClassifier;
public class TESTFACE {
public static void main(String[] args) {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
CascadeClassifier face_cascade = new CascadeClassifier("haarcascade_frontalface_alt.xml");
}
}
The error is the same.
Could you initialize the cascade classifiers directly upon creation?
CascadeClassifier face_cascade = new CascadeClassifier("/path/to/cascade/");
should do the trickThat was my only idea. My new test program focused on the error.