Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Highgui.imread() on Java gives UnsatisfiedLinkError

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)
click to hide/show revision 2
No.2 Revision

updated 2013-09-03 01:11:12 -0600

berak gravatar image

Highgui.imread() on Java gives UnsatisfiedLinkError

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)
click to hide/show revision 3
No.3 Revision

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

berak gravatar image

Highgui.imread() on Java gives UnsatisfiedLinkError

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)