The Result
output/results is a flatbuffer holding one entry per Aztec code found, in the registered type
types/hdvisionsystems/lumiscan-aztec-code-reader/code_detect_result.
The root is an array — CodeDetectResultArray.results — so a run that found nothing publishes an
empty array rather than an error.
What each entry holds
| Field | Type | Description |
|---|---|---|
|
|
The centre of the code in the image, in pixels |
|
string |
The decoded contents of the code |
|
float |
How confident the read is |
|
array of |
The corner points outlining the code in the image |
Point2f is a pair of floats, x and y, in image pixel coordinates. The coordinates are floats
because a code’s centre and corners rarely land exactly on a pixel boundary.
Reading it over REST
Over the ctrlX REST API a flatbuffer arrives as JSON, and its numbers come back quoted — a float is a string in the response. Parse them as numbers on your side rather than comparing them as text.
center and text are always present. polygons may be absent for an entry, so treat a missing
outline as "no outline given" rather than as an error.
Drawing it
To see the codes on the image rather than reading coordinates, open LumiScan Cockpit. It draws a
rectangle around each code, labelled with the decoded text and the score, in a view named
aztec-code.
A code that was located but not decoded has no text, and Cockpit labels it with its score alone.