Error using ==> imageDisplayValidateParams>validateCData at 114
Unsupported dimension
Error in ==> imageDisplayValidateParams at 31
common_args.CData = validateCData(common_args.CData,image_type);
Error in ==> imageDisplayParseInputs at 79
common_args = imageDisplayValidateParams(common_args);
Error in ==> imshow
Matlab遇到这种情况一般是图片维度不对,往往图片在workspace中是四维的。
解决办法如下:
I=imread(‘p.tif‘);
a=I(:,:,1);
b=I(:,:,2);
c=I(:,:,3);
rgb=cat(3,a,b,c);
imshow(rgb);
时间: 2024-10-27 19:40:37