I'm a newb when it comes to JNI2OpenCV. It has errors regarding java.library.path. I've read this thread OpenCV to JNI how to make it work? but it seems that this is a different case from mine. Here's the errors I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\JNI2OpenCV.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728) at java.lang.Ru开发者_JAVA百科ntime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at jni2opencv.JNIOpenCV.(FaceDetection.java:6) at jni2opencv.FaceDetection.(FaceDetection.java:16) at jni2opencv.Main.main(Main.java:18)
I've copied the dlls to my specific libraries and I still get those errors. I even tried Dependency Walker, but I didn't have the slightest clue on what it told me. Any help? Thank you! :)
- Check that you have install microsoft c++ 2010 redistributable.
- Make sure that "C:\opencv\build\common\tbb" is your path in environment variables.
- Download javacv-0.1.jar and make this as your library file in your project.
- If the problem exist download cv100.dll, cvcam100.dll,cxcore100.dll,opencv_highgui220.dll from internet and copy this to system32.
- Also make sure that OpenCV library is compatible with javaCV and openCV folder contains a folder named "bin" .
- If problem still exist install openCVdotnet.
精彩评论