File Exchange

image thumbnail

Polygon simplification

version 1.2 (9.76 KB) by

Simplifies a closed polygon by reducing the number of vertices to a specified number

3.33333
3 Ratings

13 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

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.

Comments and Ratings (4)

KIRTI K

it didn't worked for me :( i have an png image of 966x1296 resolution

Maria Moon

Adam

Adam (view profile)

Didn't work without fixes:
demo line 21:
[C,h] = contour(BW, [0 1]);

reduce_poly.m add below line 78:
if len1len2 == 0
a=0;
return;
end

Matthias

Perfect! Very useful.

Updates

1.2

Significant speed up.

1.1

Fixed error referencing non-existing variable.

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today