How can I smooth a 2D boundary ?
23 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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 个评论
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!