命令:~$ rs-sensor-control

======================================================Found the following devices:0 : Intel RealSense D435 #817612070563

然后选择 0

Select a device by index: 0Device information: Name                 : Intel RealSense D435Serial Number        : 817612070563Firmware Version     : 05.10.06.00Recommended Firmware Version : 05.10.03.00Physical Port        : /sys/devices/pci0000:00/0000:00:14.0/usb2/2-8/2-8:1.0/video4linux/video0Debug Op Code        : 15Advanced Mode        : YESProduct Id           : 0B07Camera Locked        : N/AUsb Type Descriptor  : 3.2======================================================Device consists of 2 sensors:0 : Stereo Module1 : RGB CameraSelect a sensor by index:

然后比如选择1
Select a sensor by index: 1

======================================================What would you like to do with the sensor?0 : Control sensor's options
1 : Control sensor's streams
2 : Show stream intrinsics
3 : Display extrinsicsSelect an action:

注意第二项,这个就是内参的内容了。选择2

======================================================Sensor consists of 1 streams: - Color #0
Sensor provides the following stream profiles:
0  : Color #0 (Video Stream: RGB8 1920x1080@ 30Hz)
1  : Color #0 (Video Stream: RAW16 1920x1080@ 30Hz)
2  : Color #0 (Video Stream: Y16 1920x1080@ 30Hz)
3  : Color #0 (Video Stream: BGRA8 1920x1080@ 30Hz)
4  : Color #0 (Video Stream: RGBA8 1920x1080@ 30Hz)
5  : Color #0 (Video Stream: BGR8 1920x1080@ 30Hz)
6  : Color #0 (Video Stream: YUYV 1920x1080@ 30Hz)
... ...  Please select the desired streaming profile:

所有流都在这里了,比如,选择0

Please select the desired streaming profile: 0Principal Point         : 966.617, 532.934
Focal Length            : 1395.12, 1395.28
Distortion Model        : Brown Conrady
Distortion Coefficients : [0,0,0,0,0]

相机的内参矩阵是

K = fx      s       x00     fy      y00     0       1

fx,fy为焦距,一般情况下,二者相等。
x0,y0为主坐标(相对于成像平面)。
s为坐标轴倾斜参数,理想情况下为0。

python pipeline

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.rgb8, 30)
pipeline.start(config)time.sleep(1)
frames = pipeline.wait_for_frames()
# time.sleep(3)
depth_frame = frames.get_depth_frame()
color_frame = frames.get_color_frame()# Convert images to numpy arrays
depth_image = np.asanyarray(depth_frame.get_data())
color_image = np.asanyarray(color_frame.get_data())# # Apply colormap on depth image (image must be converted to 8-bit per pixel first)
# depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, alpha=0.03), cv2.COLORMAP_JET)
#
# # Stack both images horizontally
# images = np.hstack((color_image, depth_colormap))
#
# # Show images
# cv2.namedWindow('RealSense', cv2.WINDOW_AUTOSIZE)
# cv2.imshow('RealSense', images)
# cv2.waitKey(1)fig, axes = plt.subplots(1, 2)
for ax, im in zip(axes, [color_image, depth_image]):ax.imshow(im)ax.axis('off')
plt.show()
pipeline.stop()

在此网页中介绍了各个相机内参分别是什么(fx,fy,ppx,ppy等)
在此网页中给出了通过python script获取内参的方法
python script: get intrinsic

import pyrealsense2 as rs
pipeline = 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.rgb8, 30)
cfg = pipeline.start(config)
time.sleep(1)
profile = cfg.get_stream(rs.stream.depth)
intr = profile.as_video_stream_profile().get_intrinsics()
print(intr)  # 获取内参 width: 640, height: 480, ppx: 319.115, ppy: 234.382, fx: 597.267, fy: 597.267, model: Brown Conrady, coeffs: [0, 0, 0, 0, 0]
319.1151428222656
print(intr.ppx)  # 获取指定某个内参注意!!!通过python script获取内参一定要看好自己到底用了哪个video stream, 不要无脑复制代码

