I have a problem setting my own library path for opencv in eclipse-ubuntu.i using ubuntu 15.04.installed opencv 3.1.0 after this link http://milq.imtqy.com/install-opencv-ubuntu-debian/ and add a new one library (OpenCV) in eclipse and set the jar path for it as
/home/user/opencv-3.1.0/build/bin/opencv-310.jar
and the path to the source library as
/home/user/opencv-3.1.0/build/lib
lib folder contains the .so and .a . But when I try to use the Mat object, it gives me an error: here is the Main method
System.out.println("Welcome to OpenCV hhhh " + Core.VERSION); System.loadLibrary(Core.NATIVE_LIBRARY_NAME); Mat img=new Mat();
and here is a screenshot of my code and console
this gives me an error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat()J at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.<init>(Mat.java:24)
if i use mat like this
Mat m1 =Imgcodecs.imread("/home/zed/Desktop/img.png");
then this gives me a diff error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.imgcodecs.Imgcodecs.imread_1(Ljava/lang/String;)J at org.opencv.imgcodecs.Imgcodecs.imread_1(Native Method) at org.opencv.imgcodecs.Imgcodecs.imread(Imgcodecs.java:102)
Am I giving the right way for my native library? If not, what is the proper way for the Native Library to use Opencv3.1.0 in eclipse-ubuntu
source share