admin管理员组文章数量:1566353
I'm trying to access a basic webcam (Logitech c270) through opencv python VideoCapture. Unfortunately though, every time I run the program the display screen comes up black. I know the camera works because I can view the video through their software. I am well aware of making sure to put in the waitkey(x) so that's not the issue. I also have this code just in case the index changes:
for i in range(4):
capture = cv2.VideoCapture(i)
if not capture:
print "UNABLE TO CAPTURE CAMERA"
else:
print "taken camera from index: ", i
break
But it's returned a 0 index each time. And it's the issue is not that it's having trouble finding it either because I have a part of code to tell me if the camera was able to retrieve a frame, so maybe the problem is with read().
Finally, maybe the issue is that my
版权声明:本文标题:python打开摄像头黑屏怎么办,将网络摄像头与opencv python一起使用时显示带有wwaitkey()的黑屏... 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1727196294a1101772.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论