OpenCV VideoCapture检索无法正常工作

时间:2015-04-07 18:30:10

标签: java opencv video-capture

我正在尝试从网络摄像头捕获帧。网络摄像头似乎正在正常打开,但retrieve()read()语句始终返回false

Mat frame1 = new Mat();

VideoCapture cap1 = new VideoCapture(0);

try {
    Thread.sleep(1000);
} catch (InterruptedException e) {
    e.printStackTrace();
}

System.out.println(cap1.isOpened());

System.out.println(cap1.read(frame1));

输出:

True 
False

0 个答案:

没有答案