pub fn associate_ocr_with_layout(
ocr_boxes: &[BoundingBox],
layout_regions: &[BoundingBox],
flag_within: bool,
threshold: f32,
) -> LayoutOCRAssociationExpand description
Associate OCR results with layout regions.
This function filters OCR boxes based on whether they are within or outside the specified layout regions.
This follows standard region association implementation.
§Arguments
ocr_boxes- Slice of OCR bounding boxeslayout_regions- Slice of layout region bounding boxesflag_within- If true, return boxes within regions; if false, return boxes outside regionsthreshold- Minimum intersection dimension for overlap detection
§Returns
LayoutOCRAssociation containing matched and unmatched indices