![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175610/image.png)
I want find only red pixels which are greater than threshold. and set those redpixels values to 1 others to 0
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want find only red pixels which are greater than threshold. and set those redpixels values to 1 others to 0 to create a new matrix.
R>th then how to create a new matrix with 1 and 0's.I am a beginner to matlab
0 commentaires
Réponses (1)
Image Analyst
le 21 Nov 2016
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175610/image.png)
2 commentaires
Stelios Fanourakis
le 7 Jan 2019
Image Analyst in case you are able to see this comment. I tried your SimpleColorDetection demo. I finally get the red contour of my image. But it gives the red contour into a black background. I want to plot the pixel values inside this contour area. Any idea of how to do that?
Image Analyst
le 7 Jan 2019
How did you get the red line there? Did you plot it there? Or you just got this image from somewhere with the red line already in it? Please post this in a separate question (not here in senthil's question), and I'll solve it for you. What you are asking is really very easy. Just get a mask for the red line, use poly2mask(), and then plot the pixel values (whatever that means - you'll have to explain that some more).
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!