image thumbnail

Line Simplification

version 1.4.0.0 (6.03 KB) by Wolfgang Schwanghart
Recursive Douglas-Peucker Polyline Simplification (Iterative Endpoint Fit)

7.7K Downloads

Updated13 Jul 2010

View License

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

dpsimplify使用递归Douglas-Peucker线simplification algorithm to reduce the number of vertices in a polyline according to a specified tolerance. The algorithm is also know as Iterative Endpoint Fit algorithm. dpsimplify can handle polylines and polygones in 2d and higher dimensions.

The submission now contains another m-file (dpsimplify_octave.m) that has been slightly modified to run with GNU Octave.

Syntax:

[ps,ix] = dpsimplify(p,tol)

where p is a nxm matrix that contains n vertices in m dimensions.

For additional information on the algorithm follow this link
http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm

Cite As

Wolfgang Schwanghart (2022).Line Simplification(//www.tianjin-qmedu.com/matlabcentral/fileexchange/21132-line-simplification), MATLAB Central File Exchange. Retrieved.

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!