我最近下载了 OpenCv 库,我正在尝试使用它的功能,但不幸的是我无法这样做。这是我编写的类
/*
* 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();
}
}
我正在使用 netbeans IDE,它没有显示语法错误。但是在运行它之后,我得到了以下错误。
!!! 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)
但是我已经完成了所有操作,就像我导入了库一样,几乎将 OpenCv.dll 文件放置在任何地方。但我不断收到此错误。帮助