Skip to content

detail_AffineBestOf2NearestMatcher

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

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

ARGUMENTSConstructor or factory
CLASSdetail_AffineBestOf2NearestMatcher
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_BestOf2NearestMatcher.

Features matcher similar to cv::detail::BestOf2NearestMatcher 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.

Unlike cv::detail::BestOf2NearestMatcher this matcher uses affine transformation (affine transformation estimate will be placed in matches_info).

See: cv::detail::FeaturesMatcher cv::detail::BestOf2NearestMatcher

Constructors and members

static new

Constructs a "best of 2 nearest" matcher that expects affine transformation between images

See: cv::estimateAffine2D cv::estimateAffinePartial2D
new(full_affine: boolean, try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number): detail_AffineBestOf2NearestMatcher;
5 available overloads
new(): detail_AffineBestOf2NearestMatcher;
new(full_affine: boolean): detail_AffineBestOf2NearestMatcher;
new(full_affine: boolean, try_use_gpu: boolean): detail_AffineBestOf2NearestMatcher;
new(full_affine: boolean, try_use_gpu: boolean, match_conf: number): detail_AffineBestOf2NearestMatcher;
new(full_affine: boolean, try_use_gpu: boolean, match_conf: number, num_matches_thresh1: number): detail_AffineBestOf2NearestMatcher;
full_affine

whether to use full affine transformation with 6 degress of freedom or reduced transformation with 4 degrees of freedom using only rotation, translation and uniform scaling

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 affine transform estimation used in the inliers classification step

Returns

The detail_AffineBestOf2NearestMatcher 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.

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.