栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

获取IntelRealSense d435i 相机内参

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

获取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调整。


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/513154.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号