The information has to exist in the image
A model cannot recover contrast that was never captured. If a scratch on a machined face produces four grey levels of difference under diffuse illumination, no amount of training data fixes that. Rotate the same part under dark-field illumination and the scratch produces a bright line against a black background — a defect that was marginal becomes trivial.
This is not a subtle effect. Choosing illumination geometry correctly routinely changes defect contrast by an order of magnitude. It is the highest-leverage decision in the entire project, and it costs almost nothing to get right if it is made first.
Matching geometry to defect physics
The useful mental model is to ask what the defect does to light, then design to exploit exactly that.
| Defect behaviour | Geometry | Typical application |
|---|---|---|
| Scatters light at a shallow angle | Dark field (low-angle ring) | Scratches, edge chips, engraved marks |
| Changes specular reflection | Coaxial / DOAL | Polished surfaces, wafer defects, mirror finishes |
| Changes diffuse reflectance | Dome / diffuse | Print defects, contamination, colour variation |
| Changes geometry or height | Structured light, laser profile | Dents, weld bead, warp, missing material |
| Blocks transmitted light | Backlight | Dimensional measurement, presence, silhouette |
A meaningful share of inspection problems are solved outright by picking the correct row of that table. The algorithm afterwards is a threshold.
The order of decisions
The sequence we follow, and the reason it is in this order:
- Illumination geometry. Determines whether the defect is visible at all.
- Optics. Working distance, field of view and required resolution — including whether telecentricity is needed to avoid perspective error in measurement.
- Sensor. Resolution follows from the smallest feature that must be resolved, with a minimum of three to four pixels across it. Frame rate follows from line speed.
- Algorithm. Classical methods first. Deep learning where the defect class genuinely resists explicit description.
- Mechanics. Part presentation, repeatability and light shrouding — because ambient light is the most common cause of a system that worked at FAT and failed at SAT.
Deep learning has a place, but it is narrower than the marketing suggests
Learned models earn their keep on cosmetic judgement, variable texture and defect classes that resist a written definition. They are a poor substitute for a well-lit image and a good substitute for an inspector who cannot articulate their criteria.
They also carry an obligation. If you deploy a classifier, you owe the quality plan a measured false-reject and false-accept rate on a held-out sample set, with a confidence interval. A model whose error rate is unquantified is not an inspection system; it is a filter of unknown severity.
What to ask a vision supplier
Three questions separate suppliers who will succeed from those who will not: what illumination geometry are you proposing, and why that one; what detection and false-reject rate will you commit to on our parts; and can we see images of our actual defective samples before we sign. A supplier who cannot answer the first has not started engineering yet.
Talk to us about this
If this is relevant to a line you are working on, our engineers are happy to look at the specifics. Related capability: Machine Vision. You can also browse delivered projects, the technology stack or contact the engineering team.