colormap of a rgb image
4 views (last 30 days)
Show older comments
can anyone help with getting colormap of a image?
0 Comments
Accepted Answer
Walter Roberson
on 23 Jun 2012
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 Comments
Image Analyst
on 24 Jun 2012
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?
More Answers (0)
See Also
Categories
Find more on Red in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!