Data Layer Reference
Every address below is relative to
hdvisionsystems/lumiscan-text-reader/
Data Layer
LumiScan Text Reader offers its functions on the Data Layer under hdvisionsystems/lumiscan-text-reader.
On ctrlX OS (ctrlX CORE or ctrlX IPC), LumiScan Text Reader uses the ctrlX Data Layer.
On a PC with Windows 11 or Ubuntu 24.04, LumiScan Text Reader uses LumiScan Keryx.
The node addresses, types and call patterns are the same on both. LumiScan Text Reader offers:
-
a stream subscription to one source (experimental)
How addresses are built, how to call functions, the status codes and the tools are described in LumiScan Keryx.
Application-wide nodes
| Address | Type | Access | Description |
|---|---|---|---|
|
string[] |
read |
The modules that exist right now |
|
method |
write |
Add a module |
|
string |
read/write |
Name for the new module |
|
method |
write |
Remove a module |
|
string |
read/write |
Module to remove |
|
method |
write |
Persist the module list |
|
method |
write |
Persist one module’s settings |
|
string |
read/write |
Module to save |
|
string |
read |
Where to upload your own models; the first directory searched |
|
string[] |
read |
Every directory searched, in order |
|
string[] |
read |
Language codes found across all of them |
|
method |
write |
Use another upload directory |
|
string |
read/write |
Directory to upload to and search first |
|
method |
write |
Re-read the directories and update |
|
string |
read |
What the node a module subscribes to must hold, as a JSON Schema (draft-04) of its JSON form: here a |
Every method also serves output/status-code and output/status-text.
system/tessdata-dir, system/tessdata-dirs and system/languages are read-only outputs of
set-tessdata-dir and refresh-languages, so the listing can never describe a directory that is not
in use. Note that languages is a listing only: reading with a newly uploaded model does not wait
for a refresh. See Language Models.
Per-module nodes
All addresses below are under <module-id>/read-text/.
| Address | Type | Default | Description |
|---|---|---|---|
|
method |
- |
Run one reading |
|
string |
(empty) |
Address of the image node to read |
|
uint16 |
0 |
Left edge of the region to read |
|
uint16 |
0 |
Top edge |
|
uint16 |
0 |
Width; 0 reaches the right edge |
|
uint16 |
0 |
Height; 0 reaches the bottom edge |
|
string |
|
A code from |
|
string |
|
|
|
string |
|
See the table below |
|
string |
|
|
|
string |
|
|
|
string |
(empty) |
Characters added to the set |
|
string |
(empty) |
Characters removed from the set |
|
float64 |
0.0 |
Confidence a word must reach to be reported, 0 to 1 |
|
flatbuffers |
empty |
|
|
int16 |
0 |
Outcome as a number; negative is always an error |
|
string |
(empty) |
Outcome in words |
Accepted input/layout values
|
One uniform block of text - the default |
|
Exactly one line |
|
Exactly one word |
|
Exactly one character |
|
One line, with no structure analysis |
|
Find and segment text regions across the whole image |
|
As |
|
Find text wherever it appears, assuming no layout |
|
As |
|
A single column of text |
|
A single block of vertically aligned text |
|
A single word arranged in a circle |
Per-module image stream nodes (experimental)
All addresses below are under <module-id>/, beside read-text/. The stream reads each frame with
the inputs of read-text, all but input/input-image-address. See
Reading Text on an Image Stream.
| Address | Type | Default | Description |
|---|---|---|---|
|
bool |
as applied |
Stream mode: |
|
string |
as applied |
The one source, a camera’s stream folder, e.g. |
|
string |
as applied |
The tag on the module’s results: the module’s step in the lineage of each stream result carries it. Empty: the module id, e.g. |
|
uint32 |
as applied |
Frames that may wait while one is read, 1-64 |
|
bool |
as applied |
|
|
method |
- |
Check the inputs of |
|
method |
- |
Drop the source named by |
|
string |
(empty) |
The source to drop, as |
|
as the inputs |
|
What |
|
string |
- |
Hash of what the results are made with, 16 hex digits. Read-only |
|
bool |
|
|
|
flatbuffers |
empty |
|
|
string |
(empty) |
Why the last frame that could not be read failed, naming the source by its address |
|
uint64 |
|
Milliseconds since the stream started |
|
uint64 |
|
Frames the subscription delivered |
|
uint64 |
|
Frames read, each with a result |
|
uint64 |
|
Frames pushed out of the queue, or waiting when the source was replaced or dropped |
|
uint64 |
|
Frames that could not be read |
|
uint64 |
|
Frames lost before they arrived |
|
uint64 |
|
Reading time of all frames read, summed, microseconds |
The inputs of control/subscribe start with what is applied, and only control/subscribe/execute
applies them. control/subscribe/execute is refused for stream mode without an address or a queue size
outside 1-64, control/unsubscribe/execute for an address that is not the source. When
<module-id>.json cannot be written, both answer DL_CREATION_FAILED (on a PC CreationFailed)
and change nothing.
The result flatbuffer
output/result is registered as
types/hdvisionsystems/lumiscan-text-reader/text_read_result.
| Field | Type | Description |
|---|---|---|
|
string |
The whole reading, lines separated by newlines. Not filtered by |
|
string |
One recognised word |
|
float |
Its confidence, 0 to 1 |
|
int |
Box around the word, in the coordinates of the region that was read |
|
int |
|
|
int |
|
|
int |
|
|
uint |
How many words are reported |
|
float |
Average confidence over the reported words; 0 when there are none |
|
float |
The threshold that was applied |
|
string |
The language actually used |
|
string |
The engine actually used |
|
string |
The layout actually used |
|
uint |
The region that was read |
|
uint |
|
|
ulong |
Microseconds since the epoch, when the reading finished |
control/subscribe/output/stream/result is registered as
types/hdvisionsystems/lumiscan-text-reader/stream_texts: a hdv.stream.StreamTexts with lineage,
where the frame came from, and result, the table above.
Starting from an Example (PC)
On a PC, the Text Reader writes an example of its settings into a folder of your choice, and ends without starting. On Windows:
lumiscan-text-read --generate-settings C:\work\text-reader-settings
Without a folder (-g alone) it writes into the current folder. The example is the application settings
file lumiscan-text-reader.json, which names the module module-1, and the module file module-1.json
beside it: every input of read-text with the value it has by default, except the image address, which
is the Cam Driver’s camera1.
Beside them, in schemas/, are the schemas the two files name in "$schema": lumiscan-text-reader.schema.json,
lumiscan-text-reader-module.schema.json, and stream.schema.json for the stream section of a module file. They
describe every key the Text Reader reads - each input of read-text with its type, its default and the
range a run accepts - so an editor that understands JSON Schema can check the files and show what each
value means. Copy the schemas folder along with the files: system/save-module-inputs keeps the
"$schema" of a module file it saves.
Existing files are never overwritten: when one of them is in the folder already, nothing is written and the
Text Reader says which.
The Text Reader then names the folder it reads its settings from, on Windows by default
C:\ProgramData\HD Vision Systems GmbH\LumiScan Vision Suite\lumiscan-text-read\etc\lumiscan-text-reader.
Edit the example, copy it there, and start the Text Reader. See also
Where the files are.