image-js
Version:
Image processing and manipulation in JavaScript
33 lines • 1.1 kB
TypeScript
import type { Image } from '../Image.js';
import type { Mask } from '../Mask.js';
import type { Point } from '../geometry/index.js';
export interface ExtremaOptions {
/**
* Chooses what kind of extremum to compute.
* @default `'maximum'`
*/
kind?: 'minimum' | 'maximum';
/**
* Uses mask to check if a point belongs to a ROI or not
* @default `undefined`
*/
mask?: Mask;
/**
* Chooses what kind of coverage algorithm to use to compute the extremum.
* @default `'star'`
*/
algorithm?: 'cross' | 'square' | 'star';
/**
* Maximum number of points that can be equal to the extremum
* @default `2`
*/
maxEquals?: number;
}
/**
* Checks the surrounding values of a point. If they are all bigger or smaller than the pixel in question then this point is considered an extremum.
* @param image - Image to find extrema from.
* @param options - ExtremaOptions
* @returns Array of Points.
*/
export declare function getExtrema(image: Image, options: ExtremaOptions): Point[];
//# sourceMappingURL=getExtrema.d.ts.map