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!