ojos
Version:
High level API on top of Mirada (opencv.js) supporting bth browser and node.
30 lines (29 loc) • 1.29 kB
TypeScript
import { Mat } from 'mirada';
import { RemoveProperties } from 'misc-utils-of-mine-generic';
import { ImageOperation, OperationExecBaseOptions, WithChannels } from './types';
export declare type MandatoryDst<T extends OperationExecBaseOptions> = RemoveProperties<T, 'dst'> & {
dst: Mat;
};
export declare abstract class AbstractOperation<T extends OperationExecBaseOptions> implements ImageOperation<T> {
protected defaultOptions?: T | undefined;
abstract name: string;
description: string;
noInPlace: boolean;
sameSizeAndType: boolean;
isInPlace: boolean;
noDst: boolean;
protected validateEachExec: boolean;
protected validated: boolean;
validChannels: number[] | undefined;
constructor(defaultOptions?: T | undefined);
protected validate(o: T): string | undefined;
protected abstract _exec(o: MandatoryDst<T>): void;
exec(o?: T): Mat;
protected afterExec(options: MandatoryDst<T>): void;
protected checkInputImage(o: T): void;
protected checkOptions(o?: T): T;
protected checkDst(options: T): void;
protected checkInPlaceBefore(o: OperationExecBaseOptions): void;
protected checkInPlaceAfter(o: OperationExecBaseOptions): void;
protected allChannels(o: T & WithChannels, op: (o: T) => void): void;
}