Description

LumiScan Template Finder locates a known part inside a camera image. You give it a small picture of the part - the template - and it reports where that part appears in a larger image, how confident the match is, and at what scale and rotation it was found.

Typical uses are presence checks, position feedback for a robot pick, and orientation checks before an assembly step.

The application runs on ctrlX OS (ctrlX CORE or ctrlX IPC), where it uses the ctrlX Data Layer, and on a PC with Windows 11 or Ubuntu 24.04, where it uses LumiScan Keryx. Its nodes, and how they are called, are the same on both. See Data Layer Reference.

What is the same for every LumiScan app - how addresses are built, the handshake, execute and stream call patterns, status codes, settings and tools - is described in the LumiScan Keryx manual. This manual covers only what is specific to LumiScan Template Finder; its own nodes are listed in the Data Layer Reference.

What the application does

The application provides two operations.

Creating a template cuts a rectangular region out of a live camera image and saves it as a PNG in the application’s configuration directory. This is how you produce a template from the real camera, in the real lighting, at the real working distance - no file transfer and no image editor needed. See Creating a Template.

Finding a template searches a live camera image for that template and reports every occurrence it finds. See Finding a Template.

Both operations read the image from another application’s Data Layer image node - normally LumiScan Cam Driver - at the moment they are called, so they always work on the current image. A module can also search every frame a camera streams, see Finding Templates on an Image Stream (Experimental).

Where the images come from

The application does not talk to a camera itself. It is given the address of an image node published by another application:

hdvisionsystems/lumiscan-cam-driver/camera1/output/image

That keeps the two concerns apart: the camera application owns triggering and exposure, this application owns matching. It also means the same image can be used by several applications at once, and that you can point the template finder at a different camera by changing one string.

Modules

A configuration of the application is a module, with its own template, its own search parameters and its own results, under its own address:

hdvisionsystems/lumiscan-template-finder/module-1/

A fresh installation serves one module, module-1, and further modules can be created while the application runs, so one installation can serve several camera configurations at once.

On ctrlX OS, one licence covers ten modules. The eleventh acquires a second licence of the same key.

Modules are independent, except that they share one template directory - so a template created by one module can be used by all of them. Their settings, and the module list itself, can be saved so they return after a restart. See Module Management.

What a result contains

A successful search reports, for every occurrence found:

  • the oriented bounding box - centre, width, height and angle in the image

  • the confidence, between 0 and 1

  • the scale and rotation the match was found at

Results are sorted by confidence, so the best match is always the first entry. Every operation also reports a numeric status code and a status message, which is how a PLC checks whether the run succeeded - see Execution Status.