Skip to main content

bounding_rect

Function bounding_rect 

Source
pub fn bounding_rect(contour: &[(usize, usize)]) -> (usize, usize, usize, usize)
Expand description

Compute the bounding rectangle of a contour. Computes the axis-aligned bounding rectangle of a contour.

Returns (x, y, width, height) where (x, y) is the top-left corner.