Get Baseline和转换外参 (extrinsics)

Get Disparity Baseline:

Config cfg = new Config();
cfg.EnableStream(Stream.Infrared, 1);
cfg.EnableStream(Stream.Infrared, 2);
var pipe = new Pipeline();
PipelineProfile selection = pipe.Start();
var ir1_stream = selection.GetStream(Stream.Infrared, 0);
var ir2_stream = selection.GetStream(Stream.Infrared, 1);
Extrinsics e = ir1_stream.GetExtrinsicsTo(ir2_stream);
var baseline = e.translation[0];

以下可通过官方自带例子sensor-control获得:
红外双目的baseline: 0.0551204m
红外相机2(Infrared #2)到红外相机1(Infrared #1)0的转换外参 (extrinsics):
Translation Vector : [0.0551204,0,0]
Rotation Matrix : [1,0,0]
: [0,1,0]
: [0,0,1]
红外相机1到彩色相机的转换外参 (extrinsics):
Translation Vector : [0.0151751,-4.23435e-05,-0.000446917]
Rotation Matrix : [0.999964,0.00120481,0.00837446]
: [-0.00121877,0.999998,0.00166292]
: [-0.00837244,-0.00167306,0.999964]
深度图depth 0到彩色图color 0的转换外参 (extrinsics):
Translation Vector : [0.0151751,-4.23435e-05,-0.000446917]
Rotation Matrix : [0.999964,0.00120481,0.00837446]
: [-0.00121877,0.999998,0.00166292]
: [-0.00837244,-0.00167306,0.999964]
红外相机1(Infrared #1)到深度图depth 0的转换外参 (extrinsics):
Translation Vector : [0,0,0]
Rotation Matrix : [1,0,0]
: [0,1,0]
: [0,0,1]
红外相机2(Infrared #2)到深度图depth 0的转换外参 (extrinsics):
Translation Vector : [0.0551204,0,0]
Rotation Matrix : [1,0,0]
: [0,1,0]
: [0,0,1]
Get Video Stream Intrinsics:

var pipe = new Pipeline();
PipelineProfile selection = pipe.Start();
var depth_stream = selection.GetStream(Stream.Depth);
Intrinsics i = depth_stream.GetIntrinsics();

Controlling the Laser:

var pipe = new Pipeline();
PipelineProfile selection = pipe.Start();
var selected_device = selection.Device;
var depth_sensor = selected_device.Sensors[0];

if (depth_sensor.Options.Supports(Option.EmitterEnabled))
{
depth_sensor.Options[Option.EmitterEnabled].Value = 1f; // Enable emitter
depth_sensor.Options[Option.EmitterEnabled].Value = 0f; // Disable emitter
}
if (depth_sensor.Options.Supports(Option.LaserPower))
{
var laserPower = depth_sensor.Options[Option.LaserPower];
laserPower.Value = laserPower.Max; // Set max power
laserPower.Value = 0f; // Disable laser
}

Get Field of View:

var pipe = new Pipeline();
PipelineProfile selection = pipe.Start();
var depth_stream = selection.GetStream(Stream.Depth);
Intrinsics i = depth_stream.GetIntrinsics();
float[] fov = i.FOV; // float[2] - horizontal and vertical field of view in degrees

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值