Search code examples
matlabimage-processingcolorscolor-spacelab-color-space

How to convert L*a*b* to grayscale in matlab


I have already converted an RGB image into La*b* colorspace, but I want to convert it into gray scale. I'm not sure whether I can use rgb2gray or not.

Any idea?


Solution

  • The L channel of Lab colorspace is the grayscale part. Just use it as is. Using rgb2gray will not work as expected, since it expects that the three channels that you give to it as an input are from RGB colorspace.