How can I grab the contour lines into a new figure ?
2 ビュー (過去 30 日間)
古いコメントを表示
I am using contour function to get the contour lines from an image. Now I'd pretend to get only the contour lines created before to make a new image.
I am using [C,h]=contour(a,[0 0]); I have C - ContourMatrix and h - handler.
How can I create a new image (only contour lines) with this C and h ??
Thanks in Advance Mike
0 件のコメント
採用された回答
Kelly Kearney
2013 年 6 月 7 日
a = peaks;
C = contourcs(a, [0 0]);
xy = {C.X; C.Y};
plot(xy{:});
9 件のコメント
Kelly Kearney
2013 年 6 月 11 日
Oops, forgot that one... imshow also flips the axis. Add 'ydir' to the list of properties to copy.
その他の回答 (1 件)
Angus
2013 年 6 月 7 日
"ContourMatrix is also a read-only contourgroup property that you can obtain from the returned handle." -- matlab docs
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!