function RamerDouglasPeucker(const path: TPathD; epsilon: double): TPathD; overload;
function RamerDouglasPeucker(const path: TPathsD; epsilon: double): TPathsD; overload;
A line simplification algorithm that removes extraneous vertices.
The algorithm recursively finds the vertex between line endpoints that's furthest from the virtual segment joining these endpoints, If this vertex is within a predefined (epsilon) distance, then all vertices between endpoints will be removed. Otherwise the line is divided into two at this vertex and the process is repeated. See Wikipedia
Simplification is especially useful when vectorizing raster images and this function is demonstrated in the VectorizeImage example.
Copyright ©2019 Angus Johnson - Image32 ver. 4.0 - Documentation last updated on 20-January-2022