import { type BoxCluster, type DetectedBox } from './geometry.js'; import { type DetectedLabel } from './labels.js'; export interface BoxesFile { width: number; height: number; boxes: DetectedBox[]; labels?: DetectedLabel[]; clusters?: BoxCluster[]; } export interface DetectScreenResult { dir: string; boxesPath: string; annotatedPath: string; width: number; height: number; boxes: DetectedBox[]; labels: DetectedLabel[]; } export declare function detectBoxes(pngBuffer: Buffer): DetectedBox[]; export declare function annotateBoxes(pngBuffer: Buffer, boxes: DetectedBox[], labels?: DetectedLabel[]): Buffer; /** Group boxes that share the same visual row and are closely adjacent (gap ≤ 8px). */ export declare function groupBoxClusters(boxes: DetectedBox[]): BoxCluster[]; /** * Run OpenCV box detection + OCR labels on `{storage.root}/{name}/blank.png`. * Writes `boxes.json` and `boxes-annotated.png` next to the blank. */ export declare function detectScreen(name: string): Promise; /** Persist boxes (including hand-drawn) and rewrite boxes-annotated.png. Keeps existing labels. */ export declare function writeBoxes(name: string, boxes: DetectedBox[]): Promise; //# sourceMappingURL=detect.d.ts.map