OCRIMAGE — Recognise text (OCR)
Recognises the text in a raster image and creates text entities at its position.
- Command:
OCRIMAGE· Global name:_OCRIMAGE· Alias:RECOGNIZETEXT,OCR - Ribbon: Insert › Image and tracing
Recognises (OCR) the text in a raster image already attached to the drawing and creates one text entity (TEXT) per recognised line, at its position, with the height measured from the pixels and the rotation of the line, on the current layer and text style.
The OCR engine is pure Rust (ocrs, on top of the rten inference engine), with no external binaries. It only recognises the Latin alphabet (Spanish and English) and is in preview, so it is worth reviewing the result.
Usage
- Enter OCRIMAGE (or RECOGNIZETEXT) or click the button.
- Select the image with the text, or press Enter to choose an image file (with FILEDIA=0 you type the path).
Select the image with the text to recognise or press Enter to choose a file:
- Press Enter.
Press Enter to recognise the text in the image.
The recognised text is created as standard TEXT entities, which you can move, edit or delete like any other text.
Models
- The first time it is used, the OCR downloads its two models (~12 MB in total) to the configuration folder (
<configuration>/lince/ocr). They are then reused without downloading again. - The download is verified by size and SHA-256 checksum. Nothing is stored in the drawing.
- Offline: if the models cannot be downloaded and tesseract is installed, it is used as a fallback; otherwise a message is shown and no text is created.
Notes
- The text height comes from the pixel height of each line; nearly horizontal text is straightened.
- The text takes the current layer and text style. The original image is not modified.
- Vectorization (raster to vector) and PDF to DWG are separate steps of the plan.