UNPKG

ojos

Version:

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

41 lines (40 loc) 1.42 kB
import { DecompTypes, Scalar, Size } from 'mirada'; import { AbstractOperation } from './abstractOperation'; import { OperationExecBaseOptions, WithBorderType, WithBorderValue } from './types'; export interface WarpAffineOptions extends OperationExecBaseOptions, WithBorderType, WithBorderValue { /** * Coordinates of quadrangle vertices in the source image. */ inputs: Scalar; /** * Coordinates of the corresponding quadrangle vertices in the destination image. */ outputs: Scalar; /** * Combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, * that sets M as the inverse transformation */ flags?: number; /** * Size of the output image. */ size?: Size; /** * Method passed to cv::solve (DecompTypes) */ solveMethod?: DecompTypes; /** * If given input and output points will be drawn as circles. if true will randomly pick colors, * or an array of colors can be passed otherwise. */ drawPoints?: Scalar[] | true; } /** * Will use [estimateAffine2D] to calculate affine matrix from given [inputs] and [outputs] and then [warpAffine] to transform. */ export declare class WarpAffine extends AbstractOperation<WarpAffineOptions> { name: string; description: string; noInPlace: boolean; protected _exec(o: WarpAffineOptions): void; }