Data Layer Reference
Every address below is relative to
hdvisionsystems/lumiscan-area-detector/
Data Layer
LumiScan Area Detector offers its functions on the Data Layer under hdvisionsystems/lumiscan-area-detector.
On ctrlX OS (ctrlX CORE or ctrlX IPC), LumiScan Area Detector uses the ctrlX Data Layer.
On a PC with Windows 11 or Ubuntu 24.04, LumiScan Area Detector uses LumiScan Keryx.
The node addresses, types and call patterns are the same on both. LumiScan Area Detector 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 |
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.
Per-module nodes
All addresses below are under <module-id>/detect-area/.
Used by every method
| Address | Type | Default | Description |
|---|---|---|---|
|
method |
- |
Run one detection |
|
string |
(empty) |
Address of the image node to search |
|
string |
FIXED |
|
|
uint16 |
0 |
Left edge of the region to search |
|
uint16 |
0 |
Top edge |
|
uint16 |
0 |
Width; 0 reaches the right edge |
|
uint16 |
0 |
Height; 0 reaches the bottom edge |
|
string |
NONE |
|
|
float64 |
1.0 |
Must be > 0 |
|
float64 |
0.0 |
0 means equal to sigma-x |
|
uint32 |
0 |
0 computes it from the sigma, else odd |
|
uint32 |
0 |
0 computes it from the sigma, else odd |
|
float64 |
1.0 |
Must differ from sigma-second |
|
float64 |
2.0 |
Must differ from sigma-first |
|
uint32 |
0 |
0 computes it from the sigma, else odd |
|
uint32 |
0 |
0 computes it from the sigma, else odd |
|
uint32 |
3 |
Must be 1, 3, 5 or 7 |
What counts as a region
| Address | Type | Default | Description |
|---|---|---|---|
|
boolean |
false |
Dark regions on a light background |
|
int32 |
8 |
4 or 8; 8 joins diagonal neighbours |
|
boolean |
false |
Measure a region as the shape its outline encloses |
There is no area window to configure. Every region the detector separated is reported, however small
or large, and whether one of them is too small to be a part or too large to be a single one is a
decision about the parts — which belongs to whoever reads output/result.
The threshold
| Address | Type | Default | Description |
|---|---|---|---|
|
float64 |
128 |
The level itself, 0-255 |
The folder keeps its name so the address survives if the methods that took their level from the image come back.
Outputs
| Address | Type | Description |
|---|---|---|
|
flatbuffers |
Regions of the last run |
|
int16 |
Outcome as a number |
|
string |
Outcome in words |
|
image ( |
Mono16, one region number per pixel; 0 is background |
The label image is whole-frame and holds the blobs[].label numbers, so a reported area can be traced
to the pixels it was measured from. It is emptied when the next run starts. See
The Label Image.
Analysing a scene
Under system/analyse-scene/ - it describes a picture, not a module. See
Analysing a Scene.
| Address | Type | Default | Description |
|---|---|---|---|
|
method |
- |
Measure the image and report what a fixed level would have to be |
|
string |
(empty) |
The image node to analyse; its own, not a module’s |
|
uint16 |
0 |
The region to analyse; all zero is the whole image |
|
int32 |
0 |
Measure a shrunk copy; 0 shrinks only what needs it, 1 forces full size |
|
int32 |
256 |
Buckets in |
|
uint32[] |
(empty) |
Pixels per grey bucket, darkest first, at full size |
|
string[] |
(empty) |
|
|
string[] |
(empty) |
Why, in words, with the numbers in them |
|
boolean |
false |
Whether the regions are darker than their background |
|
boolean |
false |
Whether regions are really several parts stuck together |
|
int32 |
0 |
Regions found |
|
int32 |
0 |
How many parts those regions look like they hold |
|
float64 |
0 |
[grey levels] Background variation across the frame |
|
float64 |
0 |
How cleanly the picture splits, 0 to 1 |
|
float64 |
0 |
[pixel] Half the width of a typical feature |
|
float64 |
0 |
[per grey level] How much the area moves with the threshold. Smaller is better; above |
Per-module image stream nodes (experimental)
All addresses below are under <module-id>/, beside detect-area/. The stream searches each frame
with the inputs of detect-area, all but input/input-image-address, and publishes the
measurements only: there is no stream counterpart of output/blob-labels. See
Detecting Areas on an Image Stream.
| Address | Type | Default | Description |
|---|---|---|---|
|
boolean |
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 |
|
boolean |
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 |
|
boolean |
false |
|
|
flatbuffers |
empty |
One |
|
string |
(empty) |
Why the last frame that could not be searched failed, naming the source by its address |
|
uint64 |
0 |
Milliseconds since the stream started |
|
uint64 |
0 |
Frames the subscription delivered |
|
uint64 |
0 |
Frames searched, each with a result |
|
uint64 |
0 |
Frames pushed out of the queue, or waiting when the source was replaced or dropped |
|
uint64 |
0 |
Frames that could not be searched |
|
uint64 |
0 |
Frames lost before they arrived |
|
uint64 |
0 |
Detection 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. When
<module-id>.json cannot be written, both answer DL_CREATION_FAILED (on a PC CreationFailed)
and change nothing.
The result flatbuffer
output/result carries hdv.area_detect.Result:
| Field | Type | Meaning |
|---|---|---|
|
Blob[] |
All regions, sorted by area descending |
|
float |
[pixel] Centre of the region |
|
float |
[pixel^2] Pixels the region covers, counted |
|
uint |
Which region this is in |
|
int |
Tight box around the region |
|
uint |
Number of regions |
|
float |
[pixel^2] Sum over all regions |
|
ulong |
Index of the largest region |
|
float |
[pixel^2] Its area |
|
uint |
The frame the coordinates are in |
|
string |
NONE, LOG, DOG or DOH, as applied |
|
ulong |
Microseconds since epoch |
control/subscribe/output/stream/result carries hdv.stream.StreamAreas (stream_areas, registered as
types/hdvisionsystems/lumiscan-area-detector/stream_areas): lineage, where the frame came from,
and result, the hdv.area_detect.Result above. Its blobs[].label has no label image to look up.
Configuration file
The application settings file is lumiscan-area-detector.json in the application’s configuration
directory:
| Platform | File |
|---|---|
ctrlX OS |
|
PC (Windows) |
|
{
"system": { "logLevel": "INFO" },
"modules": [ { "id": "module-1", "advanced": false } ]
}
logLevel accepts TRACE, DEBUG, INFO, WARN, ERROR, FATAL and OFF, read at startup. Each
module’s saved settings are in <module-id>.json beside it, and so are its image stream’s mode,
source, queue size and keep-latest-output, under stream.
Starting from an Example (PC)
On a PC, the Area Detector writes an example of its settings into a folder of your choice, and ends without starting. On Windows:
lumiscan-areadetect --generate-settings C:\work\area-detector-settings
Without a folder (-g alone) it writes into the current folder. The example is the application settings
file lumiscan-area-detector.json, which names the module module-1, and the module file
module-1.json beside it: every input of detect-area 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-area-detector.schema.json,
lumiscan-area-detector-module.schema.json, and stream.schema.json for the stream section of a module file. They
describe every key the Area Detector reads - each input of detect-area 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
Area Detector says which.
The Area Detector then names the folder it reads its settings from, on Windows by default
C:\ProgramData\HD Vision Systems GmbH\LumiScan Vision Suite\lumiscan-areadetect\etc\lumiscan-area-detector.
Edit the example, copy it there, and start the Area Detector. See also
Where the files are.