gaoxw126
2009-04-07, 16:26
大家好,我在做毕业设计,用MATLAB实现一段avi视频中特定目标的目标跟踪。
源程序为:
clear all;
close all;
video_info=aviinfo('E:\matlab\work\cat_video.AVI');
video_data=aviread('E:\matlab\work\cat_video.AVI');
video_Compression=video_info.VideoCompression;
Image_Type=video_info.ImageType;
if (Image_Type~= 'indexed')
return;
end
imWidth=video_info.Width;
imHeight=video_info.Height;
imData=video_data(5).cdata;
imCmap=video_data(5).colormap;
new_im=imresize(imData,1.5,'bilinear');
im_RGB=ind2rgb(new_im,imCmap);
imwrite(im_RGB,'E:\matlab\work\cat_video.bmp');
出现错误如下:
??? Error using ==> ne
Matrix dimensions must agree.
Error in ==> g4 at 7
if (Image_Type~= 'indexed')
我刚刚接触MATLAB,在运行调试程序时出现上述错误,不知如何处理!
请各位帮着给看看吧!谢谢了!
源程序为:
clear all;
close all;
video_info=aviinfo('E:\matlab\work\cat_video.AVI');
video_data=aviread('E:\matlab\work\cat_video.AVI');
video_Compression=video_info.VideoCompression;
Image_Type=video_info.ImageType;
if (Image_Type~= 'indexed')
return;
end
imWidth=video_info.Width;
imHeight=video_info.Height;
imData=video_data(5).cdata;
imCmap=video_data(5).colormap;
new_im=imresize(imData,1.5,'bilinear');
im_RGB=ind2rgb(new_im,imCmap);
imwrite(im_RGB,'E:\matlab\work\cat_video.bmp');
出现错误如下:
??? Error using ==> ne
Matrix dimensions must agree.
Error in ==> g4 at 7
if (Image_Type~= 'indexed')
我刚刚接触MATLAB,在运行调试程序时出现上述错误,不知如何处理!
请各位帮着给看看吧!谢谢了!