Data Layer Reference
Complete node listing. All paths start with:
hdvisionsystems/lumiscan-template-finder/
Data Layer
LumiScan Template Finder offers its functions on the Data Layer under hdvisionsystems/lumiscan-template-finder.
On ctrlX OS (ctrlX CORE or ctrlX IPC), LumiScan Template Finder uses the ctrlX Data Layer.
On a PC with Windows 11 or Ubuntu 24.04, LumiScan Template Finder uses LumiScan Keryx.
The node addresses, types and call patterns are the same on both. LumiScan Template Finder 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.
Address pattern
hdvisionsystems/lumiscan-template-finder/
├── system/ application-wide management
│ ├── modules
│ ├── template-dir the one directory templates live in
│ ├── templates what is in it
│ ├── set-template-dir/
│ ├── create-template/ application-wide, not per module
│ ├── create-module/
│ ├── remove-module/
│ ├── save-current-modules/
│ ├── save-module-inputs/
│ └── meta/subscription-schema what the stream's source must hold
└── <module-id>/ one per configured instance, e.g. module-1
├── find-template/
│ ├── execute
│ ├── input/...
│ └── output/{result, status-code, status-text}
├── control/subscribe/ the image stream (experimental)
│ ├── execute
│ ├── input/{enable, address, tag, queue-size, keep-latest-output}
│ └── output/stream/...
├── control/unsubscribe/{execute, input/address}
└── setting/{stream, settings-hash}
Every operation has execute, output/status-code and output/status-text. Anything else under
output/ is present only where the operation has more to report.
|
A fresh installation serves one module, |
system
| Node | Type | Description |
|---|---|---|
|
string array |
The modules that currently exist |
|
string |
Directory every module reads templates from and writes them to, relative to the configuration
directory. Read-only - change it with |
|
string array |
Templates available in that directory, without the |
|
method |
Point the application at another template directory |
|
string |
Directory to switch to. It must already exist |
|
method |
Cut a template out of a live image and save it into |
|
method |
Create a module and its node subtree |
|
string |
Name of the module to create |
|
method |
Remove a module and its node subtree |
|
string |
Name of the module to remove |
|
method |
Persist the module list, so the same modules return after a restart |
|
method |
Persist one module’s inputs |
|
string |
Module whose inputs to persist |
|
string |
What the node a module subscribes to must hold, as a JSON Schema (draft-04) of its JSON form: here
a |
<module-id>/find-template
Inputs
| Node | Type | Default | Description |
|---|---|---|---|
|
string |
(empty) |
Address of the image node to search |
|
string |
(empty) |
Template to search for, as listed on |
|
uint16 |
|
Left edge of the region to search, pixels |
|
uint16 |
|
Top edge of the region to search, pixels |
|
uint16 |
|
Width of the region. |
|
uint16 |
|
Height of the region. |
|
string |
|
|
|
double |
|
Smallest scaling factor |
|
double |
|
Largest scaling factor |
|
double |
|
Increment between scales |
|
double |
|
Smallest rotation, degrees |
|
double |
|
Largest rotation, degrees |
|
double |
|
Increment between rotations, degrees |
|
double |
|
Minimum acceptable score, 0-1 |
|
string |
|
Matching algorithm |
|
bool |
|
Match on grayscale |
|
double |
|
Blur strength in X; 0 or less disables |
|
double |
|
Blur strength in Y; 0 means same as X |
|
uint32 |
|
Blur kernel width; 0 derives from strength |
|
uint32 |
|
Blur kernel height; 0 derives from strength |
|
int32 |
|
Downsample factor; 1 disables |
<module-id> image stream (experimental)
The addresses below are relative to <module-id>/, beside find-template/. The stream searches each
frame with the inputs of find-template, all but input/input-image-address. See
Finding Templates on an Image Stream.
Inputs
| Node | 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 searched, 1-64 |
|
bool |
as applied |
|
|
string |
(empty) |
The source to drop, as |
Methods
| Node | Type | Description |
|---|---|---|
|
method |
Check the inputs of |
|
method |
Drop the source named by |
Settings and outputs
| Node | Type | Description |
|---|---|---|
|
as the inputs |
What |
|
string |
Hash of what the results are made with, 16 hex digits. Read-only |
|
bool |
|
|
flatbuffer |
One |
|
string |
Why the last frame that could not be searched failed, naming the source by its address |
|
uint64 |
Milliseconds since the stream started |
|
uint64 |
Frames the subscription delivered |
|
uint64 |
Frames searched, 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 searched |
|
uint64 |
Frames lost before they arrived |
|
uint64 |
Search time of all searched frames, 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 (Rejected, ctrlX:
DL_INVALID_VALUE). When <module-id>.json cannot be written, both answer CreationFailed (ctrlX:
DL_CREATION_FAILED) and change nothing. The stream nodes are the same in every consumer, see
Streams.
system/create-template
Inputs
| Node | Type | Default | Description |
|---|---|---|---|
|
string |
(empty) |
Address of the image node to cut from |
|
int32 |
|
Left edge of the region, pixels |
|
int32 |
|
Top edge of the region, pixels |
|
int32 |
|
Width of the region, pixels |
|
int32 |
|
Height of the region, pixels |
|
string |
(empty) |
Name to save under, inside |
Result flatbuffer
output/result is a hdv.template_match.Result:
| Field | Type | Description |
|---|---|---|
|
array of |
One entry per occurrence, sorted by confidence |
|
ulong |
Index of the best match; always 0 |
|
float |
Confidence of the best match; 0.0 if none |
|
string |
Template used |
|
string |
Algorithm used |
|
float |
Threshold applied |
|
uint |
Width of the searched image |
|
uint |
Height of the searched image |
|
ulong |
Microseconds since the epoch |
Match:
| Field | Type | Description |
|---|---|---|
|
struct |
|
|
float |
Score, 0-1 |
|
float |
Scaling factor of this match |
|
float |
Rotation of this match, degrees |
control/subscribe/output/stream/result is a hdv.stream.StreamTemplateMatches
(stream_template_matches, registered as
types/hdvisionsystems/lumiscan-template-finder/stream_template_matches): lineage, where the frame
came from, and result, the hdv.template_match.Result above.
Image node expected at input-image-address
The address must name an image node of another application on the same device - the same ctrlX CORE or ctrlX IPC, or the same PC - providing:
| Child | Type | Description |
|---|---|---|
|
array of uint8 |
Raw pixel data |
|
uint64 |
Width in pixels |
|
uint64 |
Height in pixels |
|
string |
GenICam pixel format name |
An address inside this application is rejected with status code -2.
Status codes
See Execution Status for the full table.
Negative is always an error; 0 means not yet run; positive means success. These are the finders'
own codes, not the module status of the other LumiScan apps, see
Execution status of the finders.