System designHow-to

One reference image for multiple pattern matching tools

Pin one reference image on your vision sensor and point your multiple pattern tools at it, so a retrain updates every tool from the same stored frame.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Know the default: every tool already trains from the same live frame
  2. 02What you need before you pin a reference image
  3. 03Pin one stored reference image and point every tool at it
  4. 04Sizing the latch: one 5 MP mono reference frame across sixteen tools
  5. 05Prove it worked
  6. 06Common mistakes
  7. 07When the job outgrows the sensor
  8. 08Quick checklist
  9. 09Questions

Sixteen pattern tools on one vision sensor, and every one of them holds its own trained copy of the same part. When the part's appearance changes, updating sixteen tools one by one costs an afternoon. There is a cleaner arrangement, and your sensor already does half of it by default. A pattern tool trains from whatever image its image input carries, and by default that input is the current live frame, so every tool in the job can already share one reference image. This guide shows both ways to use that: retrain all sixteen tools from a single live golden frame, or pin one stored reference image into a spreadsheet cell that every tool reads — with the memory math that decides which one fits your hardware.

Know the default: every tool already trains from the same live frame

In a spreadsheet-style vision job, each tool takes its input image from a cell. Jobs wire that image input to the live acquisition cell by default — the cell that fills on every trigger, A0 in a typical layout. When you open a pattern tool's property sheet and accept it, the tool retrains from whatever that input cell holds at that moment. No upload, no import: the current frame becomes the trained pattern.

That gives you the quick version of a shared reference. Stage the golden part, lock the lighting, trigger once, then walk the sixteen tools and accept each one. Every tool now trains from the same frame, captured under the same conditions, and you never handled an image file. Jobs built in a point-and-click editor sometimes pass the image through a helper cell on the way; it still resolves to the live frame, so the walk works the same.

Copying and pasting a trained tool also carries the pattern along — handy for identical regions, but it multiplies the update problem instead of solving it. A shared input cell is the real fix.

What you need before you pin a reference image

  • A golden part and a locked station: the lighting settings, exposure, lens, focus and working distance you run in production. Pattern tools tolerate only small scale and brightness shifts between trained pattern and live part — a few percent — so a reference captured at a different zoom or light level reads as a different part. The lighting for AI vision training guide covers the lighting lock, and scale invariance in pattern matching gives the numbers behind that few percent.
  • Access to the job's spreadsheet view, not just the guided editor. You will edit one function call and sixteen cell references.
  • A saved backup of the current job before you rewire anything.
  • Ten minutes with the line offline or the job offline.

The whole job lives on the sensor: acquisition, the sixteen tools and, in a minute, one latched reference cell. A 5 MP global-shutter vision sensor with an M12-mount lens on Fast Ethernet is the classic carrier for a job this size, and the MV-SC3050XC-16M-ATN-H is that class of part.

Smart cameras & vision sensorsHikrobot MV-SC3050XC-16M-ATN-H 5 MP color vision sensorMV-SC3050XC-16M-ATN-H
Interface
Fast Ethernet
Resolution
5 MP
Sensor format
1/1.45"
Shutter
Global
$1,809.00View part

Working in mono keeps the stored frame light — one byte per pixel instead of three. The MV-SC5060XM-08M-WBN is a 6 MP mono smart camera on GigE with an M12 mount.

Smart cameras & vision sensorsHikrobot MV-SC5060XM-08M-WBN SC5000X series Smart Camera, 6 MP, Mono, 8 mm focal length, M12-mountMV-SC5060XM-08M-WBN
Interface
GigE
Resolution
6-10 MP
Sensor format
1/2.4"
Shutter
Rolling
$1,629.00View part

Pin one stored reference image and point every tool at it

