please help me in configure the opencv for eclipse juno in java
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:
- extract the opencv file in location c:
- open eclipse and create a project
- open the properties and go to java build path
- 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
- add
opencv-245.jar
file with click onadd external jar file
button - and for native library location edit this and set this directory for this:
c:/opencv/build/java/x64
- click
finsih
i run this code and appear this exception please help me
If my solution is working for you: i would appreciate it you accepted it as a solution by clicking the accept sign.