【发布时间】:2019-10-14 15:15:26
【问题描述】:
我在 MATLAB 中使用 Microsoft kinect v1,并希望获取以米为单位的每个像素的深度数据。
我不确定如何获取该数据,因为我正在获取 uint16,据我所知,它仅提供 13 位的深度,那么我如何获取这 13 位并进行一些转换以准确获取深度以米为单位。
我已经搜索了很多关于它但无法得出任何结论。
Kinectinfo = imaqhwinfo('kinect');
colorinfo = Kinectinfo.DeviceInfo(1);
depthinfo = Kinectinfo.DeviceInfo(2);
colorvid = videoinput('kinect',1);
depthvid = videoinput('kinect',2);
srcDepth = getselectedsource(depthvid);
% Set the frames per trigger for both devices to 1.
colorvid.FramesPerTrigger = 1;
depthvid.FramesPerTrigger = 1;
% Set the trigger repeat for both devices to 200, in order to acquire 201 frames from both the color sensor and the depth sensor.
colorvid.TriggerRepeat = 200;
depthvid.TriggerRepeat = 200;
%Configure the camera for manual triggering for both sensors.
triggerconfig([colorvid depthvid],'manual');
% Start both video objects.
start([colorvid depthvid]);
%Trigger the devices, then get the acquired data.
% Trigger 200 times to get the frames.
for i = 1:200
% Trigger both objects.
trigger([colorvid depthvid])
% Get the acquired frames and metadata.
[imgColor, ts_color, metaData_Color] = getdata(colorvid);
[imgDepth, ts_depth, metaData_Depth] = getdata(depthvid);
end
[NYU Depth and RGB image][1]
[Histogram of swaped Raw Depth image][2]
[Histogram of Raw Depth Image][3]
我想要一些用于转换的代码或任何在 matlab 中为我提供仪表的 SDK。
非常感谢。
【问题讨论】:
标签: matlab image-processing computer-vision kinect