获取IntelRealSense d435i 相机内参

获取IntelRealSense d435i 相机内参,第1张

获取IntelRealSense d435i 相机内参

获取IntelRealSense d435i 相机内参
  • 摘要
  • 实现

摘要

本文提供了一种获取IntelRealSense d435i相机内参的方法。

实现
#include 
#include 

using namespace std;
using namespace rs2;

int main()
{
	pipeline pipe;
	frameset frames;
	config cfg;

	//cfg.enable_stream(RS2_STREAM_DEPTH, 640, 480, RS2_FORMAT_Z16, 30);
	cfg.enable_stream(RS2_STREAM_COLOR, 640, 480, RS2_FORMAT_BGR8, 30);
	
	pipe.start(cfg);
	for (int i = 1; i < 20; i++)pipe.wait_for_frames();
	frames = pipe.wait_for_frames();

	auto color= frames.get_color_frame();
	//auto depth = frames.get_depth_frame();

	stream_profile color_profile = color.get_profile();
	//stream_profile depth_profile = depth.get_profile();
	
	auto rvsprofile = video_stream_profile(color_profile);
	//auto dvsprofile = video_stream_profile(depth_profile);
	
	rs2_intrinsics a = rvsprofile.get_intrinsics();
	//rs2_intrinsics a = dvsprofile.get_intrinsics();
	
	cout << "fx:t" << a.fx << endl;
	cout << "fy:t" << a.fy << endl;
	cout << "ppx:t" << a.ppx << endl;
	cout << "ppy:t" << a.ppy << endl;
	return 0;
}

提示1:代码时之前找到之后改的,但是现在找不到原链接了,这里只是记录一下,如果侵权请联系我删除。

提示2:不同分辨率和传感器可以通过cfg调整。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5504216.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-13
下一篇 2022-12-13

发表评论

登录后才能评论

评论列表(0条)

保存