Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-03-31
年龄: 39
帖子: 3
声望力: 0 ![]() |
![]()
大家好,我在做毕业设计,用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,在运行调试程序时出现上述错误,不知如何处理! 请各位帮着给看看吧!谢谢了! |
![]() |
![]() |