import type { TimelineClock } from '../../core/timeline'; import type { DtypeRef } from './dtype-helpers'; /** * One detection event — a bounding-box annotation valid over `[ts, te)`. * * `bbox` is `[x, y, w, h]` in **normalized** coordinates (each in `[0, 1]` * relative to the overlay's width / height). This lets the view render * correctly regardless of the underlying image / video resolution. */ export interface DetectionEvent { ts: number; te: number; label: string; bbox: [number, number, number, number]; /** 0..1 — shown next to the label when present. */ confidence?: number; /** Stable identifier for the tracked object; used for color continuity. */ id?: number | string; [key: string]: unknown; } export interface DetectionBoxViewProps { src: string; clock?: TimelineClock | null; /** Optional dtype id or spec. Informational — passed by `` during dispatch. */ dtype?: DtypeRef; className?: string; /** Refresh fps. Defaults to 10. */ fps?: number; /** Hide the label pill if you only want rectangles. Defaults to false. */ hideLabels?: boolean; } /** * DetectionBoxView — overlay bounding boxes on top of a sibling element * (typically a `VideoPlayer` or an ``). * * The view is absolutely positioned and pointer-events-none by default, so * you compose it like this: * * ```tsx *
* * *
* ``` * * ## Data format * JSONL events of shape: * ``` * { ts, te, label, bbox: [x, y, w, h], confidence?, id? } * ``` * Bbox coordinates are normalized `[0, 1]`. For dense per-frame detections, * use short `te - ts` (e.g. one frame duration) and store consecutive * detections as separate events. * * ## Hooks used * `useSegment` — one segment's detections at a time; `useClockValue` at * `fps` drives the highlight refresh. */ export declare function DetectionBoxView({ src, clock, className, fps, hideLabels, }: DetectionBoxViewProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=DetectionBoxView.d.ts.map