windows, eclipse, java and openCV-245

asked 2013-05-01 05:01:06 -0600

keltik gravatar image

updated 2013-05-01 05:31:30 -0600

Hi, I am following the instructions on this page for installation of openCV:

But it doesn't work. I cant execute the example code.

import org.opencv.core.CvType;
import org.opencv.core.Mat;

public class Main {
public static void main(String[] args) {
    Mat m  = Mat.eye(3, 3, CvType.CV_8UC1);
    System.out.println("m = " + m.dump());

I need openCV to do some motion detection on image-series, but i am too stupid to import openCV-2.4.5 properly.

The console output shows this message:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java244 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at camStatisticsTests.RawTests.main(

What am i doing wrong ?

edit retag flag offensive close merge delete


someone edited the tutorial, but it still doesn't work, same error.

keltik gravatar imagekeltik ( 2013-05-01 05:30:29 -0600 )edit

Actually i found a solution myself: The Tutorial doesn't show that the dll inside the path "opencv\build\java\x86" has to be attached to the jar. The editors should update this. It leads to confusion.

keltik gravatar imagekeltik ( 2013-05-01 06:17:35 -0600 )edit