OpenCV setup on Mac Java opencv2.4.9

asked 2014-08-01 01:31:56 -0500

Lokesh Tiwari gravatar image

updated 2014-08-01 02:47:45 -0500

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

I get

Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java244in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at Main.main(Main.java:9)

This is sample code and error produced. I have tried

System.load("obsulutepath//opencv_java249.dll");

also but same error happens every time. Is their any other "dll" for mac os(mountain lion) or do we need .NET framework in PC so that this dll get executed. Please guide.

edit retag flag offensive close merge delete

Comments

The Java desktop interface of the official OpenCV is still under development. Either use JavaCV, which is an external library that creates Java wrappers or use the C++/Python interface.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-01 02:49:05 -0500 )edit