How to remove other color line in graph ?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jenifer NG
le 10 Août 2022
Modifié(e) : Jenifer NG
le 16 Août 2022
Dear All,
I am going to find the way to remove other color line in a image
I try to use threshold but it is not working.
for example this figure bellow. I want to remove red line and keep blue line
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1092850/image.png)
Could anyone help me ?
Thank and Regard!
2 commentaires
Walter Roberson
le 16 Août 2022
Are you starting from an image, or are you starting from a current plot, or are you starting from a .fig file?
Réponse acceptée
Walter Roberson
le 16 Août 2022
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1092850/image.png';
rgb = imread(filename);
mask = rgb(:,:,1) > 128 & rgb(:,:,2) < 200;
newrgb = rgb;
newrgb(repmat(mask,1,1,3)) = 255;
imshow(rgb)
imshow(newrgb)
You might want to make some subtle cleanup.
1 commentaire
Plus de réponses (1)
Mandar
le 16 Août 2022
I understand that you want to remove one of the lines from the plot.
As a workaround, please use the 'Property Inspector' to delete the plots/lines. Refer to the link below to for more details.
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!