image-js
Version:
Image processing and manipulation in JavaScript
43 lines • 1.89 kB
TypeScript
import type { Image } from '../../Image.js';
import type { GaussianBlurSigmaOptions } from '../../filters/index.js';
import type { GetGaussianPointsOptions } from '../../utils/utils.types.js';
import type { OrientedFastKeypoint } from '../keypoints/getOrientedFastKeypoints.js';
export interface GetBriefDescriptorsOptions {
/**
* Options to smooth the image patch before comparing pairs of points.
* Default values are the ones recommended in the original BRIEF article.
* DOI: https://doi.org/10.1007/978-3-642-15561-1_56.
*/
smoothingOptions?: GaussianBlurSigmaOptions;
/**
* Options to modify the gaussian distribution used to generate the points to compare.
*/
pointsDistributionOptions?: Omit<GetGaussianPointsOptions, 'nbPoints'>;
/**
* Size of the patch around the keypoint used to compute the descriptor.
* @default `31`
*/
patchSize?: number;
/**
* Number of bits of the final descriptor. Typically a power or 2: 128, 256, 512.
* @default `256`
*/
descriptorLength?: number;
}
export type BriefDescriptor = Uint8Array;
export interface Brief {
keypoints: OrientedFastKeypoint[];
descriptors: BriefDescriptor[];
}
/**
* Generate the rBRIEF descriptors for the desired keypoints of an image.
* The rBRIEF descriptors are presented in these articles:
* - ORB article: DOI: 10.1109/ICCV.2011.6126544
* - rBRIEF article: DOI: 10.1007/978-3-642-15561-1_56.
* @param image - Source image of the keypoints.
* @param keypoints - Keypoints for which the descriptors are wanted.
* @param options - Get rotated BRIEF descriptors options.
* @returns The descriptors for the given keypoints.
*/
export declare function getBriefDescriptors(image: Image, keypoints: OrientedFastKeypoint[], options?: GetBriefDescriptorsOptions): Brief;
//# sourceMappingURL=getBriefDescriptors.d.ts.map