Skip to content

rectangle1

Image processingfunctionOpenCV 5.0.0
import { rectangle1 } from '@banou/opencv-wasm'

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

ARGUMENTSimg, rec, color, thickness
FUNCTIONrectangle1
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

use rec parameter as alternative specification of the drawn rectangle: r.tl() and r.br()-Point(1,1) are opposite corners

rectangle1(img: Mat, rec: Rect, color: Scalar, thickness: number, lineType: number, shift: number): void;
4 available overloads
rectangle1(img: Mat, rec: Rect, color: Scalar): void;
rectangle1(img: Mat, rec: Rect, color: Scalar, thickness: number): void;
rectangle1(img: Mat, rec: Rect, color: Scalar, thickness: number, lineType: number): void;
rectangle1(img: Mat, rec: Rect, color: Scalar, thickness: number, lineType: number, shift: number): void;
img

Input/output value, modified by the native operation. img argument (Mat).

rec

rec argument (Rect).

color

color argument (Scalar).

thickness

thickness argument (number).

lineType

line type argument (number).

shift

shift argument (number).

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.