How to convert red channel of a rgb image to grayscale image?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ghazal Hnr
le 25 Mai 2018
Commenté : Ghazal Hnr
le 25 Mai 2018
I have some rgb images. I want to know is there any way to only convert the red channel of them to grayscale?
0 commentaires
Réponse acceptée
Image Analyst
le 25 Mai 2018
Yes. Very easy:
redChannel = rgbImage(:, :, 1); % Extract the red channel only into a gray scale image.
3 commentaires
Image Analyst
le 25 Mai 2018
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Modify Image Colors dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!