AI-POWERED DOCS
What do you want to know?
Alignment: Make Regions Follow the Part
Alignment finds the part in each new frame and re-places every region that references it, so your inspection tools land in the right spot even when the part shifts or rotates. It works from a single reference image, and it is also trainable: the optional Teach step learns from 3 to 25 real captures, which often improves the aligner's robustness by 20 to 30 points. Click through the four steps below, and use the anchor lab in Step 2 to see why anchor placement matters more than any setting on the page.
Decide whether you need an aligner at all
The aligner tracks the part position and rotation before each inspection, so your inspection tools land in the right place even when the part shifts between cycles.
Does this line need an aligner?
| How the part arrives | Verdict |
|---|---|
| Conveyor, loose parts | Aligner needed |
| Operator places by hand | Aligner needed |
| Robot loads into a nest | Aligner optional |
There is no skip checkbox. If a fixture holds the part the same way every cycle, you simply do not add an Alignment tool to the recipe.
What you do here
- Read the with and without comparison, then press Set up Alignment.
- Add Alignment as tool 1 unless a fixture holds the part identically every cycle
- Run the optional Teach step. Training on 3 to 25 real captures often improves robustness by 20 to 30 points
- Anchor to rigid features: one is enough for a crisp edge on a consistently oriented part, two (an angled feature plus a straight one) mostly solve it. Spread them as far apart as possible, never on labels or defects
- If the aligner misses, every tool that follows it is skipped. Decide in Judgment whether that fails the part
- It is 2D only: shift and rotation, not warp, tilt or size
Good alignment lets you draw smaller regions, because you no longer need padding for part movement. Smaller regions give the AI a cleaner signal, which means fewer training images and fewer mistakes. Everything downstream inherits the quality of this one step.
Why it matters
Every other tool in a recipe looks at a fixed box you drew on a reference image. If the part arrives 5 mm to the left, those boxes are now looking at the wrong place, and good parts start failing for no visible reason.
Do you even need one?
Add an aligner whenever the part can shift or rotate between cycles: a conveyor, loose parts, anything placed by hand.
Skip it when a robot or a precision fixture puts the part in the same place every time. There is no checkbox for this, you simply do not add the tool.
The golden rule: spread your anchors
You anchor the aligner to one or more small template regions. Where you put them matters more than any setting on the page.
| Anchors | When it works |
|---|---|
| One | The feature has a really clean, sharp edge, and the part already arrives in a consistent orientation |
| Two | Mostly solves it. Put one on an angled feature to pin the rotation, and the other on a straight feature |
| Three | The most robust, and still works if one is hidden on a given part |
Think about judging whether a picture frame is straight: two opposite corners show a tilt immediately, two corners side by side barely do. Two anchors close together give almost no rotation baseline, so a small measurement error stays a large angle error. Move those same two anchors to opposite corners and the error averages down by roughly the ratio of the distances.
What to anchor to
| Good anchors | Why |
|---|---|
| Machined edges | Rigid, high contrast, always present |
| Drilled holes | Distinctive and symmetric |
| Corners | Strong edges in two directions |
| Moulded logos | Part of the tool, so never moves |
What to avoid
Labels, stickers, loose wires, and defects. The aligner will faithfully follow the sticker, not the part, and shift every inspection region to the wrong place.
Anchoring to a defect is worse still: defects vary from part to part, so clean parts stop matching and start failing.
Also avoid clustering all your anchors in one area. It is the most common setup mistake, and it produces alignment that looks fine on the bench and jitters on the line.
Settings
Most recipes never need these touched. Tune only when alignment misses good parts, locks onto the wrong feature, or runs slower than you need.
| Setting | Range | Default | Notes |
|---|---|---|---|
| Rotation Range | 0 to 180° | ±15° | ±180° finds the part at any rotation and is a safe default for most applications |
| Sensitivity | 0 to 2 | 1.0 | Start low, raise only until the edge highlights stay reliably green |
| Confidence threshold | 0 to 1 | 0.5, recommended 0.6 to 0.9 | How sure the aligner must be before it calls the part found |
| Max descriptors | 1 and up | 100 | Edge points kept. More is more reliable but slower |
| Rotation step | 0 and up | 5° | Search increment. Smaller is more precise but slower |
Set it narrow, say ±5°, and a part that arrives outside that angle simply will not match. That gives you an orientation reject without adding another tool.
Pointing other tools at the aligner
Adding an aligner does nothing on its own. Each inspection tool has an Aligner step in its own Set Up where you pick which aligner it follows.
Every tool asks some version of Does the part move? and offers No aligner or a card per aligner in the recipe.
Once linked:
- The tool's regions are drawn on the aligner's master capture, not on a separate reference
- The tool list shows
Aligned to {name}on the follower, and{n} tools align to thison the aligner - Disabling the aligner disables everything that follows it, and the camera warns you before it does
When alignment fails
This is the part worth understanding before you go live, because the behaviour is deliberately fail-safe.
If the aligner cannot find the part, every tool that references it is skipped and marked not applicable. Tools never run against an unverified position, so you can't get a confident-looking result from a region that was pointing at the wrong place.
What that means for the verdict is yours to choose, in Step 4: Judgment of the recipe editor, under Alignment tool misses (part detection):
| Option | Behaviour |
|---|---|
| Never (default) | The inspection is decided by whatever tools did run. If nothing ran, the capture counts as neither pass nor fail |
| Always | The aligner must find its part, or the inspection fails |
| Only when no part is found at all | With several aligners, one finding its part is enough |
Separately, if a recipe has inspection tools and every one of them was skipped because alignment failed, the capture is recorded as a fail and counted under Not Inspected, which is kept out of your yield figure.
Limits worth knowing
It tracks shift and rotation. It does not handle parts that warp, or that tilt toward the camera. Scale is reported but is always 1.0: the aligner cannot compensate if the part sits closer to or further from the camera than in the template.
- Up to 64 template regions per aligner
- Template regions must be at least 8 px on each side
- The optional Teach step takes 3 to 25 samples
- Two gates must both pass: the score must clear your threshold, and if you turned on Restrict search area in Set Up (the rectangle that limits where the aligner looks for the part), the matched centre must land inside it
Validate before you build on it
Move the part to each corner of the frame, rotate it, and try every variant you expect. Fixing the aligner after you have configured your inspection tools means redoing all of them, because their regions are tied to the aligner's master image.
Is there a deep learning aligner?
Not in the shipping product. OV Spark has one aligner, the pattern-matching one described on this page, and it needs a single reference capture rather than a labelled dataset.
A deep-learning aligner is future work. If you have seen a reference to an "Aligner Type" choice or a "Deep Learning" option, that is carried-over text from the earlier camera generation and does nothing here.