首页 > 解决方案 > Lepton PureThermal 在 Python3 OpenCV 中不起作用

问题描述

错误 [ERROR:0] 打开 VIDEOIO(AVFOUNDATION): 引发了未知的 c++ 异常!

规格详情

问题说明

代码

import cv2
cv2.namedWindow("preview")
cameraID = 0
vc = cv2.VideoCapture(cameraID)

if vc.isOpened(): # try to get the first frame
    rval, frame = vc.read()
else:
    rval = False

while rval:
    cv2.imshow("preview", frame)
    rval, frame = vc.read()
    key = cv2.waitKey(20)
    if key == 27: # exit on ESC
        break

其他附件

  1. 错误屏幕截图 - 终端:

错误屏幕截图 - 终端

  1. 缩放 - 选择网络摄像头(证明相机工作):

缩放 - 选择网络摄像头(证明相机工作)

标签: pythonopencvcamera

解决方案


推荐阅读