user1720616
user1720616

Reputation: 553

Image processing library

I recently downloaded OpenCv library and i am trying to use its functionality but unfortunately i am unable to do so.This is the class that i have written

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Opencv;

import hypermedia.video.*;

/**
 *
 * @author 

 */
public class LoadImage
{
    public LoadImage()
    {


        OpenCV opencv = new OpenCV( );
        opencv.loadImage( "one.png", 200, 100);
        image( opencv.image(), 0, 0 );
      //  image( opencv.loadImage("one.png.jpg"), 0, 0);


    }


    public static void main(String[] args)
    {
               LoadImage im=new LoadImage();
    }
}

I am using netbeans IDE and it shows no syntatic error.However after running this i get the following error.

!!! required library not found : C:\Program Files\Java\jdk1.6.0_21\bin\OpenCV.dll: Can't find dependent libraries
Verify that the java.library.path property is correctly set and the '\path\to\OpenCV\bin' exists in your system PATH

Exception in thread "main" java.lang.UnsatisfiedLinkError: hypermedia.video.OpenCV.loadImage(Ljava/lang/String;II)V
    at hypermedia.video.OpenCV.loadImage(Native Method)
    at Opencv.LoadImage.<init>(LoadImage.java:20)
    at Opencv.LoadImage.main(LoadImage.java:30)
Java Result: 1
BUILD SUCCESSFUL (total time: 6 seconds)

however i have done everything as in i have imported the library,have placed the OpenCv.dll files practically everywhere.But i keep on getting this error.Help

Upvotes: 1

Views: 1881

Answers (1)

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

It appears that java can not find proper DLL - openCV is invoked via JNI. Here is useful answer: OpenCV to JNI how to make it work?

Upvotes: 1

Related Questions