Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 9d0c72c

Browse files
committed
ADD: BFMatcher Typings
1 parent 2395aa4 commit 9d0c72c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

lib/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export * from './typings/FisherFaceRecognizer.d';
2323
export * from './typings/KeyPointDetector.d';
2424
export * from './typings/FeatureDetector.d';
2525
export * from './typings/AGASTDetector.d';
26+
export * from './typings/BFMatcher.d';
2627
export * from './typings/AKAZEDetector.d';
2728
export * from './typings/BRISKDetector.d';
2829
export * from './typings/DescriptorMatch.d';

lib/typings/BFMatcher.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {Mat} from "./Mat";
2+
import {DescriptorMatch} from "./DescriptorMatch";
3+
4+
export class BFMatcher {
5+
constructor(normType: number, crossCheck?: boolean);
6+
constructor(params: { normType: number, crossCheck?: boolean });
7+
match(descriptors1: Mat, descriptors2: Mat): DescriptorMatch[];
8+
matchAsync(descriptors1: Mat, descriptors2: Mat): Promise<DescriptorMatch[]>;
9+
knnMatch(descriptors1: Mat, descriptors2: Mat, k: number): Array<[DescriptorMatch]|[]>;
10+
knnMatchAsync(descriptors1: Mat, descriptors2: Mat, k: number): Promise<Array<[DescriptorMatch]|[]>>;
11+
}

test/tests/modules/features2d/BFMatcherTests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ module.exports = (getTestImg) => {
3131
let BFMatcher;
3232
let crossCheck = true;
3333

34+
let kazeKps;
35+
let kazeDesc;
36+
3437
before(() => {
3538
BFMatcher = new cv.BFMatcher(cv.NORM_L2, crossCheck);
3639

@@ -100,6 +103,9 @@ module.exports = (getTestImg) => {
100103
let BFMatcher;
101104
let crossCheck = false;
102105

106+
let kazeKps;
107+
let kazeDesc;
108+
103109
before(() => {
104110
BFMatcher = new cv.BFMatcher(cv.NORM_L2, crossCheck);
105111

0 commit comments

Comments
 (0)