Skip to main content
Solution library
Cap / closure alignmentNo training needed · classical

Cap / Closure Mark Alignment

Unwrap a bottle-cap or closure rim into a flat strip and check the printed alignment mark lands within its expected band — can help flag a cap threaded on wrong before it ships.

Synthetic demo frame, generated on your device. Swap in your own photos.

How it works

  1. 1Local FolderSources
  2. 2Polar / Ring UnwrapPreprocessing
  3. 3Pixel Count In RangeFeature Extraction
  4. 4GateVision Tasks
  5. 5Results ExportDeploy / Export

Polar / Ring Unwrap flattens the cap's printed rim into a plain strip: columns = angle (Angular samples sets the strip's WIDTH — left at 360, so 1 strip-pixel = 1 degree of rotation), rows = radius (Inner/Outer radius bound the printed band). Reposition Ring center + both radii in the Inspector over your cap's rim — the shipped defaults are a starting guess, not a fit to your part; Start angle fixes where column 0 begins (your own zero/keying reference on the cap) and Direction picks which way the angle sweeps. It also publishes its own strip width/height, ring band and angular-resolution (deg/px) as an informational measurements readout — no PASS/FAIL of its own, since a geometric remap has no tolerance concept; useful to confirm the strip actually came out at the resolution you expect. LIMIT: no existing primitive converts a blob's centroid into a graded numeric angle yet (Blob Table publishes centroidX per row, but Expression's variables off a blobs upstream are only blobCount/totalArea/maxArea/passCount/failCount — no per-blob position to grade against a nominal ± band). So this recipe tolerances the mark's STRIP-X POSITION DIRECTLY instead: reposition Pixel Count In Range's Inspection box in the Inspector to a band CENTERED on the mark's expected strip-x position, with the box's HALF-WIDTH set to your allowed angular tolerance IN STRIP-PX (with Angular samples at its 360 default, strip-px IS degrees — a ±5° tolerance is a ±5px half-width either side of center). Range low/high pick out the mark's own printed tone (dark ink on a light cap ships as low 0 / high 90 — retune from a known-good frame for your print color); Min OK % in range is the PASS floor for how much of that box must read as ink — a mark that has drifted out of the window, or a box sitting over bare cap, genuinely FAILs the block's published 'Fill in range' row (Pixel Count In Range publishes its result as structured data a Gate can read), and the Gate (opens on FAIL) routes that reject into Export; a mark that stayed in its window closes the Gate and Export never fires.

The deploy story

Every block in this pipeline exports and runs off-platform as-is — a self-contained portable bundle, no browser required.

Where a pipeline exports, the package is self-contained (one zip for every platform, with a compose.yaml for Docker), can write results to MQTT, Modbus-TCP and OPC-UA (MQTT and OPC-UA need a one-time npm install), can check itself against a stored test result when it starts (select Self-test), and sends no request to us. A model kit (Python scripts) carries the model and a runner only.

Every block here is a real, editable node — open it on the canvas and make it yours.

Open in Studio