<aside>
🛠
Strip OCR Output Down to Just the Coordinates
OCR nodes return everything they know: where the text is, what it says, how confident they are. When all you want is where, this tool throws away the rest. Feed it OCR region data and it returns the geometry alone — one region per line, in exactly the form Image Masker by Region expects. Polygons by default; flip one checkbox to get bounding boxes instead. It's a pure text-in, text-out step, which means no JSON parsing, no code node, and no language model retyping coordinates it might get wrong.
</aside>
What it does
Region Extract reads OCR region data as text and outputs the region geometry as text — nothing else.
- The OCR node's output goes in
- Recognized strings, confidence scores, and any other metadata are discarded
- What comes out is the coordinate data, one region per line
The checkbox controls the shape of what comes out. Off, each detected region is emitted as a polygon — the quadrilateral (or arbitrary shape) the OCR engine actually found, which stays tight around rotated or skewed text. On, each region is reduced to its bounding box — the smallest upright rectangle containing it.
This node does not touch images. It is a text transformer that happens to sit at the exact seam where OCR output meets image editing.
Problem it solves
- The format gap after OCR – OCR engines emit structured data; masking and cropping tools want plain coordinates. This is the piece in between, and without it that gap is a code node.
- No JSON wrangling – No parsing, no field paths, no bracket-matching in a text field.
- Bounding-box conversion for free – Reducing four (or more) points to a rectangle is trivial arithmetic that is nonetheless annoying to do by hand across dozens of regions.
- Coordinates never pass through a language model – An LLM asked to reformat coordinates will usually be right and occasionally be off by a digit, and the failure looks like the mask "just being slightly wrong." A deterministic node removes that class of bug entirely.
- Purpose-built partner for Image Masker by Region – The two checkboxes mirror each other by design. Whatever mode you extract in, read in the same mode.
- Inspectable at every step – Because both sides are text, a Text Viewer between the two nodes shows you exactly what will be masked before any pixels are touched.
Input/Output
<aside>
- Input: OCR region data (bottom-left input, red port — string)
- Comes from an upstream OCR node. Wire the OCR node's region/result output straight in.
- Can also come from a Text Input node if you're replaying saved OCR output or testing
</aside>
<aside>
- Output: Region geometry as text (right output, red port — string)
- One region per line — the format Image Masker by Region reads
- Polygon mode (default): the region outline as found by the OCR engine
- Bounding-box mode (checkbox on): each region reduced to an upright rectangle
- Discarded: recognized text, confidence scores, ordering metadata — geometry only
- Downstream: Image Masker by Region, or a Text Viewer to inspect
</aside>
Configuration Options