Matlab Imshow command does not show the same binary image with original

7 Ansichten (letzte 30 Tage)
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 ?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 14 Dez. 2015
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 Kommentare
Mevlut Dogru
Mevlut Dogru am 15 Dez. 2015
for Gri Level image imfinfo('Lena.gif') command shows "ColorType: 'indexed'" is it true ?
Walter Roberson
Walter Roberson am 15 Dez. 2015
If the Colormap shows up as nonempty then it is a pseudo color image not a grayscale image. .gif are mostly pseudo color.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by