How to remove everything that is grey (127, 127, 127) from an image?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Oliver Lestrange
am 29 Dez. 2020
Kommentiert: Walter Roberson
am 29 Dez. 2020
Hi,
I want to remove everything with the rgb color (127, 127, 127) from an image. I am using
externalMask = planta.img(:,:,1)==127 & planta.img(:,:,2)==127 &...
planta.img(:,:,3)==127
to know where the grey pixels are.
I want to show the image and that the grey parts doesn't appear.
How can I do that?
Thanks in advance!
PS: I am using R2016a version.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 29 Dez. 2020
Bearbeitet: Walter Roberson
am 29 Dez. 2020
mask = all(planta.img == 127, 3);
image(planta.img, 'AlphaData', 1-mask)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Display Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!