QVAC’s OCR page says each block “may include
bbox” but doesn’t define it.
This page was checked against @qvac/sdk 0.22.0 with the OCR_LATIN model on Redact’s test images.
Nearest official page: OCR.What a block is
ocr() returns blocks, a list of { text, bbox?, confidence? }.
With options: { paragraph: false } each block is one detected text region, usually a line or a phrase.
With paragraph: true nearby regions are merged.
confidence is the recognizer’s certainty about the characters, from 0 to 1.
It says nothing about whether the text is sensitive.
A clean name can read at 0.93 while a smudged email reads at 0.46.
What bbox means
bbox is [x1, y1, x2, y2] in pixels of the image you passed in: top-left corner, then bottom-right corner, with the origin at the image’s top-left.
It is not normalized to 0–1 and it is not in PDF points.
So boxes are only meaningful against the exact raster OCR read.
If your app shows a page at a different size, or OCR read a rotated copy, you must convert.
Redact keeps one conversion function for this, ocr-geometry.ts, which puts each box’s corners in order, clips it to the page, and drops it if it has a non-finite number or no area left (a box entirely off the page ends up with none).
Sideways pages
modelConfig.defaultRotationAngles: [90, 180, 270] lets the recognizer try rotated crops.
On SDK 0.22 that means a page scanned sideways often comes back as many short vertical blocks, one per word, each correctly read: