How to get the x and y points of a contour?

2 ビュー (過去 30 日間)
scorpio 09
scorpio 09 2014 年 3 月 21 日
コメント済み: Image Analyst 2014 年 3 月 21 日
%this is the following code which creates a contour for the circle image %now i want the x and y points of that contour
  1. I = imread('circle.jpg');
  2. figure
  3. imshow(I)
  4. hold on;
  5. mask = false(size(I));
  6. mask(60:320,40:300) = true;
  7. Display the initial contour on the original image in blue.
  8. contour(mask,[0 0],'b');

回答 (1 件)

the cyclist
the cyclist 2014 年 3 月 21 日
"[C,h] = contour(...) returns a contour matrix, C, that contains the data that defines the contour lines, and a handle, h, to a contourgroup object. The clabel function uses contour matrix C to label the contour lines. ContourMatrix is also a read-only contourgroup property that you can obtain from the returned handle."
  1 件のコメント
Image Analyst
Image Analyst 2014 年 3 月 21 日
We can't run this. Just attach your m-file and image. Make it easy for us to help you, not hard!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by