xfeatures2d_matchGMS
import { xfeatures2d_matchGMS } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;size1Input size of image1.
size2Input size of image2.
keypoints1Input keypoints of image1.
keypoints2Input keypoints of image2.
matches1to2Input 1-nearest neighbor matches.
matchesGMSOutput destination, filled by the native operation. Matches returned by the GMS matching strategy.
withRotationTake rotation transformation into account.
withScaleTake scale transformation into account.
thresholdFactorThe 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.