FAQ

Short answers to common questions about LumiScan Text Reader. Each entry links to the page with the details. Problems and error messages are described in Troubleshooting.

Each entry has a fixed anchor (for example #faq-read-text). To find an error message, search the Troubleshooting page for it.

Requirements and setup

Which image source and pixel formats does the Text Reader need?

Answer

The application reads the image node of another application that runs on the same device - the same ctrlX CORE or ctrlX IPC, or the same PC (remote Data Layer access is not supported), normally LumiScan Cam Driver, for example hdvisionsystems/lumiscan-cam-driver/camera1/output/image. The node must provide data (raw, uncompressed uint8 pixel data), width, height and pixel-type. Supported pixel formats are Mono8, Mono12, RGB8, RGB12, BGR8, BGR12, BayerGR8, BayerGR12, BayerRG8 and BayerRG12; Bayer images are converted to colour and 12-bit images scaled down to 8 bit before reading. Any other pixel format is rejected with status code -3.

More

Requirements

What image quality does OCR need?

Answer

No setting recovers text the camera did not capture. As a rule of thumb:

  • characters at least 20 pixels tall, and 30 or more for small or noisy print;

  • good contrast between the marking and its background;

  • text in focus and not glared out by the lighting;

  • text roughly upright, unless you use an orientation-detecting layout.

More

Requirements

Reading text

How do I take a reading and evaluate the result?

Answer

Set <module>/read-text/input/input-image-address, write to <module>/read-text/execute (a blocking call) and check output/status-code. On 1, read output/result: text is the whole reading as the engine laid it out and is not filtered by min-score; words[] holds each word with its score and box, filtered by min-score; word_count, mean_score and the language, engine and layout actually used are also reported. In production, check word_count and words[0].score before comparing words[0].text with the expected value.

More

Reading Text, How To: Read a Part Marking from a Camera Image

Language models

How do I read another language?

Answer

English (eng) and osd ship with the application.

  • Download the .traineddata file from github.com/tesseract-ocr/tessdata_fast (smaller and quicker, the right default for part markings) or tessdata_best.

  • Upload it, without renaming, into the directory named on system/tessdata-dir: on ctrlX OS over the ctrlX file interface, on a PC by copying the file there.

  • Set <module>/read-text/input/language to the file name without .traineddata, for example deu. Codes are not all three letters (for example chi_sim).

  • The model is usable on the very next reading, with no restart. Uploading never removes the shipped models.

More

Language Models

I replaced a model file - does the reader use the new one?

Answer

Yes, from the next read-text on, without a restart. The recognition engine is built once per module and kept, but before every read the reader checks the model file’s size and time and, when either changed, compares its content with the one the engine was built from. A changed model is loaded again; the log says The '<language>' model in '<directory>' changed on disk; loading it again. An image stream also reads the next frame with the model as it is on disk.

Cause

If a read fails with -7 right after the replacement, the file could not be loaded yet - an upload still in progress, for example.

Solution

Read again once the upload has completed; that read loads the new model.

More

Language Models

Image stream

How do I read the text on every frame of a camera stream?

Answer

Subscribe a module to the Cam Driver’s stream (experimental): write the camera’s stream folder, for example hdvisionsystems/lumiscan-cam-driver/camera1/control/publish/output/stream, to <module>/control/subscribe/input/address, set control/subscribe/input/enable to true and write to control/subscribe/execute. Each frame is read with the inputs of read-text, and one result per frame is published on control/subscribe/output/stream/result. To read the latest result as a plain read-text/output/result, set control/subscribe/input/keep-latest-output to true.

More

Reading Text on an Image Stream, Streams

Status codes and errors

How do I know whether a reading worked, and where is the reason for a failure?

Answer

Check the sign of output/status-code: greater than 0 is success, 0 means the operation has not run since the application started, less than 0 means it failed and produced nothing. The reason is on output/status-text. A failed write to execute answers only with a status code (over REST, a bare 400), so read output/status-text afterwards; the text is also in the application log: on ctrlX OS in the ctrlX Logbook or journalctl, on a PC in the application’s console output. -1 means the module was busy; nothing was done and the previous reading is left alone. Every other execute empties output/result as it starts, so read the result before triggering the next reading.

More

Execute a Method, Execution Status, Reading Text

Modules, licensing and support

Which licence do I need, and how many modules does it cover?

Answer

One licence covers ten modules; the eleventh module acquires a second licence of the same key, and a module is refused with status -11 when no licence on the device covers it. Purchase routes:

  • Bought from HD Vision Systems: the licence is on a LumiScan Key (Windows 11 or Ubuntu 24.04). One LumiScan Key is needed per device running the software at the same time; keys can be exchanged between devices.

  • Bought in the ctrlX Store for Windows 11: ctrlX WORKS plus a LumiScan Key.

  • Bought in the ctrlX Store for ctrlX OS (ctrlX CORE or IPC): a ctrlX licence, no key.

  • On ctrlX OS, the application shuts down shortly after starting if the licence is missing; the reason is written to the system log.

More

Requirements, Module Management, Licensing FAQ

Where can I find more answers or get support?

Answer

See the site-wide LumiScan FAQ. Contact HD Vision Systems customer success at customer.success@hdvisionsystems.com or +49 6221 6721905; for licences, licenses@hdvisionsystems.com.

More

Licensing FAQ