Skip to content

face_drawFacemarks

facefunctionOpenCV 5.0.0
import { face_drawFacemarks } from '@banou/opencv-wasm'

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

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

Utility to draw the detected facial landmark points

std::vector<Rect> faces;
std::vector<std::vector<Point2f> > landmarks;
facemark->getFaces(img, faces);
facemark->fit(img, faces, landmarks);
for(int j=0;j<rects.size();j++){
    face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255));
}
face_drawFacemarks(image: Mat, points: Mat, color: Scalar): void;
2 available overloads
face_drawFacemarks(image: Mat, points: Mat): void;
face_drawFacemarks(image: Mat, points: Mat, color: Scalar): void;
image

Input/output value, modified by the native operation. The input image to be processed.

points

Contains the data of points which will be drawn.

color

The color of points in BGR format represented by cv::Scalar.

<B>Example of usage</B>

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.