import * as gm from "gammacv"; import { CBARCameraFacing, CBARCameraResolution, CBARContext, CBARDebug, CBARFeatureTracking } from "../../CBARContext"; import { CBARProcessNode } from "./CBARProcessNode"; import { DeferredExecutor } from "../Utils"; import { CBServerConfig } from "../../../backend"; import CBARVideoCapture from "./CBARVideoCapture"; import { Rect, Size2d } from "mirada"; import { CBAREvent } from "../../CBARTypes"; import { RenderOptions } from "../../components"; export declare enum CBARPipelineTask { HoughLines = 0, OpticalFlow = 1 } declare type TaskHandler = (data: T) => boolean; declare type NodeConstructor = new (pipeline: CBARPipeline) => T; export declare class CBARPipeline { context: CBARContext; config: CBServerConfig; protected readonly displayCanvas: HTMLCanvasElement; readonly tracking: CBARFeatureTracking; pipeline: gm.InputType; session?: gm.Session; readonly stream: CBARVideoCapture; readonly input: gm.MediaInput; readonly pcLinesOutput?: gm.Tensor | null; readonly colorOp?: gm.Operation | null; readonly colorOutput?: gm.Tensor | null; readonly greyscaleOp?: gm.Operation | null; readonly greyscaleOutput?: gm.Tensor | null; readonly quarteredOp?: gm.Operation | null; readonly quarteredOutput?: gm.Tensor | null; readonly edgesOp?: gm.Operation | null; readonly edgesOutput?: gm.Tensor | null; readonly colorSegmentationOp?: gm.Operation | null; readonly colorSegmentationOutput?: gm.Tensor | null; private readonly inputWidth; private readonly inputHeight; readonly processingWidth: number; readonly processingHeight: number; constructor(context: CBARContext, config: CBServerConfig, displayCanvas: HTMLCanvasElement, tracking?: CBARFeatureTracking); get downsample(): number; getNode(type: NodeConstructor): T; captureRawOutput(roi?: Rect): HTMLCanvasElement | undefined; get nodes(): CBARProcessNode[]; protected frameIndex: number; debugEnabled: boolean; protected tasks: DeferredExecutor[]; requestTask(task: CBARPipelineTask): Promise; private _subscriptions; subscribeToTask(task: CBARPipelineTask, handler: TaskHandler): void; completeTask(task: CBARPipelineTask, executor: () => T): void; refresh(): void; mirrorOutput: boolean; private _displayCount; private _reportedError; update(renderOptions: RenderOptions): void; handleEvent(event: CBAREvent): void; resolution: CBARCameraResolution; facing: CBARCameraFacing; start(resolution?: CBARCameraResolution, facing?: CBARCameraFacing): Promise; private readonly _nodes; get inputSize(): Size2d; release(): void; debugFeatureEnabled(feature: CBARDebug): boolean; } export {};