UNPKG

ojos

Version:

High level API on top of Mirada (opencv.js) supporting bth browser and node.

47 lines (46 loc) 1.84 kB
import { AbstractOperation } from './abstractOperation'; import { OperationExecBaseOptions, WithBorderType, WithChannels } from './types'; export interface EdgeOptions extends OperationExecBaseOptions, EdgeConcreteOptions { } export interface EdgeConcreteOptions extends WithBorderType, WithChannels { type: 'sobel' | 'scharr' | 'laplacian'; /** * Desired depth of the destination image. Combinations: ``` input output CV_8U -1/CV_16S/CV_32F/CV_64F CV_16U/CV_16S -1/CV_32F/CV_64F CV_32F -1/CV_32F/CV_64F CV_64F -1/CV_64F */ ddepth?: number; /** * Applies only for Scharr and Sobel (and are mandatory in that case). Also must less than 3 */ dx?: number; /** * Applies only for Scharr and Sobel (and are mandatory in that case) */ dy?: number; /** * Aperture size used to compute the second-derivative filters. See getDerivKernels for details. The size must be positive and odd. applies only for Sobel and Laplacian */ ksize?: number; /** * Optional delta value that is added to the results prior to storing them in dst . */ delta?: number; /** * Optional scale factor for the computed Laplacian values. By default, no scaling is applied. See getDerivKernels for details. */ scale?: number; } export declare class Edge extends AbstractOperation<EdgeOptions> { name: string; description: string; sameSizeAndType: boolean; protected checkInputImage(o: EdgeOptions): void; protected validate(o: EdgeOptions): "dx and dy are mandatory and must be less than 3" | "If ksize is given then it must be 1, 3, 5, or 7" | "If ksize is given then it must be positive and odd" | undefined; protected _exec(o: EdgeOptions): void; protected _execOne(o: EdgeOptions): void; }