[][src]Function opencv::imgproc::bounding_rect

pub fn bounding_rect(array: &dyn ToInputArray) -> Result<Rect>

Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.

The function calculates and returns the minimal up-right bounding rectangle for the specified point set or non-zero pixels of gray-scale image.

Parameters

  • array: Input gray-scale image or 2D point set, stored in std::vector or Mat.