필터 지우기
필터 지우기

Is it possible to create a colormap of an "image"?

조회 수: 1 (최근 30일)
Abarairenji
Abarairenji 2012년 7월 21일
Hello, Is it possible to create a colormap of a rgb image for using colorization other grayscale images with that image's colormap please?
Here is the code i've used. I was able to take colormap of the image but, it does not work for another images it colorizes other images just like a rainbow:
RGB = imread('image.jpg');
[X,map] = rgb2ind(RGB,65536);
figure, image(X), colormap(map)
axis off
axis image
alinancmap1 = get(gcf,'Colormap');
save('YeniColormap1','alinancmap1')
Thanks for your answers. Respectfully Yours, abarairenji

채택된 답변

Image Analyst
Image Analyst 2012년 7월 21일
No that won't work. There is no relation between the gray level and the color that objects should be in the color version of the image. A certain gray level could be any of millions of different colors, so if you just pick one arbitrarily (based on another image), of course it won't look right. You can color match two RGB image ( http://www.eyemaginary.com/Portfolio/ColorHistogramWarp.html) but you can't make all gray scale images in the world look like their original true color source image based on the color map of one RGB image.
  댓글 수: 1
Abarairenji
Abarairenji 2012년 7월 21일
I got it thanks. So we cannot take a colormap of a rgb image and use it for all other grayscale images

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by