Skip to main content

prep_table_words

Function prep_table_words 

Source
pub fn prep_table_words(
    img: &RgbImage,
    regions: &[Region],
    scale: f32,
) -> (Vec<LineBox>, Vec<PrepLine>)
Expand description

Gather word crops from a page’s table regions (browser table path, #157 stage 3): crop each table region, split it into lines, split each line into words (segment_words), prep each word for recognition, and keep the word’s page-point bbox. Recognizing table interiors is what gives the cell matcher the word boxes it needs — the native pipeline reads those from pdfium’s text layer on digital pages, and calls this on scanned ones (OcrModel::ocr_table_words, #173), same as the browser path.