mercredi 15 avril 2015

What is process to capture real time image in all process in same time via kinect ?

my matlab code is for image capturing



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


Problem of this code is that it is not capture real time image. There is huge difference between all type of image. How can I capture all type of image in same time ?


Aucun commentaire:

Enregistrer un commentaire