fillConvexPoly
import { fillConvexPoly } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;imgInput/output value, modified by the native operation. Image.
pointsPolygon vertices.
colorPolygon color.
lineTypeType of the polygon boundaries. See #LineTypes
shiftNumber 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.