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..?

采纳的回答

Image Analyst
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 个评论
l.l.
l.l. 2014-10-16
编辑:l.l. 2014-10-16
I want to get for my image in LAB space an indexed image: A data matrix, X, and a colormap matrix, map. map is an m-by-3 array of class double containing floating-point values in the range [0, 1]. Each row of map specifies the L, *a, and *b components of a single color. So the color of each image pixel is determined by using the corresponding value of X as an index into map.
Image Analyst
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!

Translated by