MATLAB: How to convert red channel of a rgb image to grayscale image

grayscale convertionimage processingImage Processing Toolboxrgb image

I have some rgb images. I want to know is there any way to only convert the red channel of them to grayscale?

Best Answer

Yes. Very easy:
redChannel = rgbImage(:, :, 1); % Extract the red channel only into a gray scale image.