The live-frame walk retrains everything, but the reference exists only while the golden part sits in front of the camera. Pinning the frame into a cell decouples the two: the stored image survives production traffic, and any tool you retrain later reads the pinned frame rather than whatever is on the belt.

  1. Stage the golden part under locked conditions and trigger one frame, so the live acquisition cell holds the golden image.
  2. Create a manual-event cell — a button you press — and a latch cell that stores the live image when that button fires. Spreadsheet environments expose this as an image-latch function, LatchImage in the common function lists: its event argument points at the button cell, its image argument at the acquisition cell.
  3. Press the button once and confirm the latch cell now holds the golden frame. The thumbnail should stay put while live frames keep flowing on every trigger.
  4. Rewire each pattern tool's image input from the acquisition cell to the latch cell. Sixteen edits, all the same address.
  5. Retrain each tool from the pinned frame: open its property sheet, set the train region and acceptance parameters, and accept. Tighten the train region around the feature and mask the background where you can — masking background regions steadies the match score.
  6. Gate the latch event before the job runs again: disable the button cell or require a maintenance-mode flag, so nothing can fire the latch during production.
  7. Save the job, cycle power, reload, and confirm the latch cell restored its frame. Then run a 20-part regression and compare scores and cycle time against your pre-change baseline.

Sizing the latch: one 5 MP mono reference frame across sixteen tools

Inputs first, with where each comes from. The array: 2,592 × 1,944 pixels, a typical 5 MP-class array — illustrative, and some 5 MP sensors differ slightly, which moves the total by a few percent. The pixel format: 8-bit mono, one byte per pixel, the case of the mono camera above. The tool count: sixteen, the job size this guide targets.

The rule: a latched frame costs its raw pixel data, once per cell that holds it.

bytes per frame = width × height × bytes per pixel MB = bytes / 1,000,000

The arithmetic:

  • 2592 px × 1944 px = 5,038,848 pixels
  • 5,038,848 pixels × 1 byte = 5,038,848 bytes ≈ 5.0 MB per latched frame
  • one shared latch cell, referenced by sixteen tools: 5.0 MB, held once
  • sixteen separate latched copies: 16 × 5.0 MB ≈ 80.6 MB, held every cycle
  • color at three bytes per pixel triples the frame: about 15.1 MB

The decision: latch one frame and share it. Five megabytes fits sensor-class working memory with room to spare; eighty megabytes of per-tool copies is the pattern that stalls small sensors in the field. The working threshold: more than about three latched frames — roughly 15 MB — means move the reference store to a vision controller. Cropping the latch region scales with area, so a half-width, half-height crop stores 1296 px × 972 px = 1,259,712 bytes ≈ 1.3 MB, worth it when fixturing tolerates the smaller frame.

Prove it worked

  • Address check: with the job offline, open each tool's property sheet and confirm the image input reads the latch cell, not the acquisition cell. Sixteen identical addresses is the pass condition.
  • Type check: the latched frame must arrive in the format the tool expects. A mono tool fed a color frame, or an 8-bit tool fed 16-bit data, fails before matching starts — image-type and bit-depth mismatches are their own error class.
  • Persistence check: save, power-cycle, reload, open the latch cell. The golden thumbnail must still be there.
  • Display check: confirm the image you watch is the image the tools read — what a connected HMI paints is not always the cell the job computes on, as what displays live in a PLC HMI explains.
  • Regression check: 20 parts, with scores and cycle time inside your baseline band.

Common mistakes

  1. A latch copy per tool. It saves nothing and multiplies the memory bill by sixteen — about 80 MB in the worked example above. One cell, sixteen references.
  2. Cropping the latch region without checking fixturing. A tight crop stores about 1.3 MB instead of 5.0 MB, but it also shifts the pixel origin your fixturing measures from, and it can leave the trained pattern too small to score. If positions drift after the crop, start at the pattern matching reference coordinate system, and a template-too-small error means the crop went too far — the ROI size fix covers it.
  3. Retraining while the wrong frame is current. The accept click trains from the input cell's frame at that moment. On the live-frame path, verify the golden part is still in view before the walk; one missed part and tool seven learns the wrong surface.
  4. Updating the reference without updating conditions. A new golden image captured at a different exposure or working distance drops every retrained tool's score together — a clear symptom, once you know it. Re-check lighting, exposure and focus before blaming the matching.
  5. Hand-editing the wiring, then going back to the guided editor. Once image inputs are hand-rewired, treat the job as a spreadsheet job; the guided editor expects to own the wiring.

