필터 지우기
필터 지우기

Why do I get an image in grey scale after imread the gif image?

조회 수: 2 (최근 30일)
Anqi Li
Anqi Li 2014년 7월 10일
댓글: Image Analyst 2014년 7월 11일
My original image is with colour. I read the image file and display it, then I got a grey scale image. Does anyone know how I can load the image without change the colour scale? My code is like this: clear; close all;
I = imread('abc.gif')
figure, imshow(I);

답변 (1개)

Image Analyst
Image Analyst 2014년 7월 10일
Don't name it I - that's a bad name - hard to tell the difference between I (upper case i), and l (lower case L), and 1. Plus it's not very descriptive.
Try this
[indexedImage, colorMap] = imread('abc.gif');
imshow(indexedImage);
colormap(colorMap);
colorbar;
  댓글 수: 8
Image Analyst
Image Analyst 2014년 7월 11일
You have it displayed 3 times. Each figure is using a different colormap.
Image Analyst
Image Analyst 2014년 7월 11일
Do you still not understand and need more explanation?

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

카테고리

Help CenterFile Exchange에서 Blue에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by