image-js
Version:
Image processing and manipulation in JavaScript
34 lines • 1.01 kB
TypeScript
import type { Image } from '../Image.js';
import type { Mask } from '../Mask.js';
import type { Point } from '../geometry/index.js';
interface SampleBackgroundPointsOptions {
/**
* Mask to sample points from. If mask is undefined, all the points
* of the grid are taken as background.
*/
mask?: Mask;
/**
* Number of rows in the grid.
* @default `10`
*/
gridHeight?: number;
/**
* Number of columns in the grid.
* @default `10`
*/
gridWidth?: number;
/**
* The kind of background to sample.
* @default `'black'`
*/
kind?: 'black' | 'white';
}
/**
* Applies the grid that samples points that belong to background.
* @param image - Image to sample points from.
* @param options - SampleBackgroundPointsOptions.
* @returns Array of points.
*/
export declare function sampleBackgroundPoints(image: Image, options?: SampleBackgroundPointsOptions): Point[];
export {};
//# sourceMappingURL=sampleBackgroundPoints.d.ts.map