断言失败:带有Python 3的OpenCS

时间:2019-01-13 01:26:58

标签: python-3.x opencv camera

我正在尝试使用OpenCS和带有网络摄像头的视频进行进一步处理,但一直在获得Failed if statement

from cv2 import *

cam = cv2.VideoCapture(1)

s, img = cam.read()

if s:
    nameWindow("cam-test", CV_WINDOW_AUTOSIZE)
    ifshow('cam-test',img)
    waitKey(0)
    destroyWindow("cam-test")
     imwrite("filename.jpg", img)
else:
    print("Failed if statement")

0 个答案:

没有答案