How can I smooth a 2D boundary ?

14 ビュー (過去 30 日間)
Sleh Eddine Brika
Sleh Eddine Brika 2016 年 10 月 25 日
コメント済み: Image Analyst 2019 年 5 月 29 日
Hello, I have a N*2 matrix of x,y coordinates. I need to smooth the boundary. I tried with interp2 but I didn't get something nice.

採用された回答

Image Analyst
Image Analyst 2016 年 10 月 25 日
Lots of ways. One way is to use splines:
Another way is to use a Savitzky-Golay filter.
I'm attaching demos for each of these methods.
  4 件のコメント
Thiago Motta
Thiago Motta 2019 年 5 月 29 日
That would be regionProps
Image Analyst
Image Analyst 2019 年 5 月 29 日
mask = poly2mask(x, y, rows, columns);
props = regionprops(mask, 'Area', 'Perimeter');
props is a structure or structure array where each structure will have an Area field, and a Perimeter field.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by