webcam.py 文件源码

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

项目:moVi 作者: netsecIITK 项目源码 文件源码
def getFrame(self):
        ret = False
        count = 0
        while not ret:
            # Capture frame-by-frame
            count = count + 1
            ret, frame = self.cap.read()

            if cv2.waitKey(1) & 0xFF == ord('q'):
                return (False, None)

            if count > 10:
                return (False, None)

        return (True, frame)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号