필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
Ghazal Hnr
Ghazal Hnr 2018년 5월 25일
댓글: Ghazal Hnr 2018년 5월 25일
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.
Ghazal Hnr
Ghazal Hnr 2018년 5월 25일
Thank you for your response.

댓글을 달려면 로그인하십시오.

추가 답변 (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