Light decides what is visible. HIKROBOT’s light catalogue explains each lighting geometry in terms of where the reflected light goes (HIKROBOT light catalogue, glossary). The table restates that glossary for surface defects; in a bright-field image the feature is darker than the background, in a dark-field image it is brighter.
Lighting geometry and the surface defects it reveals| Lighting geometry | What happens to the light (HIKROBOT glossary) | Defects it tends to show |
|---|
| High-angle front light (above 45°) | Flat areas reflect into the lens and look bright; rough areas look dark | Scratches on matte faces, print, contours |
|---|
| Low-angle front light (below 45°) | Flat areas look dark; rough or raised areas scatter light into the lens and look bright (dark-field) | Scratches, dents, embossing, burrs on flat parts |
|---|
| Coaxial light | Light along the lens axis: a flat surface acts as a mirror and roughness shows clearly | Scratches, indentations, bumps and hollows on polished or glossy flat faces |
|---|
| Shadowless (dome) light | Light from all angles weakens grain and creases so the image is even | Marks and colour faults on curved, shiny or textured parts |
|---|
| Backlight, diffuse or parallel | The part blocks the light and shows as a silhouette; parallel light keeps edges sharp on round or chamfered parts | Flash, short shots, outline and edge faults |
|---|
| Structured (pattern) light | A projected line or dot pattern is twisted by surface defects | Flatness and dents on smooth, reflective surfaces |
|---|
| Colour casting and filters | Light of the complementary colour, or white light with a band-pass filter, raises contrast of a coloured feature | Colour contamination, coloured marks on coloured parts |
|---|
| Polariser pair | Turning two polarisers against each other filters strong reflections | Marks under glare on glossy film or coated parts |
|---|
Defect atlas
Common surface defects, how they appear and where vision stops| Defect | How it appears in the image | Lighting to try first | Limit |
|---|
| Scratch | A thin line that breaks the surface texture | Low-angle or coaxial | Very shallow polishing marks may only show at one angle; agree which are defects |
|---|
| Dent or sink mark | A gentle change of surface shape, no line | Low-angle, structured light | Shallow dents on matte parts may need 3D |
|---|
| Flash or short shot | Outline differs from the good part | Backlight | Only on edges the camera sees in silhouette |
|---|
| Stain, speck, contamination | A local change of brightness or colour | Dome or diffuse, colour casting | Same-colour contamination may not show |
|---|
| Colour or shade deviation | Whole part slightly off colour | Stable diffuse white light, colour camera | Needs light and camera colour stability over time |
|---|
| Crack | A sharp line, often with a step | Low-angle; backlight if it goes through | Closed or internal cracks are not visible |
|---|
Worked example: how big must a defect be? Assume a 2,448-pixel-wide camera and a scratch 0.2 mm wide. The pixel size on the part is the field of view divided by 2,448. A defect that spans only two or three pixels depends heavily on contrast, focus and lighting stability, so the sample test decides; these figures are for planning, not a detection promise.
Example: field of view and the pixels across a 0.2 mm defect (assumed 2,448-pixel sensor)| Field of view across | Pixel size on the part | Pixels across a 0.2 mm scratch | What it means |
|---|
| 50 mm | 0.020 mm | about 10 pixels | Easy to resolve; small view per camera |
|---|
| 100 mm | 0.041 mm | about 5 pixels | Often enough with good contrast |
|---|
| 200 mm | 0.082 mm | about 2 to 3 pixels | Borderline: contrast and sharpness decide |
|---|
How results are measured, and why accuracy misleads
Treat “defective” as the positive class. Recall, the true positive rate, is the share of defective parts that are caught; the false positive rate is the share of good parts wrongly rejected; precision is the share of rejected parts that really are defective. Google’s machine-learning course notes that accuracy is misleading when one class is rare (Google ML Crash Course), which is always the case for defects.
Worked example (assumed figures). 10,000 parts, of which 50 are defective. The station rejects 48 of the 50 and also rejects 100 good parts. Recall is 48 / 50 = 96 %. The false reject rate is 100 / 9,950, about 1 %. Accuracy is 9,898 / 10,000, about 99 %, which sounds excellent. But precision is 48 / 148, about 32 %: two of every three parts in the reject bin are good. That is why acceptance uses recall and false reject rate separately, and why the reject bin is reviewed from the saved images. A challenge test with no misses bounds the miss rate rather than proving it is zero (NIST e-Handbook, 7.2.4.1).
For defects that vary too much for fixed rules, VisionMaster includes anomaly detection and edge-model defect tools alongside its deep-learning modules (HIKROBOT Smart Product Catalogue, p.62); whichever tool is used, the same metrics apply.