how to reduce vertices of polygon keep the shape same as much as possible
Show older comments
i have tried both of these ways pchip(red) and Savitzky-Golay filter(blue) : for polygons.i have problem that the number of vertices of polygons are very high after reading boundaries from image .how can i reduce the number of vertices keeping the shape of the polygons same as much as possible.5 Comments
jahanzaib ahmad
on 2 May 2019
David Wilson
on 2 May 2019
One way is to use a compression algorithm such as Fan Data Compression which is a simple algorithm where you just continue in a straight line until the deviation exceeds a certain threshold, and then you start again.
jahanzaib ahmad
on 2 May 2019
jahanzaib ahmad
on 2 May 2019
Do Trung
on 15 Apr 2020
Thanks for your share. It's fantastic!
Accepted Answer
More Answers (1)
Lipi Vora
on 18 Dec 2019
1 vote
We now have "reducepoly" in MATLAB which can reduce the density of points in your polygon. Please see documentation:https://www.mathworks.com/help/images/ref/reducepoly.html
Categories
Find more on Detect, Extract, and Match Features in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!