Skip to content

fillPoly

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

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

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

example: samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp An example using drawing functions Check tutorial_random_generator_and_text "the corresponding tutorial" for more details Fills the area bounded by one or more polygons.

The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill complex areas, for example, areas with holes, contours with self-intersections (some of their parts), and so forth.

fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number, offset: Point): void;
4 available overloads
fillPoly(img: Mat, pts: MatVector, color: Scalar): void;
fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number): void;
fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number): void;
fillPoly(img: Mat, pts: MatVector, color: Scalar, lineType: number, shift: number, offset: Point): void;
img

Input/output value, modified by the native operation. Image.

pts

Array of polygons where each polygon is represented as an array of points.

color

Polygon color.

lineType

Type of the polygon boundaries. See #LineTypes

shift

Number of fractional bits in the vertex coordinates.

offset

Optional offset of all points of the contours.

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.