Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将python pyrealsense2对象发送到另一台服务器_Python_Python 3.x_Pickle_Realsense - Fatal编程技术网

如何将python pyrealsense2对象发送到另一台服务器

如何将python pyrealsense2对象发送到另一台服务器,python,python-3.x,pickle,realsense,Python,Python 3.x,Pickle,Realsense,我正在使用用于Intel Realsense D435 3D相机的库。 我想对frame对象进行pickle处理,但它说TypeError不可能,并通过一个小型flask服务器发送它。是否有其他方法将此python对象发送到其他服务器?我需要处理它。 谢谢 我相信可能包装器需要pickabe函数,但它没有?py::pickle(),没有这个,还有其他方法吗? # Get 3D Frame @app.route('/3D') def get_3D(): pipeline = rs.pipe

我正在使用用于Intel Realsense D435 3D相机的库。 我想对frame对象进行pickle处理,但它说TypeError不可能,并通过一个小型flask服务器发送它。是否有其他方法将此python对象发送到其他服务器?我需要处理它。 谢谢


我相信可能包装器需要pickabe函数,但它没有?py::pickle(),没有这个,还有其他方法吗?
# Get 3D Frame
@app.route('/3D')
def get_3D():
    pipeline = rs.pipeline()
    pipeline.start()
    try:
        print("Get 3D Frame")
        # Remove old Pickle if exist
        if(os.path.isfile("3d.pkl")):
            os.remove("3d.pkl")
        frames = pipeline.wait_for_frames()
        depth_frame = frames.get_depth_frame()
        if (depth_frame):
            # Create new pickle file
            with open('3d.pkl', 'wb') as f:
                pickle.dump(depth_frame, f)
            return send_file('3d.pkl')

    finally:
        pipeline.stop()