필터 지우기
필터 지우기

How can I smooth a 2D boundary ?

조회 수: 24 (최근 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 CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by