Indexed Images for Cielab Color Space
1 次查看(过去 30 天)
显示 更早的评论
Hi!
How can I build a function indexed image for other color spaces such as CIELAB? any help..?
0 个评论
采纳的回答
Image Analyst
2014-10-16
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 个评论
Image Analyst
2014-10-16
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!