How do you plot a line on a function defined by colors?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (3 件)
Voss
2023 年 10 月 19 日
img = imread('image.png');
imagesc(img)
hold on
contour(mean(img,3),'k')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Blue についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!