Reputation: 87
I wanted to display rgb image on matlab.
image= imread('seker.bmp');
imshow(image);
I wrote this lines but it is not working. Why?
Upvotes: 1
Views: 184
Reputation: 91
According to the MatLAB documentation, you can use Image(var)
If you want to use imshow
, you should assign an index and a matrice of color.
https://www.mathworks.com/help/matlab/ref/imread.html
Upvotes: 1
Reputation: 35525
It is plausible that you have an "indexed image", as sometimes bmp's are stored as. These instead of color values, store an index from 1 to max(colors) and then a colormap for the colors themselves.
Try:
[im,map]= imread('seker.bmp');
imshow(im,map);
Upvotes: 2