Skip to content

batchDistance

Core and matricesfunctionOpenCV 5.0.0
import { batchDistance } from '@banou/opencv-wasm'

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

ARGUMENTSsrc1, src2, dist, dtype
FUNCTIONbatchDistance
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

naive nearest neighbor finder

see http://en.wikipedia.org/wiki/Nearest_neighbor_search todo: document

batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number, K: number, mask: Mat, update: number, crosscheck: boolean): void;
6 available overloads
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat): void;
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number): void;
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number, K: number): void;
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number, K: number, mask: Mat): void;
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number, K: number, mask: Mat, update: number): void;
batchDistance(src1: Mat, src2: Mat, dist: Mat, dtype: number, nidx: Mat, normType: number, K: number, mask: Mat, update: number, crosscheck: boolean): void;
src1

src1 argument (Mat).

src2

src2 argument (Mat).

dist

Output destination, filled by the native operation. dist argument (Mat).

dtype

dtype argument (number).

nidx

Output destination, filled by the native operation. nidx argument (Mat).

normType

norm type argument (number).

K

k argument (number).

mask

mask argument (Mat).

update

update argument (number).

crosscheck

crosscheck argument (boolean).

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.