无法启动OpenCVFrameGrabber

时间:2013-11-08 22:30:16

标签: java opencv webcam javacv

我正在导入以下内容:

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设置有问题。

0 个答案:

没有答案