How to convert the green pixels to white?
Ältere Kommentare anzeigen
I have this image labelled dark green(In the image attached). I want to turn all of the pixels that are not black to white. How do i do that?
1 Kommentar
Walter Roberson
am 20 Mär. 2016
No image was attached
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 21 Mär. 2016
0 Stimmen
I hve several color segmentation demos in my File Exchange. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Adapt one of them to find pixels that you consider to be of a roughly or exactly "green" color. This will give you a mask of what pixels are green.
If you really want to "I want to turn all of the pixels that are not black to white." then it really doesn't matter if they're green or purple or yellow or any other color to start with, does it? In that case, use Walter's code to turn non-pure-black pixels to white.
4 Kommentare
charuleelaa vanilavarasu
am 21 Mär. 2016
Image Analyst
am 21 Mär. 2016
How are they detected? Just set those pixels to 255. I guess I don't/can't understand your difficulty until I see in what forms you have your RGB image and your segmented image.
charuleelaa vanilavarasu
am 21 Mär. 2016
Bearbeitet: Walter Roberson
am 21 Mär. 2016
Image Analyst
am 21 Mär. 2016
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!