# 获取摄像头的内参是为了将像素坐标转化成实际坐标
import pyrealsense2 as rspipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)
profile = pipeline.start(config)
frames = pipeline.wait_for_frames()
depth = frames.get_depth_frame()
color = frames.get_color_frame()
# 获取内参
depth_profile = depth.get_profile()
print(depth_profile)
# <pyrealsense2.video_stream_profile: 1(0) 640x480 @ 30fps 1>
print(type(depth_profile))
# <class 'pyrealsense2.pyrealsense2.stream_profile'>
print(depth_profile.fps())
# 30
print(depth_profile.stream_index())
# 0
print(depth_profile.stream_name())
# Depth
print(depth_profile.stream_type())
# stream.depth
print('', depth_profile.unique_id)
# <bound method PyCapsule.unique_id of <pyrealsense2.video_stream_profile: 1(0) 640x480 @ 30fps 1>>color_profile = color.get_profile()
print(color_profile)
# <pyrealsense2.video_stream_profile: 2(0) 640x480 @ 30fps 6>
print(type(color_profile))
# <class 'pyrealsense2.pyrealsense2.stream_profile'>
print(depth_profile.fps())
# 30
print(depth_profile.stream_index())
# 0cvsprofile = rs.video_stream_profile(color_profile)
dvsprofile = rs.video_stream_profile(depth_profile)color_intrin = cvsprofile.get_intrinsics()
print(color_intrin)
# width: 640, height: 480, ppx: 318.482, ppy: 241.167, fx: 616.591, fy: 616.765, model: 2, coeffs: [0, 0, 0, 0, 0]
depth_intrin = dvsprofile.get_intrinsics()
print(depth_intrin)
# width: 640, height: 480, ppx: 317.78, ppy: 236.709, fx: 382.544, fy: 382.544, model: 4, coeffs: [0, 0, 0, 0, 0]
extrin = depth_profile.get_extrinsics_to(color_profile)
print(extrin)
# rotation: [0.999984, -0.00420567, -0.00380472, 0.00420863, 0.999991, 0.00076919, 0.00380145, -0.00078519, 0.999992]
# translation: [0.0147755, 0.000203265, 0.00051274]

Intel Realsense D435 如何获取摄像头的内参?get_profile() video_stream_profile() get_intrinsics()相关推荐

  1. Intel Realsense D435 如何通过摄像头序列号重置hardware_reset()摄像头?

    重置后没有必要去立即检测它是否重置完成的,继续重置其他的摄像头就可以了,因为如果不去访问刚刚重置的摄像头信息,就不会出问题,等全部摄像头重置完成后,直接执行连续验证机制就可以了 相关代码: '''循环 ...

  2. Intel Realsense D435 python multiprocessing 摄像头多进程流传输

    参考文章1:python 测试multiprocessing多进程 参考文章2:Intel Realsense D435 多摄像头目标识别架构

  3. Intel Realsense D435 如何通过摄像头序列号获取指定摄像头的帧集对?

    需要先创建上下文管理器对象,通过该对象去获取已连接摄像头设备的序列号. 当然也可以直接指定摄像头的序列号,通过config.enable_device(ds5_serial)即可启动它. 如果不指定, ...

  4. Intel Realsense D435 关于深度摄像头获取实际深度坐标时的常见问题及可能的解决方案

    20191017 获取深度有时或遇到黑洞,或者取值不准直接"贯穿",导致深度直接扩大.缩小(小概率)或直接为0(当出现黑洞或深度超出可监测范围时就为0),今后可使用如下算法:检测目 ...

  5. Intel Realsense D435 Tensorlfow-yolov3 测试摄像头识别坐标转换成实际空间坐标的准确程度

    测试点1:(x=-359,y=208,z=644) 程序输出值(x=-354,y=203,z=668) 结论:z轴深度值差的比较多,可能跟摄像头下平面不水平有关.

  6. Intel Realsense D435 连续验证 摄像头初始化 hardware_reset() 失败案例

    # 连续验证max_veri_times = 100continuous_stable_value = 10print('\n', end='')print('开始连续验证,连续验证稳定值:{},最大 ...

  7. Intel Realsense D435 通过识别目标的像素坐标和深度值(使用内参intrinsics)获取目标点的真实坐标

    Intel Realsense D435 通过识别目标的像素坐标和深度值(使用内参intrinsics)获取目标点的真实坐标 图原理 基本获取内参`intrinsics`代码 实操代码1(在`tens ...

  8. python Intel Realsense D435 多线程资源分配问题(卡住、卡死)

    在使用python多线程调用Intel Realsense D435多个摄像头时,发现pyrealsense的例如pipeline.start().context.query_devices()函数会 ...

  9. Intel Realsense D435 python 如何获取(打印)所有摄像头序列号信息?

    import pyrealsense2 as rsctx = rs.context() if len(ctx.devices) > 0:for d in ctx.devices:print('F ...

最新文章

  1. mysql2tb_MySQL2
  2. 发票统计者 V1.0
  3. ASP.NET Core 6.0对热重载的支持
  4. android 访问服务器sql_一次服务器被传webshell事件溯源
  5. 华为P30系列高清渲染图曝光:后置三摄拍照要上天
  6. 很详细的硬盘基础知识
  7. 网站网络流量的极限,你考虑过么?
  8. 今日头条或推“多闪”对垒微信;快播王欣马桶 MT 被封;高通拒为 iPhone 提供芯片 | 极客头条...
  9. Chrome插件英雄榜(第二期)
  10. JavaScript短信验证码60秒倒计时插件
  11. 记一次Maya入门之材质和模型的导出
  12. 计算机考试190,计算机考试题库:计算机考试模拟练习题(190)
  13. halcon案例-指纹图片增强
  14. android9.0安装包更新,一加5官方安卓9.0稳定版固件rom系统升级更新包:第4版
  15. Linux系统编程 50 -stat和stat函数 穿透和非穿透
  16. [Java Web]AJAX Axios | 一种结合HTML来取代传统JSP的技术
  17. 艾美智能影库服务器ip,艾美影库MS-300 到底怎么样?
  18. 物联网Lora组网方式及私有协议的应用
  19. 【C语言】log,对数函数的使用
  20. 在win10/win7 64位系统上安装 hp laserjet 1015对应的打印机驱动

热门文章

  1. 【学习笔记】4、Jupyter Notebook闪退问题
  2. 【修正】销售开票BAPI实例:BAPI_BILLINGDOC_CREATEMULTIPLE
  3. 三、【SAP-PM模块】PM模块主数据
  4. 企业是否真的需要BI?
  5. 售达方、送达方的区别
  6. SAP物料移动类型和自动科目设置(包含财务,pp)
  7. ERP项目成败的三个因素
  8. 公积金买房有什么好处?
  9. 巧用参数组件和过滤组件,教你快速定位目标数据
  10. 欢迎来到“现实”世界,bilibili!