How can I solve that imshow don't show image ?
18 views (last 30 days)
Show older comments
I just find out that imshow shows nothing in my Matlab. I used imwrite to save the same data as .jpg, then check it by opening it in the folder, the result is correct. What happened to imshow and how to fix it?
6 Comments
Jan
on 9 Feb 2018
@Cody: It need not be imshow directly, but it can matter all other functions, which are called from imshow.
Answers (1)
Image Analyst
on 9 Feb 2018
Like Jan said, you're probably overwriting a function in one of your scripts. I believe imshow() calls image() internally, and lots of beginners call their image variable "image" which might prevent imshow from working because it will try to use your variable rather than the function.
Like Geoff said, attach your if you need more help.
6 Comments
Arusha cse
on 6 Jun 2020
Hi, have you found a solution to this? I am facing the same issue and my functions are not shadowed.
Image Analyst
on 6 Jun 2020
Arusha, start your own question but only after you read this link so we don't waste time going back and forth to get all the info we need to solve your situation. For example, here you dodn't show any error messages or screenshots of what your call to imshow() actually shows. Maybe you have a floating point image outside the range of 0-1 and it's just all black or white because you forgot to use [] when you called imshow.
imshow(doubleImage, []);
I have no idea because you didn't give us enough information to help you. You only asked Cody who hasn't been seen here in over 2 years.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!