Skip to content

xfeatures2d_matchGMS

xfeatures2dfunctionOpenCV 5.0.0
import { xfeatures2d_matchGMS } from '@banou/opencv-wasm'

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

ARGUMENTSsize1, size2, keypoints1, keypoints2
FUNCTIONxfeatures2d_matchGMS
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms] .

Note: Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly. If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480). If your images have big rotation and scale changes, please set withRotation or withScale to true.

xfeatures2d_matchGMS(size1: Size, size2: Size, keypoints1: KeyPointVector, keypoints2: KeyPointVector, matches1to2: DMatchVector, matchesGMS: DMatchVector, withRotation: boolean, withScale: boolean, thresholdFactor: number): void;
4 available overloads
xfeatures2d_matchGMS(size1: Size, size2: Size, keypoints1: KeyPointVector, keypoints2: KeyPointVector, matches1to2: DMatchVector, matchesGMS: DMatchVector): void;
xfeatures2d_matchGMS(size1: Size, size2: Size, keypoints1: KeyPointVector, keypoints2: KeyPointVector, matches1to2: DMatchVector, matchesGMS: DMatchVector, withRotation: boolean): void;
xfeatures2d_matchGMS(size1: Size, size2: Size, keypoints1: KeyPointVector, keypoints2: KeyPointVector, matches1to2: DMatchVector, matchesGMS: DMatchVector, withRotation: boolean, withScale: boolean): void;
xfeatures2d_matchGMS(size1: Size, size2: Size, keypoints1: KeyPointVector, keypoints2: KeyPointVector, matches1to2: DMatchVector, matchesGMS: DMatchVector, withRotation: boolean, withScale: boolean, thresholdFactor: number): void;
size1

Input size of image1.

size2

Input size of image2.

keypoints1

Input keypoints of image1.

keypoints2

Input keypoints of image2.

matches1to2

Input 1-nearest neighbor matches.

matchesGMS

Output destination, filled by the native operation. Matches returned by the GMS matching strategy.

withRotation

Take rotation transformation into account.

withScale

Take scale transformation into account.

thresholdFactor

The higher, the less matches.

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.