colormap of a rgb image

4 次查看(过去 30 天)
can anyone help with getting colormap of a image?

采纳的回答

Walter Roberson
Walter Roberson 2012-6-23
The colormap of an RGB image is, by convention, [] (the empty array)
If you need to convert an RGB image to a pseudocolor image, use the two-output version of rgb2ind()
  2 个评论
Anshul garg
Anshul garg 2012-6-24
i agree with you but if i want to change the gray image to same rgb image(after using rgb2gray())then i would need colormap .so where would i bring that from?
Image Analyst
Image Analyst 2012-6-24
You can't do that. With rgb2gray, there are many colors that would give the same gray level. you'd need to do this with rgb2ind which gives you the colormap. But then if you displayed that with a gray colormap, it would look bizarre so you'd have to keep both the rgb2gray image hanging around as well as the rgb2ind image hanging around. I say why even bother with all that when you still have the original rgb image that you used to convert into gray or indexed?

请先登录,再进行评论。

更多回答(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