why won't imshow display an image?
2 次查看(过去 30 天)
显示 更早的评论
In following a demonstration I typed
>> I=imread('pout.tif');
>> imshow(I)
To which MATLAB (my version is R2014a) responded:
Attempt to call constructor image with incorrect letter case.
Error in basicImageDisplay (line 24)
hh = image(cdata, ...
Error in imshow (line 266)
hh = basicImageDisplay(fig_handle,ax_handle,...
I have tried nothing and it still won't work! Does anyone know how I can appease MATLAB?
0 个评论
回答(1 个)
Image Analyst
2015-9-13
Run this code:
% Check that user has the Image Processing Toolbox installed.
hasIPT = license('test', 'image_toolbox');
if ~hasIPT
% User does not have the toolbox installed.
message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?');
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return;
end
end
See if it tells you that you don't have the Image Processing Toolbox. I believe imshow() wasn't added to base MATLAB until after the version you have.
2 个评论
Image Analyst
2015-9-13
Yes you did something wrong. My code does not even call the function "image()". Anyway, that is just a warning and the code should still run, or produce an actual error message.
What does this say:
>> which -all image
You may have your own function called image.m. If you do, you should rename it because it's trying to use that instead of the built-in function.
Otherwise, you should call technical support. They are always willing to help you get a trial toolbox to work.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!