import { CBARProcessNode } from "./CBARProcessNode"; import { CBARFrame } from "../CBARFrame"; import { Point } from "mirada"; import { CBARPipeline } from "./CBARPipeline"; import * as gm from "gammacv"; declare type OpticalFlowPoint = { point: Point; frameTime: number; frameIndex: number; }; export declare class OpticalFlowFeature { private _currentPosition; cluster?: OpticalFlowCluster | undefined; constructor(_currentPosition: OpticalFlowPoint, cluster?: OpticalFlowCluster | undefined); readonly id: number; status?: number; error?: number; verified: number; private _previousPosition?; get currentPosition(): Point; get previousPosition(): Point | undefined; get direction(): { x: number; y: number; } | undefined; update(point: OpticalFlowPoint): void; } export declare class OpticalFlowCluster { roi: gm.Rect; qualityLevel: number; minFeatures: number; constructor(roi: gm.Rect, qualityLevel: number, minFeatures?: number); readonly id: number; features: OpticalFlowFeature[]; } export declare type OpticalFlowResult = { points: OpticalFlowFeature[]; removed: OpticalFlowFeature[]; }; export declare type OpticalFlowConfig = { maxPoints: number; qualityLevel: number; minDistance: number; windowSize: number; updateFrequency: number; findNewFrequency: number; cleanupFrequency: number; }; export declare class CBAROpticalFlowNode extends CBARProcessNode { private _prevFrame?; private _features; private _clusters; private _gotLastFeaturesIndex; constructor(context: CBARPipeline, _config?: OpticalFlowConfig); config: OpticalFlowConfig; trackRegion(cluster: OpticalFlowCluster): OpticalFlowCluster; untrackRegion(cluster: OpticalFlowCluster): void; get trackedRegions(): OpticalFlowCluster[]; private getNewFeatures; private status; private err; private prevPoints; private nextPoints; private updateFeatures; private cleanupFeatures; get features(): OpticalFlowFeature[]; private _needsCleanup; update(frame: CBARFrame): void; debug(canvas: HTMLCanvasElement): void; destroy(): void; } export {};