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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章