Ask Your Question

sd169048's profile - activity

2018-04-06 08:40:46 -0600 received badge  Student (source)
2016-06-16 03:42:34 -0600 received badge  Editor (source)
2016-06-16 03:27:46 -0600 asked a question How can I use the gpu.class in eclipse?

I have the program code in eclipse like this:

public class TestforGPU {
    public static void main(String[] args) {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        System.out.println(Gpu.getCudaEnabledDeviceCount());
    }
}

but it always output the "0" which is means that OpenCV is compiled without GPU support. My device is GTX970M,CUDA vesion is 7.5. How can I deal with it

2016-03-12 02:43:23 -0600 commented answer UnsatisfiedLinkError with CascadeClassifier

Thanks for your answer! I have load opencv_java.so/dll in public static void main(String[] args),like this public static void main(String[] args) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); new DetectFace().Detect(); } } and also try your advance,but the error is still exist.

2016-03-11 08:15:31 -0600 asked a question UnsatisfiedLinkError with CascadeClassifier

I want to run a face detect program in java,and get :

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.objdetect.CascadeClassifier.CascadeClassifier_1(Ljava/lang/String;)J

.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)