Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.
» Watch video
Peter Bone (view profile)
31 Jan 2014
04 Feb 2014)
Simplifies a closed polygon by reducing the number of vertices to a specified number
This file was selected as MATLAB Central Pick of the Week
Watch this File
Reduce the number of vertices in a closed polygon while maintaining the shape and detail as much as possible.
Unlike similar functions, this one will allow you to reduce to a specific number of vertices.
Didn't work without fixes:
demo line 21:
[C,h] = contour(BW, [0 1]);
reduce_poly.m add below line 78:
if len1len2 == 0
Perfect! Very useful.
Fixed error referencing non-existing variable.
Significant speed up.
Accelerating the pace of engineering and science
MathWorks is the leading developer of mathematical computing software for engineers and scientists.