Skip to content

boundingRect

geometryfunctionOpenCV 5.0.0
import { boundingRect } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSarray
FUNCTIONboundingRect
RETURN TYPERect
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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.

boundingRect(array: Mat): Rect;
array

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

Returns

The Rect result.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.