When the job outgrows the sensor

On the sensor, the comfortable reference budget is a few latched frames. Past that — a reference library per product, image history for audits, versioned golden sets — run the tools where that memory exists. A vision controller keeps the same tool set and holds the reference library in PC-class RAM instead of sensor working memory.

The MV-VC2140-128G40-1T pairs an Intel N-series processor (N97) with 8 GB of RAM, a 128 GB SSD and a 1 TB HDD, plus four built-in light channels for the illumination loop.

Vision controllersHikrobot MV-VC2140-128G40-1T VC2100 Vision Controller, N97, 8GB+128G SSD+ 1THDDMV-VC2140-128G40-1T
LAN ports
3-4 LAN ports
USB 3 ports
2 USB 3 ports
Light outputs
4 built-in channels
Memory
8 GB
$1,679.00View partBuild a system with it

The vision controllers category lists the current series; for on-sensor jobs, the smart camera and vision sensor finder filters by shutter, mount and resolution.

Quick checklist

  • Golden part staged; lighting, exposure, focus and working distance locked — the reference is only as repeatable as the conditions it was captured in.
  • One trigger fired, and the acquisition cell verified to hold the golden frame.
  • Latch cell created; button pressed once; thumbnail confirmed stable while live frames flow.
  • All sixteen tool image inputs rewired to the latch cell — sixteen identical addresses.
  • Latch event gated; job saved; power-cycle test passed.
  • 20-part regression compared against baseline scores and cycle time.

Set up this way, updating the reference is one button press with a fresh golden part in view, then a retrain walk — one image, sixteen tools, no uploads. For help sizing the hardware or wiring a specific job, contact the applications team.

Questions

Does each pattern tool need its own copy of the training image?

No. Every tool reads its image input from a cell address, so one cell serves any number of tools. What multiplies is the wiring, not the training: each of the sixteen tools needs its image input pointed at the shared cell. Per-tool copies are what hurt you later, because a sensor holds a few latched frames comfortably, not one per tool.

What happens to the latched image after a power cycle?

The latch stores the frame inside the job's data, so the reference comes back with the job when the sensor restarts. Prove it once on your own job: save, power down, restart, and open the latch cell to confirm the golden thumbnail is still there. If your environment does not preserve it, keep the golden part and your locked setup so you can re-latch in a minute.

How many latched frames can a vision sensor hold?

Treat the comfortable budget as one to three frames on a sensor. At 5 MP mono a frame is about 5 MB, so sixteen per-tool copies would be around 80 MB of working memory, which is the pattern that stalls small sensors. If the job needs a real library of reference frames, run the tools on a vision controller, where 8 to 32 GB of RAM is standard.

Why did match scores drop after I retrained from a new golden image?

Usually the conditions moved between golden sessions, not the algorithm. Check in order: lighting drift or a changed diffuser, exposure or gain, focus and working distance, and a swapped lens or mount. Pattern tools tolerate only small scale and rotation differences between the trained pattern and the live part, so a reference captured at a different zoom or brightness reads as a different part. Re-latch under production optics, then retrain.

Can I keep using the guided editor after rewiring the cells by hand?

Plan on the spreadsheet view from then on. The guided editor expects to own the tool wiring, and hand-edited image inputs usually break its assumptions, so a job you rewire this way is a spreadsheet job afterwards. That is the cost of the shared reference; in exchange, one re-latch and a short retrain walk updates all sixteen tools.