Skip to content

polylines

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

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

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

Draws several polygonal curves.

polylines(img: Mat, pts: MatVector, isClosed: boolean, color: Scalar, thickness: number, lineType: number, shift: number): void;
4 available overloads
polylines(img: Mat, pts: MatVector, isClosed: boolean, color: Scalar): void;
polylines(img: Mat, pts: MatVector, isClosed: boolean, color: Scalar, thickness: number): void;
polylines(img: Mat, pts: MatVector, isClosed: boolean, color: Scalar, thickness: number, lineType: number): void;
polylines(img: Mat, pts: MatVector, isClosed: boolean, color: Scalar, thickness: number, lineType: number, shift: number): void;
img

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

pts

Array of polygonal curves.

isClosed

Flag indicating whether the drawn polylines are closed or not. If they are closed, the function draws a line from the last vertex of each curve to its first vertex.

color

Polyline color.

thickness

Thickness of the polyline edges.

lineType

Type of the line segments. See #LineTypes

shift

Number of fractional bits in the vertex coordinates.

The function cv::polylines draws one or more polygonal curves.

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.