Grayscale of RGB channels
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is it possible to convert the matrix values of R, G and B channels to its own grayscale values respectively?
3 comentarios
Adam
el 18 de Jul. de 2017
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.
Respuesta aceptada
Jan
el 18 de Jul. de 2017
Editada: Jan
el 18 de Jul. de 2017
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Modify Image Colors en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!