SuironIO.py 文件源码

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

项目:suiron 作者: kendricktan 项目源码 文件源码
def get_frame_prediction(self):
        ret, frame = self.cap.read()

        # if we get a frame
        if not ret:
            raise IOError('No image found!')

        frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
        frame = cv2.resize(frame, (self.width, self.height), interpolation=cv2.INTER_CUBIC)
        frame = frame.astype('uint8')

        return frame


    # Normalizes inputs so we don't have to worry about weird
    # characters e.g. \r\n
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号