How can I simplify the polygon?
2 次查看(过去 30 天)
显示 更早的评论
The polygon above is got after I shrank a rectangle. However, The meaningless branches are not desired. How can I remove them and split it into polygons that are independent to each other?
2 个评论
回答(1 个)
Ahmet Cecen
2018-4-27
Well purely speculating, assuming you have a binary image with those lines:
FilledPolygons = imfill(PolygonImage,'holes');
OnlyPolygonsFilled = FilledPolygons - PolygonImage;
OnlyPolygonEdges = edge(OnlyPolygonsFilled);
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Elementary Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!