【发布时间】:2019-11-20 22:52:36
【问题描述】:
我正在尝试为我要解决的图像分类问题记录 kinectv2 数据。有什么办法可以记录kinectv2的数据吗?
我尝试使用 pickle 来保存深度数据,但是由于 Frame 类的 libfreenect2 库中没有 __reduce__ 方法,我遇到了错误。
frames = listener.waitForNewFrame()
depth = frames["depth"]
with open("captures/frame_" + str(i) + "_depth.obj", 'w') as file:
pickle.dump(depth, file)
with open("captures/frame_" + str(i) + "_depth.obj", 'r') as file:
depth = pickle.load(file)
我遇到了给定的错误:
TypeError: no default __reduce__ due to non-trivial __cinit__
【问题讨论】:
标签: cython python-3.5 pickle kinect libfreenect2