How do you plot a line on a function defined by colors?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I want to plot a line on a color defined function (enclosed example below), such that the line follows the boarders between colors. I don't want to plot a line that roughly follows the color boarders but follows the boarder exactly based on the change in color. However, I am unsure how to acomplish this. Any help appreciated.
Example:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1515134/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1515139/image.png)
3 Commenti
Risposte (3)
Voss
il 19 Ott 2023
img = imread('image.png');
imagesc(img)
hold on
contour(mean(img,3),'k')
0 Commenti
Vedere anche
Categorie
Scopri di più su Blue in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!