How to convert red channel of a rgb image to grayscale image?

4 次查看(过去 30 天)
I have some rgb images. I want to know is there any way to only convert the red channel of them to grayscale?

采纳的回答

Image Analyst
Image Analyst 2018-5-25
Yes. Very easy:
redChannel = rgbImage(:, :, 1); % Extract the red channel only into a gray scale image.
  3 个评论
Image Analyst
Image Analyst 2018-5-25
That is a bad explanation and they should know better. When you extract the red channel, it is already a grayscale image at that point -- there is no need for a second step of converting it to a gray scale image.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modify Image Colors 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by