i have issue in setting native library path opencv in eclipse-ubuntu.i using ubuntu 15.04.installed opencv 3.1.0 following link http://milq.github.io/install-opencv-ubuntu-debian/ , add new library(opencv) in eclipse , set it's jar path as
/home/user/opencv-3.1.0/build/bin/opencv-310.jar
and native library path as
/home/user/opencv-3.1.0/build/lib
lib
folder contains .so
, .a
files. when try use mat object gives me error:here main method
system.out.println("welcome opencv hhhh " + core.version); system.loadlibrary(core.native_library_name); mat img=new mat();
and here screenshot of code , console gives me error:
exception in thread "main" java.lang.unsatisfiedlinkerror: org.opencv.core.mat.n_mat()j @ org.opencv.core.mat.n_mat(native method) @ org.opencv.core.mat.<init>(mat.java:24)
if use mat this
mat m1 =imgcodecs.imread("/home/zed/desktop/img.png");
then gives me diff error:
exception in thread "main" java.lang.unsatisfiedlinkerror: org.opencv.imgcodecs.imgcodecs.imread_1(ljava/lang/string;)j @ org.opencv.imgcodecs.imgcodecs.imread_1(native method) @ org.opencv.imgcodecs.imgcodecs.imread(imgcodecs.java:102)
am giving right path native library? if not right path native library use opencv3.1.0 in eclipse-ubuntu
you should add
system.loadlibrary(core.native_library_name);
main:
public static void main(string[] args) { system.out.println("welcome opencv hhhh " + core.version); system.loadlibrary(core.native_library_name); mat m1 =imgcodecs.imread("/home/zed/desktop/img.png"); mat m2=new mat(); }
hope helps!
Comments
Post a Comment