简体   繁体   中英

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM