我正在使用 Kinect for XBOX 360 设备。我在 MATLAB 2015b 中安装了 kinectSDK v1.6 和 kinect for windows支持包。深度和彩色图像的获取完美地进行。但是,当我尝试使用 pcfromkinect 函数时会出现以下错误:
No public property InputDepthMap exists for class videosource.
Error in imaq.internal.KinectColor2DepthMap
Error in vision.internal.visionKinectColorToSkeleton
Error in pcfromkinect (line 96)
vision.internal.visionKinectColorToSkeleton(depthDevice, depthImage, colorImage, isDepthCentric);
Error in kinect_image (line 22)
ptCloud = pcfromkinect(depthDevice,depthImage,colorImage);
此功能是否支持 Kinect for XBOX 360 设备?
我的程序的源代码如下:
clc;
clear;
close all;
try
% Create System objects for the Kinect device.
colorDevice = imaq.VideoDevice('kinect',1);
depthDevice = imaq.VideoDevice('kinect',2);
% Change the returned type of color image from single to unint8.
colorDevice.ReturnedDataType = 'uint8';
% Warm up the cameras.
step(colorDevice);
step(depthDevice);
% Load one frame from each device. The initial frame executes slowly because the objects must wake up the devices.
colorImage = step(colorDevice);
depthImage = step(depthDevice);
% Convert the depth image to a point cloud.
ptCloud = pcfromkinect(depthDevice,depthImage,colorImage);
% Align the color image with the depth image.
alignedColorImage = alignColorToDepth(depthImage,colorImage,depthDevice);
% Render the point cloud with color. The axis is set to better visualize the point cloud.
pcshow(xyzPoints,alignedColorImage,'VerticalAxis','y','VerticalAxisDir','down');
xlabel('X (m)');
ylabel('Y (m)');
zlabel('Z (m)');
% Release the System objects.
release(colorDevice);
release(depthDevice);
catch ME
% Release the System objects.
release(colorDevice);
release(depthDevice);
rethrow(ME);
end
答案 0 :(得分:1)
由于Kinect for Windows和Kinect for XBOX 360是两种不同的硬件,因此pcfromkinect功能仅适用于Kinect for Windows。它不适用于XCOX 360的游戏机Kinect。我正在同一条线上工作,所以让我知道你是否会得到结果。
答案 1 :(得分:0)
此功能和图像采集工具箱不支持XBOX 360传感器。