필터 지우기
필터 지우기

Grayscale of RGB channels

조회 수: 2 (최근 30일)
SNEHA P S
SNEHA P S 2017년 7월 13일
편집: Jan 2017년 7월 18일
Is it possible to convert the matrix values of R, G and B channels to its own grayscale values respectively?
  댓글 수: 3
SNEHA P S
SNEHA P S 2017년 7월 18일
Am not sure that whether the R G and B matrices itself display grayscales ?
Adam
Adam 2017년 7월 18일
Each of the R, G and B channels can already be considered greyscale by itself. Whether it is useful to do so or not is another matter, but you haven't given any information so it's impossible to say.

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

채택된 답변

Jan
Jan 2017년 7월 18일
편집: Jan 2017년 7월 18일
RGB = rand(100, 100, 3); % RGB array
R = RGB(:, :, 1); % Gray image of the red channel
G = RGB(:, :, 2); % Gray image of the green channel
B = RGB(:, :, 3); % Gray image of the blue channel
figure
image(R)
figure
image(cat(3, R, R, R))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by