i write a test program for opencv in java and i face with this exception my code is: package ImageProc;
import org.opencv.core.Mat; import org.opencv.highgui.Highgui; import org.opencv.highgui.VideoCapture;
public class Test { public static void main(String[] args) { System.out.println("hello opencv"); System.loadLibrary("opencv-245"); VideoCapture capture = new VideoCapture(0); if(!capture.isOpened()) System.out.println("Did not connect to camera!"); else System.out.println("Found WebCam :"+capture.toString()); Mat mat = new Mat(); capture.retrieve(mat); Highgui.imwrite("me1.jpg", mat); capture.release();
}
}
in exception is: Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv-245 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at ImageProc.Test.main(Test.java:14)
for configure,i do this work: 1-extract the opencv file in location c: 2-open eclipse and create a project 3-and then open the properties and go to java build path 4-click on the add library button ,then select user library ,click user library ,click new and create a new library with this name opencv.245 5-add opencv-245 jar file with click on add external jar file button 6-and for native library location :edit this and set this directory for this: c:/opencv/build/java/x64 7-and then click finsih
i run this code and appear this exception please help me