I want to run a face detect program in java,and get this.How can I fix it? public class DetectFace { public void Detect(){ System.out.println("Running DetectFace..."); System.out.println(getClass().getResource("lbpcascade_frontalface.xml").getPath()); // CascadeClassifier faceDetector=new CascadeClassifier(getClass().getResource("lbpcascade_frontalface.xml").getPath().substring(1)); String xmlfilePath=getClass().getResource("lbpcascade_frontalface.xml").getPath().substring(1); CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);
}
}
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.objdetect.CascadeClassifier.CascadeClassifier_1(Ljava/lang/String;)J at org.opencv.objdetect.CascadeClassifier.CascadeClassifier_1(Native Method) at org.opencv.objdetect.CascadeClassifier.<init>(CascadeClassifier.java:58) at faceDetect.DetectFace.Detect(DetectFace.java:18) at faceDetect.TestPro.main(TestPro.java:18)