什么是通过kinect在同一时间捕获所有过程中的实时图像的过程?

时间:2015-04-15 08:58:40

标签: image matlab kinect depth

我的matlab代码用于图像捕获

Infrared=videoinput('kinect',1,'Infrared_640x480');
RGB=videoinput('kinect',1,'RGB_640x480');
RawBayer=videoinput('kinect',1,'RawBayer_640x480');
RawYUV=videoinput('kinect',1,'RawYUV_640x480');
YUV=videoinput('kinect',1,'YUV_640x480');
Depth=videoinput('kinect',2,'Depth_640x480');
for k = 1:1000
    ImageInfrared=getsnapshot(Infrared);
    ImageRGB=getsnapshot(RGB);
    ImageRawBayer=getsnapshot(RawBayer);
    ImageRawYUV=getsnapshot(RawYUV);
    ImageYUV=getsnapshot(YUV);
    ImageDepth=getsnapshot(Depth);


    ImageInfrared=im2double(ImageInfrared);
    ImageRGB=im2double(ImageRGB);
    ImageRawBayer=im2double(ImageRawBayer);
    ImageRawYUV=im2double(ImageRawYUV);
    ImageYUV=im2double(ImageYUV);
    ImageDepth=im2double(ImageDepth);
    fileImageInfrared='C:\Users\shimul\Desktop\text viseo\ImageInfrared\';
    fileImageRGB='C:\Users\shimul\Desktop\text viseo\ImageRGB\';
    fileImageRawBayer='C:\Users\shimul\Desktop\text viseo\ImageRawBayer\';
    fileImageRawYUV='C:\Users\shimul\Desktop\text viseo\ImageRawYUV\';
    fileImageYUV='C:\Users\shimul\Desktop\text viseo\ImageYUV\';
    fileImageDepth='C:\Users\shimul\Desktop\text viseo\ImageDepth\';

    s=num2str(k);

    impath=strcat(fileImageInfrared,s,'.jpg');
        imwrite(ImageInfrared,impath);
    impath=strcat(fileImageRGB,s,'.jpg');
        imwrite(ImageRGB,impath);
    impath=strcat(fileImageRawBayer,s,'.jpg');
        imwrite(ImageRawBayer,impath);
    impath=strcat(fileImageRawYUV,s,'.jpg');
        imwrite(ImageRawYUV,impath);
    impath=strcat(fileImageYUV,s,'.jpg');
        imwrite(ImageYUV,impath);
    impath=strcat(fileImageDepth,s,'.jpg');
        imwrite(ImageDepth,impath);
end

此代码的问题在于它不是捕获实时图像。所有类型的图像之间存在巨大差异。如何同时捕获所有类型的图像?

0 个答案:

没有答案