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) {
          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(
    at java.lang.Runtime.loadLibrary0(
    at java.lang.System.loadLibrary(
    at Main.main(

This is sample code and error produced. I have tried


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


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