video_capture.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:PyIntroduction 作者: tody411 项目源码 文件源码
def cvCaptureVideo():
    capture = cv2.VideoCapture(0)

    if capture.isOpened() is False:
        raise("IO Error")

    cv2.namedWindow("Capture", cv2.WINDOW_NORMAL)

    while True:
        ret, image = capture.read()

        if ret == False:
            continue

        cv2.imshow("Capture", image)

        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    capture.release()
    cv2.destroyAllWindows()


# Matplot???Web????????????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号