MATLAB: How to convert rgb to Lab and display only a* layer with matlab

Image Processing Toolboxrgb to lab

I want to get a* layer to continue processing.

Best Answer

Perhaps the easiest way would be to use the function rgb2lab() in matlab. Note that you will need the Image Processing Toolbox.
Lab = rgb2lab(rgb);
a = Lab(:,:,2);
I hope that helps you get started.