import type { DecodeResult } from './decode.js'; import type { DecodeOptions, ImageLike } from './image.js'; /** A reusable, synchronous decoder for consecutive frames from one camera. */ export interface Decoder { /** Reads fresh pixels each time, trying the previous region before the full frame. */ decode(image: ImageLike, options?: DecodeOptions): DecodeResult | undefined; /** Forgets the previous region and releases references to working storage. */ reset(): void; } /** * Shares the tracking policy across backends. It retains a search rectangle, * never the caller's pixels or a previous payload. * On a region miss it searches the whole frame during the same call. */ export declare function trackedDecoder(read: (image: ImageLike, options: DecodeOptions) => DecodeResult | undefined, release: () => void, generation?: () => number): Decoder;