T265 长时间采集pose和FishEye图像的代码

5 篇文章 0 订阅
3 篇文章 0 订阅

问题描述

下述链接:
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python/examples

给出了使用Intel T265进行定位和拍照的Demo代码。

然而,该代码存在问题:

当读取的帧数>2500帧时,会报错无法接收到frame;

解决方案

  • 参考相关cpp例程,只需要对读取fisheye的帧调用.keep()方法即可
  • 具体代码如下:
for frame_index in range(60000):
    # Wait for the next set of frames from the camera
    frames = pipe.wait_for_frames()
    # pdb.set_trace()
    pose = frames.get_pose_frame()

    if frame_index % 10 == 0:

        fisheye_frame = frames.get_fisheye_frame(1)
        # ========== 关键代码 =========
        fisheye_frame.keep()
        # ==============================
        left_data = np.asanyarray(fisheye_frame.get_data())
        Video.append(left_data)
    if pose:
        # Print some of the pose data to the terminal
        # 保存数据 {"timestamps":, }
        data = pose.get_pose_data()
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

R.X. NLOS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值