1

我正在导入以下内容:

import com.googlecode.javacv.FrameGrabber.Exception;
import com.googlecode.javacv.OpenCVFrameGrabber;

这工作正常。但是,当我初始化一个新OpenCVFrameGrabber对象然后尝试运行该.start()方法时,这样......

OpenCVFrameGrabber grabber =  new OpenCVFrameGrabber(0);
grabber.start();

我收到以下错误:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:174)
    at Main.main(Main.java:7)
Caused by: java.lang.IllegalStateException: Can't overwrite cause
    at java.lang.Throwable.initCause(Throwable.java:456)
    at com.googlecode.javacpp.Loader.load(Loader.java:581)
    at com.googlecode.javacpp.Loader.load(Loader.java:532)
    at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:79)
    ... 2 more

怎么了?我猜我的 OpenCV/JavaCV 设置有问题。

4

0 回答 0