Matlab Imshow command does not show the same binary image with original
7 次查看(过去 30 天)
显示 更早的评论
I read the image with:
W=double(imread('rose32.bmp'));
Then: imshow(W,[]); or imshow(W);
But, Showed image seems to invert of original image. How Can I solve this problem ? It is a Matlab problem ?

0 个评论
采纳的回答
Walter Roberson
2015-12-14
You are treating the image as if it is a binary or RGB image, but it is not: it is an index (pseudocolor) image. You can see this by using
iminfo('rose32.bmp')
and noticing the "ColorType: 'indexed'"
A proper way to display it:
[W,cmap]=imread('rose32.bmp');
image(ind2rgb(W,cmap))
4 个评论
Walter Roberson
2015-12-15
If the Colormap shows up as nonempty then it is a pseudo color image not a grayscale image. .gif are mostly pseudo color.
更多回答(0 个)
另请参阅
类别
在 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!