How to convert red channel of a rgb image to grayscale image?
조회 수: 7 (최근 30일)
이전 댓글 표시
I have some rgb images. I want to know is there any way to only convert the red channel of them to grayscale?
댓글 수: 0
채택된 답변
Image Analyst
2018년 5월 25일
Yes. Very easy:
redChannel = rgbImage(:, :, 1); % Extract the red channel only into a gray scale image.
댓글 수: 3
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 Center 및 File Exchange에서 Modify Image Colors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!