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()
评论列表
文章目录