简体   繁体   English

c ++ OpenCV捕获easycap usb cam

[英]c++ OpenCV capture easycap usb cam

I am trying to get video stream from analog camera connected to usb easycap - in OpenCV C++. 我试图从连接usb easycap的模拟摄像机获取视频流 - 在OpenCV C ++中。

using MATLAB, I can get stream the same approach like for laptop webcam (with changing the index from 1 to 2). 使用MATLAB,我可以获得与笔记本电脑网络摄像头相同的方法(将索引从1更改为2)。

with OpenCV, I can get stream from laptop webcam with index 0. but when I am trying to get with the camera connected to the easycap (using index 1) , the laptop crashes and get blue screen. 使用OpenCV,我可以从索引为0的笔记本电脑摄像头获取流。但是当我试图将相机连接到easycap(使用索引1)时,笔记本电脑崩溃并变为蓝屏。

Anyone have done this before? 以前有人这样做过吗?

Thanks 谢谢

I work on the same device and I also have some BSOD with it. 我在相同的设备上工作,我也有一些BSOD。

Do you plug it with the USB extension provided ? 你用提供的USB扩展插头吗? If yes, try don't use it. 如果是,请尝试不要使用它。

If your problem is still hapening, it's probably because like me, you use a low quality chinese fake EasyCap. 如果你的问题仍然存在,那可能就像我一样,你使用的是低质量的中国假EasyCap。 I bought a real one and I haven't problems anymore 我买了一个真正的,我没有问题了

If you want to keep your device, you can use it with VideoCapture in python, it works very well and there is no more BSOD 如果你想保留你的设备,你可以在python中使用VideoCapture ,它工作得很好,没有更多的BSOD

Try using Linux. 尝试使用Linux。 I tested my code with a fake EasyCAP in windows and I got many BSOD then I built and executed the same code in Linux and it worked. 我在Windows中使用假的EasyCAP测试了我的代码,然后我获得了许多BSOD,然后我在Linux中构建并执行了相同的代码并且它工作正常。 Linux is driver friendly. Linux对驱动程序友好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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