Skip to main content

approx_poly_dp

Function approx_poly_dp 

Source
pub fn approx_poly_dp(contour: &[(f32, f32)], epsilon: f32) -> Vec<(f32, f32)>
Expand description

Approximate a contour with fewer vertices (Ramer-Douglas-Peucker). Douglas-Peucker contour approximation.

Simplifies a polyline by recursively removing points within epsilon distance from the line segment connecting endpoints.