[−][src]Function opencv::imgproc::approx_poly_dp
pub fn approx_poly_dp(
curve: &dyn ToInputArray,
approx_curve: &mut dyn ToOutputArray,
epsilon: f64,
closed: bool
) -> Result<()>
Approximates a polygonal curve(s) with the specified precision.
The function cv::approxPolyDP approximates a curve or a polygon with another curve/polygon with less vertices so that the distance between them is less or equal to the specified precision. It uses the Douglas-Peucker algorithm http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
Parameters
- curve: Input vector of a 2D point stored in std::vector or Mat
- approxCurve: Result of the approximation. The type should match the type of the input curve.
- epsilon: Parameter specifying the approximation accuracy. This is the maximum distance between the original curve and its approximation.
- closed: If true, the approximated curve is closed (its first and last vertices are connected). Otherwise, it is not closed.