Hi sorry if this question has been asked before. I'm trying to view my images using the imshow command. I've tried a variety of input arguments (ex. adding additional parameters). I've also tried loading directly from a file, loading into a variable, and building my own image using the matrices in MatLab. Whenever I run imshow(image_name) nothing happens. No pop-up window, no error, nothing.
I'm using MatLab Version 9.7 and Image Processing Toolbox Version 11.0. I'm also on Windows.
Thanks in advance!

댓글 수: 4

if you use image() or imagesc() instead of imshow() do you get output?
What shows up for
which -all image
which -all imshow
William Rowe
William Rowe 2020년 6월 13일
No output for image() or imagesc().
Here's the results from running those commands.
>> which -all image
built-in (C:\Program Files\MATLAB\R2019b\toolbox\matlab\specgraph\image)
>> which -all imshow
C:\Program Files\MATLAB\R2019b\toolbox\matlab\images\imshow.m
Also the plot command similarly does not work, so I think it's just some setting I have incorrect or maybe I don't have the correct windows open. Currently I am able to see the Command Window pane and the Workspace pane. Is there something else I should have open?
Does this work?
clear all
close all
grayImage = imread('moon.tif');
imshow(grayImage);
William Rowe
William Rowe 2020년 6월 13일
Yes, that fixed it! @Image Analyst
Any idea what I was doing wrong? I don't think I shadowed the function, but not sure.

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2020년 6월 13일
편집: Image Analyst 2020년 6월 13일

0 개 추천

William:
You probably had defined image or imshow and forgotten about it. Perhaps a variable, perhaps an m-file name, perhaps a function - who knows. Calling
clear all
fixed it by "undefining" the definition you made. Glad I could help.
(And to all those other people who always yell at me
that there is never any reason to call clear all,
here's proof that it's sometimes useful.)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

릴리스

R2019b

태그

질문:

2020년 6월 13일

편집:

2020년 6월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by