Ошибка при использовании pcfromkinect

Я использую устройство Kinect для XBOX 360. Я установил пакет поддержки kinectSDK v1.6 и kinect для Windows в MATLAB 2015b. Получение глубинных и цветных изображений осуществляется на отлично. Однако, когда я пытаюсь использовать функцию 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 для 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

2 ответа

Поскольку Kinect для Windows и Kinect для XBOX 360 являются двумя различными аппаратными средствами, функция pcfromkinect работает только с Kinect для Windows. Он не будет работать с игровой консолью Kinect для XBOX 360. Я работаю на той же линии, поэтому дайте мне знать, если вы получите результаты.

Эта функция и набор инструментов Image Acquisition не поддерживают датчик XBOX 360.

Смотрите поддерживаемое оборудование здесь.

Другие вопросы по тегам