dnn_KeypointsModel
import { dnn_KeypointsModel } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits dnn_Model.
This class represents high-level API for keypoints models
KeypointsModel allows to set params for preprocessing input image. KeypointsModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and returns the x and y coordinates of each detected keypoint
Constructors and members
static new
Create keypoints model from network represented in one of the supported formats.
An order of model and config arguments does not matter.
new(model: EmbindString, config: EmbindString): dnn_KeypointsModel;2 available overloads
new(network: EmbindString): dnn_KeypointsModel;new(model: EmbindString, config: EmbindString): dnn_KeypointsModel;networkNet object.
modelBinary file contains trained weights.
configText file contains network configuration.
The dnn_KeypointsModel result.
static from1
Create an owned dnn_KeypointsModel instance with the supplied configuration.
This class represents high-level API for keypoints models
from1(_0: dnn_Net): dnn_KeypointsModel | null;_00 argument (dnn_Net).
The dnn_KeypointsModel | null result.
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
estimate
Given the input frame, create input blob, run net
estimate(frame: Mat, thresh: number): Point2fVector;2 available overloads
estimate(frame: Mat): Point2fVector;estimate(frame: Mat, thresh: number): Point2fVector;frameThe input image.
threshminimum confidence threshold to select a keypoint
a vector holding the x and y coordinates of each detected keypoint Release returned native handles with using or delete(), including handles nested in results.
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.