realsense相机内参如何获得+python pipeline+如何通过python script获取realsense相机内参(windows下可用)相关推荐

  1. 在python中requests模块怎么安装_Python requests模块在Windows下安装

    发现一个爬虫库太方便了,而且支持python3! 安装方法在http://docs.python-requests.org/en/latest/user/install/#install很详细 只不过 ...

  2. python中使用ffmpeg合并音频与视频_ffmpeg 在windows 下的安装和使用(python, 合并音频和视频)...

    参考: windows下ffmpeg的安装与python调用   https://blog.csdn.net/chunjiekid/article/details/88205824 1. 下载 ffm ...

  3. python 发送微信语音消息_全网最全的Windows下Anaconda2 / Anaconda3里Python语言实现定时发送微信消息给好友或群里(图文详解)...

    不多说,直接上干货! 缘由: (1)最近看到情侣零点送祝福,感觉还是很浪漫的事情,相信有很多人熬夜为了给爱的人送上零点祝福,但是有时等着等着就睡着了或者时间并不是卡的那么准就有点强迫症了,这是也许程序 ...

  4. python调用库实现返回ping的时延_python在windows下实现ping操作并接收返回信息

    python 执行ping 返回成功与否你自己不将自己想在心里,倒也没关系,有我将你摆在心里就够了. 需分享python实时返回ping回包,怎么写我宁愿两个人的自尊一起摔的四分五裂,一起同归于尽,我 ...

  5. python提取微信聊天语音_GitHub - dennischancs/wechat-asr: 微信语音批量转文字 python编写 用百度智能云短语音识别API实现 windows下的使用...

    WeChat-ASR 微信语音批量转文字 调用百度智能云短语音识别API 目前仅支持安卓手机+Windows 简介 最近线上办公,很多小会议或者讲座等也在微信群里,有时需要记录保存会议讲话内容,也可能 ...

  6. python scrapy框架爬取豆瓣top250电影篇一Windows下建立Scrapy项目,pycharm编辑

    1.打开cmd,进入到项目准备所放在的文件夹,执行命令: scrapy startproject douban 然后就可以使用pycharm打开项目了 2.建立spider文件 cmd命令行进入到项目 ...

  7. 获取realsense内参

    文章目录 1.无畸变 2.Brown-Conrady 畸变模型 3. Opencv 里畸变图像矫正过程 1.无畸变 相机内参包括相机矩阵参数和畸变系数. 相机内参矩阵为3*3的矩阵:M = [fx 0 ...

  8. Intel Realsense D435 如何获取摄像头的内参?get_profile() video_stream_profile() get_intrinsics()

    # 获取摄像头的内参是为了将像素坐标转化成实际坐标 import pyrealsense2 as rspipeline = rs.pipeline() config = rs.config() con ...

  9. 计算相机投影矩阵(含代码)(Python)

    计算相机投影矩阵(含代码)(Python) 前几天处理点云时,需要使用到像片与3D点云的对应关系.在这边找了一圈没有发现直接可用的代码,于是去GitHub试了一下,以下是一个提炼后的矩阵计算代码. 下 ...

最新文章

  1. 从零开始一起学习SLAM | 不推公式,如何真正理解对极约束?
  2. linux里那些依赖包
  3. 透过源码详解Spring Security 初始化流程
  4. monodroid发布的最新版本
  5. Android应用程序消息处理机制(Looper、Handler)分析(1)
  6. PKCS5Padding与PKCS7Padding的区别
  7. css expression
  8. Tcpdump抓包工具的使用
  9. 自创小插件让emacs支持工程项目
  10. 设计模式 - 单例模式(Singleton Pattern)
  11. ImportError: libnvinfer.so.7: cannot open shared object file: No such file or directory
  12. 多线程 wait-notify 写一段代码来解决生产者-消费者问题
  13. 学术 | 如何写一篇合格的NLP论文
  14. 中建股份400亿大型IPO获“特批”
  15. 使用uiautomatorviewer.bat抓取页面是显示Error obtaining Ul hierarchy Reason
  16. mysql_wp_replication_tutorial
  17. stack.peek
  18. 音乐学院排名计算机音乐,中国九大音乐学院排名
  19. 《用微信测试公众号慰问你的好兄弟/姐妹》:用java简单实现微信公众号消息推送(入门且详细且有效)
  20. 杀人 真心话大冒险 起底

热门文章

  1. kafka2.2源码分析之Log日志存储
  2. 一款简洁实用电脑屏幕录制工具
  3. 基于超宽带雷达获取呼吸心率的方法总结
  4. 海量数据集利用Minhash寻找相似的集合【推荐优化】
  5. [HDU 6203] ping ping ping
  6. 希望VS.NET 2005能提供48x48的图标
  7. ART对象内存分配过程解析(上)——内存分配的准备阶段(Android 8.1)
  8. Selenium笔记(一)selenium简介、安装
  9. 嵌入式Linux应用程序开发视频教程-曹国辉-专题视频课程
  10. 洛谷1594 护卫队 (st算法)