image-js
Version:
Image processing and manipulation in JavaScript
36 lines • 1.11 kB
TypeScript
import type { BriefDescriptor } from '../descriptors/getBriefDescriptors.js';
export interface BruteForceMatchOptions {
/**
* Whether to sort the matches from best to worst.
* @default `false`
*/
sort?: boolean;
/**
* Number of best matches to return.
* @default `source.length`
*/
nbBestMatches?: number;
}
export interface Match {
/**
* Index of the source keypoint.
*/
sourceIndex: number;
/**
* Index of the destination keypoint.
*/
destinationIndex: number;
/**
* Distance from source to destination keypoints.
*/
distance: number;
}
/**
* Find the best match for each of the source descriptors using brute force matching.
* @param source - Source descriptors.
* @param destination - Destination descriptors.
* @param options - Brute force amtch options.
* @returns The best match for each source descriptor.
*/
export declare function bruteForceOneMatch(source: BriefDescriptor[], destination: BriefDescriptor[], options?: BruteForceMatchOptions): Match[];
//# sourceMappingURL=bruteForceMatch.d.ts.map