image-js
Version:
Image processing and manipulation in JavaScript
54 lines • 1.92 kB
TypeScript
import type { Image } from '../../Image.js';
import type { Point } from '../../geometry/index.js';
import type { GetHarrisScoreOptions } from '../featureMatching.types.js';
import type { GetShiTomasiScoreOptions } from './getShiTomasiScore.ts';
import type { IsFastKeypointOptions } from './isFastKeypoint.js';
export interface GetFastKeypointsOptions extends IsFastKeypointOptions {
/**
* Maximum number of features to return.
* @default `500`
*/
maxNbFeatures?: number;
/**
* Whether to apply non-max suppression to the keypoints.
* This removes all keypoints which
* don't have the highest value within the adjacent keypoints.
* @default `true`
*/
nonMaxSuppression?: boolean;
/**
* Radius of the circle used for the algorithm.
* @default `3`
*/
fastRadius?: number;
/**
* Algorithm to use to compute corners score.
* @default `'FAST'`
*/
scoreAlgorithm?: 'HARRIS' | 'FAST' | 'TOMASI';
/**
* Options for the Harris score computation.
*/
scoreOptions?: GetHarrisScoreOptions | GetShiTomasiScoreOptions;
}
export interface FastKeypoint {
/**
* Location of the keypoint in the image.
*/
origin: Point;
/**
* Score of the keypoint, the bigger it is, the better the feature.
* It is the criteria used for the non-maximal suppression.
*/
score: number;
}
/**
* Find the features in a GREY image according to the FAST (Features from Accelerated Segment Test) algorithm.
* Based on the paper Machine Learning for High-Speed Corner Detection.
* DOI: https://doi.org/10.1007/11744023_34.
* @param image - The image to process.
* @param options - Get FAST keypoints options.
* @returns The FAST keypoints.
*/
export declare function getFastKeypoints(image: Image, options?: GetFastKeypointsOptions): FastKeypoint[];
//# sourceMappingURL=getFastKeypoints.d.ts.map