import { Rect, Size, Rotation } from '@embedpdf/models'; import { LayoutDetection } from '@embedpdf/ai'; import { LayoutBlock } from './types'; /** * Map layout detections from model output space to page coordinates. * * The model outputs coordinates in its 800x800 input space (or sometimes * in source image space). This function: * 1. Normalizes coordinates to source image space * 2. Scales from source image pixels to page points * * Page coordinates use top-left origin (same as browser/CSS), * matching the project's Rect convention. */ export declare function mapDetectionsToPageCoordinates(detections: LayoutDetection[], imageSize: Size, pageSize: Size, pageRotation?: Rotation): LayoutBlock[]; /** * Map table structure element coordinates from the crop's pixel space * to page coordinates. * * The pipeline outputs bboxes in the unpadded crop's pixel space. * This function scales from crop pixels to the table rect's page * dimensions and offsets by the rect origin. */ export declare function mapTableElementToPageCoordinates(elementBbox: [number, number, number, number], tableRect: Rect, cropImageSize: Size): Rect;