Skip to content

ANNIndex_Distance

Features and matchingclassOpenCV 5.0.0
import { ANNIndex_Distance } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSANNIndex_Distance
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

Metrics used to calculate the distance between two feature vectors.

Constructors and members

static DIST_EUCLIDEAN

dist euclidean constant (0), defined by OpenCV for cv::ANNIndex.

DIST_EUCLIDEAN: ANNIndex_DistanceValue<0>,

static DIST_MANHATTAN

dist manhattan constant (1), defined by OpenCV for cv::ANNIndex.

DIST_MANHATTAN: ANNIndex_DistanceValue<1>,

static DIST_ANGULAR

dist angular constant (2), defined by OpenCV for cv::ANNIndex.

DIST_ANGULAR: ANNIndex_DistanceValue<2>,

static DIST_HAMMING

dist hamming constant (3), defined by OpenCV for cv::ANNIndex.

DIST_HAMMING: ANNIndex_DistanceValue<3>,

static DIST_DOTPRODUCT

dist dotproduct constant (4), defined by OpenCV for cv::ANNIndex.

DIST_DOTPRODUCT: ANNIndex_DistanceValue<4>

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.