test.py 文件源码

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

项目:pycreate2 作者: MomsFriendlyRobotCompany 项目源码 文件源码
def read():
    db = shelve.open(filename)
    imgs = db['imgs']
    data = db['data']

    for i in range(len(imgs)):
        d = data[i]
        print(i, d)
        img = imgs[i]
        img = np.fromstring(img, np.uint8)
        frame = cv2.imdecode(img, 1)
        print('frame[{}] {}'.format(i, frame.shape))
        cv2.imshow('camera', frame)
        cv2.waitKey(300)

    print('bye ...')
    cv2.destroyAllWindows()
    db.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号