Indexed Images for Cielab Color Space
5 views (last 30 days)
Show older comments
Hi!
How can I build a function indexed image for other color spaces such as CIELAB? any help..?
0 Comments
Accepted Answer
Image Analyst
on 16 Oct 2014
I'm not sure what that means. You can convert a color RGB image into hsv with rgb2hsv()
hsvImage = rgb2hsv(rgbImage);
and into lab with makecform():
cform = makecform('srgb2lab');
labImage = applycform(rgbImage,cform);
Creating an indexed image doesn't make any sense. You'd have to create a grayscale image and then use the proper colormap, but why? Like my demo shows, you can create RGB images that are better.
See my attached demo.
2 Comments
Image Analyst
on 16 Oct 2014
What you're saying doesn't make sense. What you're describing - an integer image with a m-by-3 colormap array is simply a normal indexed image, in essence an integer image and a pseudocolor look up table to turn the gray scale image into a color image. The colormap is a gray-to-color lookup table. It makes no sense to have a gray-to-LAB lookup table. First of all, if it's starting as gray, there is no a and b values, by definition, and the L would just go from 0 to 100. If you want LAB you're going to have to start with an RGB image, not an integer (indexed) image. There is no colormap to give you what you want.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!