Reading a Code
A run has two steps: say which image to read, then call execute. All paths below are relative to the
application’s base path, hdvisionsystems/lumiscan-qr-code-reader.
1. Point the reader at an image
Write the address of the image node to input/image-address:
hdvisionsystems/lumiscan-cam-driver/camera1/output/image
This is the address of the image node itself, not of its data child — the reader appends /data,
/width, /height and /pixel-type when it reads.
The address is remembered, so it only needs setting again when the image source changes.
2. Call execute
Write an empty value to the execute method.
The call is blocking: it returns when the search has finished. When it returns, output/results
holds every QR code found in that image — see The Result.
What a run does
-
Reads the address from
input/image-address. -
Reads
data,width,heightandpixel-typefrom that address, and converts the pixels to an image — de-Bayering it if the format calls for that. -
Searches the whole image for QR codes.
-
Writes every code it found to
output/results.
There is no region of interest and no partial search: each run reads the entire current contents of the image node.
When a run fails
A run fails if the image cannot be read — no address set, an address that does not resolve, a missing
or short data buffer, or a pixel format the reader does not support. The reason is written to the
application log.
|
A failed run leaves An empty |