Skip to content

drawMarker

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

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

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

ADDING A SET OF PREDEFINED MARKERS WHICH COULD BE USED TO HIGHLIGHT POSITIONS IN AN IMAGE

Draws a marker on a predefined position in an image.

The function cv::drawMarker draws a marker on a given position in the image. For the moment several marker types are supported, see #MarkerTypes for more information.

drawMarker(img: Mat, position: Point, color: Scalar, markerType: number, markerSize: number, thickness: number, line_type: number): void;
5 available overloads
drawMarker(img: Mat, position: Point, color: Scalar): void;
drawMarker(img: Mat, position: Point, color: Scalar, markerType: number): void;
drawMarker(img: Mat, position: Point, color: Scalar, markerType: number, markerSize: number): void;
drawMarker(img: Mat, position: Point, color: Scalar, markerType: number, markerSize: number, thickness: number): void;
drawMarker(img: Mat, position: Point, color: Scalar, markerType: number, markerSize: number, thickness: number, line_type: number): void;
img

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

position

The point where the crosshair is positioned.

color

Line color.

markerType

The specific type of marker you want to use, see #MarkerTypes

markerSize

The length of the marker axis [default = 20 pixels]

thickness

Line thickness.

line_type

Type of the line, See #LineTypes

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.