FAQ
Short answers to common questions about LumiScan Template Finder. Each entry links to the page with the details.
Each entry has a fixed anchor (for example #faq-pixel-formats). Problems, error messages and status codes are described step by step in Troubleshooting.
|
Requirements and setup
On which platforms does the Template Finder run, and which Data Layer does it use?
- Answer
-
On ctrlX OS (ctrlX CORE or ctrlX IPC) it uses the ctrlX Data Layer; on a PC with Windows 11 or Ubuntu 24.04 it uses LumiScan Keryx, the Data Layer of HD Vision Systems for PCs. The node addresses, types and the way the methods are called are the same on both, so a program written against one works against the other. Only the names of the results of a method call differ, for example
DL_TOO_MANY_OPERATIONSon the ctrlX Data Layer andTooManyOperationson LumiScan Keryx. - More
Which image source does the Template Finder need?
- Answer
-
The application does not talk to a camera itself. It reads the image node of another application that runs on the same device - the same ctrlX CORE or ctrlX IPC, or the same PC (remote Data Layer access is not supported), normally LumiScan Cam Driver, for example
hdvisionsystems/lumiscan-cam-driver/camera1/output/image. Any application works if its image node providesdata(raw, uncompressed uint8 pixel data),width,heightandpixel-type(GenICam pixel format name). An address inside the Template Finder itself is rejected with status code-2. - More
Which pixel formats are supported?
- Answer
-
Mono8,Mono12,RGB8,RGB12,BGR8,BGR12,BayerGR8,BayerGR12,BayerRG8andBayerRG12. Bayer images are converted to colour and 12-bit images are scaled down to 8 bit before matching, so templates cut from one format still match images of another. Any other pixel format is rejected with status code-3. - More
Templates
How do I create a template from a live camera image?
- Answer
-
Use
system/create-template, which is application-wide: it cuts a region out of the current image and saves it as a PNG that every module can use:-
Make sure the camera application has captured an image.
-
Set
system/create-template/input/input-image-address, the fourinput/crop/values (widthandheightmust be greater than 0) andinput/template-name. Use a lower case name;.pngis added if you give no extension. -
Write to
system/create-template/executeand readoutput/status-code. On1,output/template-pathnames the file, for exampletemplates/screw.png. -
On
-5, the region does not fit the image;output/status-textnames the actual image size. -
The file is written as 8-bit RGB PNG, whatever the camera’s pixel format. An existing file with the same name is overwritten without warning.
-
- More
-
Creating a Template, How To: Match a Part from a Camera Image
Where are templates stored, and can I upload one prepared on a PC?
- Answer
-
Templates are PNG files in the
templatesfolder of the application’s configuration directory, created at first start. A template added by hand is read on the next search, without a restart.-
On ctrlX OS the directory is part of the active solution (
/var/snap/rexroth-solutions/common/solutions/activeConfiguration/lumiscan-template-finder), so templates are exported and restored with the solution. A prepared PNG (8-bit RGB or grayscale) can be uploaded into it through the ctrlX web interface. -
On a PC a prepared PNG is copied into the folder. On Windows the directory is
%APP_RESOURCE_DIR%\etc\lumiscan-template-finder, or withoutAPP_RESOURCE_DIRC:\ProgramData\HD Vision Systems GmbH\LumiScan Vision Suite\lumiscan-templ-find\etc\lumiscan-template-finder. -
To use another folder, write
system/set-template-dir/input/template-dir, executesystem/set-template-dirand check that its status code is1. The folder must already exist; an absolute path or one leading outside the configuration directory is rejected with-2.
-
- More
Searching and tuning
How do I run a search and read the result?
- Answer
-
Set
find-template/input/input-image-addressandfind-template/input/template-name(as listed onsystem/templates), write tofind-template/executeand readfind-template/output/status-code. The write is blocking and returns when the search has finished. On1, readoutput/result:matchesis sorted by confidence, somatches[0]andbest_scoregive the best match. Each match has anoriented_bounding_box(center_x,center_y,width,heightin pixels,anglein degrees),confidence,scaleandrotation. An emptymatcheslist with status1is a normal result: the part was not found. - More
How can I make the search faster?
- Answer
-
-
Search only as wide a scale and rotation range as the parts actually vary, with a coarse step.
-
Raise
input/preprocess/bin-sizeto2(roughly four times faster) and check the confidence is still acceptable. Small or thin templates should stay at1. -
Keep
input/use-grayscaleattrue(roughly three times faster than matching each colour channel); turn it off only when colour distinguishes the part. -
Limit the search to a region with
input/crop/.
-
- More
How do I search only part of the image, and which frame are the positions in?
- Answer
-
Set
find-template/input/crop/(startX,startY,width,height). A zero width or height reaches the right or bottom edge, so all zero searches the whole image. A region reaching past an edge is refused, not trimmed, with a message such ascrop/startX + crop/width (100 + 541 = 641) exceeds the image width 640.input/result-coordinatedecides the frame of the positions:IMAGE(default, the full image, usable directly for a robot pick) orCROP(the searched region, top left corner (0,0)). - More
Can the Template Finder search every frame a camera streams?
- Answer
-
Yes, as an experimental feature. A module subscribes to one camera’s stream and searches each frame with the inputs of
find-template(all butinput/input-image-address), publishing one result per frame on<module-id>/control/subscribe/output/stream/result:-
Make sure the Cam Driver’s stream runs.
-
Write the camera’s stream folder, for example
hdvisionsystems/lumiscan-cam-driver/camera1/control/publish/output/stream, to<module-id>/control/subscribe/input/address. -
Set
control/subscribe/input/enabletotrueand write tocontrol/subscribe/execute. Writingenablealone starts nothing. -
Wait until
control/subscribe/output/stream/activeistrue. -
What
control/subscribe/executeapplies is saved in<module-id>.json, so a module that streamed streams again after a restart. For a PLC, switch oncontrol/subscribe/input/keep-latest-outputand readfind-template/output/result.
-
- More
-
Finding Templates on an Image Stream (Experimental), Streams (Experimental)
Status codes and errors
How do I know whether an operation worked, and where is the reason for a failure?
- Answer
-
Check the sign of
output/status-code: greater than 0 is success,0means the operation has not run since the application started, less than 0 means it failed and produced nothing. The reason is onoutput/status-text, which starts withok:orerror:. A failed write toexecuteitself answers only with a status code (over REST, a bare400), so readoutput/status-textafterwards. The same text is written to the application log: on ctrlX OS in the ctrlX Logbook or withjournalctl, on a PC in the application’s console output.-1(busy) means another operation of the same module was still running; nothing was done, so try again when it has finished. - More
Troubleshooting
Problems and error messages are described step by step in Troubleshooting:
Licensing and support
Which licence do I need, and how many modules does it cover?
- Answer
-
One licence covers ten modules; the eleventh module acquires a second licence of the same key, and a module is refused with status
-11when no licence on the device covers it. Purchase routes:-
Bought from HD Vision Systems: the licence is on a LumiScan Key (Windows 11 or Ubuntu 24.04). One LumiScan Key is needed per device running the software at the same time; keys can be exchanged between devices.
-
Bought in the ctrlX Store for Windows 11: ctrlX WORKS plus a LumiScan Key.
-
Bought in the ctrlX Store for ctrlX OS (ctrlX CORE or IPC): a ctrlX licence, no key.
-
- More
Where can I find more answers or get support?
- Answer
-
See the site-wide LumiScan FAQ. Contact HD Vision Systems customer success at customer.success@hdvisionsystems.com or +49 6221 6721905; for licences, licenses@hdvisionsystems.com. Before reproducing a problem for a support report, set
logLeveltoTRACEin thesystemblock oflumiscan-template-finder.jsonand restart the application. - More