Skip to content

fillConvexPoly

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

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

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

END OF MARKER SECTION

Fills a convex polygon.

The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the function #fillPoly . It can fill not only convex polygons but any monotonic polygon without self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line) twice at the most (though, its top-most and/or the bottom edge could be horizontal).

fillConvexPoly(img: Mat, points: Mat, color: Scalar, lineType: number, shift: number): void;
3 available overloads
fillConvexPoly(img: Mat, points: Mat, color: Scalar): void;
fillConvexPoly(img: Mat, points: Mat, color: Scalar, lineType: number): void;
fillConvexPoly(img: Mat, points: Mat, color: Scalar, lineType: number, shift: number): void;
img

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

points

Polygon vertices.

color

Polygon color.

lineType

Type of the polygon boundaries. See #LineTypes

shift

Number of fractional bits in the vertex coordinates.

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.