Highgui.imread() on Java gives UnsatisfiedLinkError [closed]

asked 2013-07-31 12:18:45 -0600

Dimuthu gravatar image

updated 2013-09-03 01:30:07 -0600

berak gravatar image

I'm new to openCV and trying to write my first program with it. However, I still couldn't get it to working.

File file = new File("L:\\Rc.jpg");
if (file.exists()) { // This is true
    Mat m = Highgui.imread(file.getAbsolutePath());  //file.getPath() also same
}

the Highgui.imread command gives the following error no matter the image file I try to use. (BMP, JPEG, etc) Am I fundamentally wrong?

Version: opencv 2.4.5, OS : Windows 7 32bit, Java: jdk1.7.0_11, IDE: IntelliJ IDEA Community Edition 12.0.4

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.Highgui.imread_1(Ljava/lang/String;)J
at org.opencv.highgui.Highgui.imread_1(Native Method)
at org.opencv.highgui.Highgui.imread(Highgui.java:350)
at com.example.AndroidTest.DetectSquares.main(DetectSquares.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Andrey Pavlenko
close date 2013-09-09 10:14:36.173601

Comments

is that desktop java ? or android ( as the stacktrace seems to hint at ) ?

berak gravatar imageberak ( 2013-09-03 01:31:15 -0600 )edit