Skip to content

detail_BestOf2NearestMatcher

stitchingclassOpenCV 5.0.0
import { detail_BestOf2NearestMatcher } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSdetail_BestOf2NearestMatcher
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. Inherits detail_FeaturesMatcher.

Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold match_conf

See: detail::FeaturesMatcher

Constructors and members

static new

Constructs a "best of 2 nearest" matcher.

new(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number, matches_confidence_thresh: number): detail_BestOf2NearestMatcher;
6 available overloads
new(): detail_BestOf2NearestMatcher;
new(try_use_gpu: boolean): detail_BestOf2NearestMatcher;
new(try_use_gpu: boolean, match_conf: number): detail_BestOf2NearestMatcher;
new(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number): detail_BestOf2NearestMatcher;
new(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number): detail_BestOf2NearestMatcher;
new(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number, matches_confidence_thresh: number): detail_BestOf2NearestMatcher;
try_use_gpu

Should try to use GPU or not

match_conf

Match distances ration threshold

num_matches_thresh1

Minimum number of matches required for the 2D projective transform estimation used in the inliers classification step

num_matches_thresh2

Minimum number of matches required for the 2D projective transform re-estimation on inliers

matches_confidence_thresh

Matching confidence threshold to take the match into account. The threshold was determined experimentally and set to 3 by default.

Returns

The detail_BestOf2NearestMatcher result.

static create

Create an owned detail_BestOf2NearestMatcher instance with the supplied configuration.

Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold match_conf

create(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number, matches_confidence_thresh: number): detail_BestOf2NearestMatcher | null;
6 available overloads
create(): detail_BestOf2NearestMatcher | null;
create(try_use_gpu: boolean): detail_BestOf2NearestMatcher | null;
create(try_use_gpu: boolean, match_conf: number): detail_BestOf2NearestMatcher | null;
create(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number): detail_BestOf2NearestMatcher | null;
create(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number): detail_BestOf2NearestMatcher | null;
create(try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number, num_matches_thresh2: number, matches_confidence_thresh: number): detail_BestOf2NearestMatcher | null;
try_use_gpu

try use gpu argument (boolean).

match_conf

match conf argument (number).

num_matches_thresh1

num matches thresh1 argument (number).

num_matches_thresh2

num matches thresh2 argument (number).

matches_confidence_thresh

matches confidence thresh argument (number).

Returns

The detail_BestOf2NearestMatcher | 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;
Returns

The this result.

collectGarbage

Release temporary buffers retained by this feature matcher.

collectGarbage(): void;

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.