Skip to main content

is_contour_convex

Function is_contour_convex 

Source
pub fn is_contour_convex(pts: &[(i32, i32)]) -> bool
Expand description

Whether a polygon is convex, matching OpenCV isContourConvex.

Like OpenCV, a consecutive collinear triple (cross product exactly zero) is treated as non-convex: the orientation flag is set to both signs at once, which forces a false result.