O ORPAON
Machine Vision & Quality

What to Decide Before Adding Machine Vision to Appearance Inspection: Lighting, Fixtures, and NG Definitions

On an appearance-inspection line, debate about whether “this vision setup will work” often starts before the camera or the software is even chosen. Projects stall less often because the algorithm library is thin, and more often because lighting, fixtures, and NG definitions have not been written as text the line can run and acceptance can check. This article covers only those three prerequisites. Toolchain comparison belongs in a separate piece; here the question is what to settle before a camera goes on the station.

What happens if you mount cameras before these three points are set

A common sequence is to buy the camera, weld a bracket, and start writing the inspection program. Once the light path changes, the part shifts a few millimetres, or quality and process disagree on what counts as a defect, no amount of program editing will stabilize the call. Painted housings, scratched appliance cases, broken food seals or foreign matter — the same appearance defect becomes two different images when the lighting changes.

From engineering work that has covered appearance defects, dimensional checks, locating guidance, OCR, assembly poka-yoke and package inspection, leaving these three items blank and still installing hardware sends the shop floor into a loop of trial shots, threshold edits and meetings. The system is not missing; after it runs, nobody will let it decide OK/NG. If deep learning is under review, the bar is higher: if real-line samples after changeover, material change and shift change have not been accumulated to a written rule, do not start training. Laboratory photos do not represent the line.

  • Lighting unset: day shift detects, night shift misses; swap one aisle lamp and false rejects arrive in batches
  • Fixture unset: the same part images in two positions, thresholds cannot freeze, and the line falls back to visual catch-up
  • NG definition not written for acceptance: quality cites misses, process cites overkill, and boundary samples split the acceptance meeting

Lighting is about making features appear stably, not about making the part bright

Lighting is not an accessory to the camera. It is the side that decides what the camera sees. Angle, color, polarization and ambient light belong as separate lines in the optical plan. A verbal promise to “add a lamp” will not survive a shift change.

The aim is not to flood the whole part. It is to keep the contrast between the feature you care about and the background pointing the same way on every shift. Film glare on food packs, glossy appliance resin, and metal hairline on painted parts need different incidence. Do not copy one lamp set onto a different class of workpiece.

  • Angle: low angle lifts scratches and edges; coaxial or diffuse light kills glare so print and color can be read. If angle is open, defects appear and vanish in the frame
  • Color: choose wavelength against the spectral difference between the part and the defect; do not treat white light as the default scheme
  • Polarization: cut specular bounce from film, oil and coatings. Skip it when it is needed, and the algorithm will treat glare as a defect
  • Ambient light: windows, aisle lamps and flicker from the next station enter the frame. Specify covers and shading, and keep day-shift versus night-shift image pairs

Measure fixture locating repeatability before the algorithm is asked to compensate

If every shot sits in a different place and software is expected to “search then align,” thresholds can only be loosened. Looser calls raise misses, and the floor will switch the system off and go back to eyes. The fixture’s job is to put part pose inside a written allowance on every trigger.

Changeover time, clamp method, presence of dowels or edge stops, and relative stiffness between camera and fixture are confirmed on the floor before kick-off. Do not treat “we will search in software after go-live” as a plan. On a station that shakes from a neighbouring press or conveyor impact, a bracket chosen on a quiet lab bench will not hold.

  • Repeatability must be measurable: write X, Y and rotation allowances, and verify with consecutive shots of the same part
  • Changeover must be reproducible: after a nest swap, there is a procedure to restore the optic-to-datum relationship; do not rely on visual centering
  • Vibration and stiffness: size the stand and fixture for neighbouring impact, not for a quiet laboratory table

How to write an NG definition that acceptance can actually check

“No scratches on the surface” cannot be accepted. A definition that can be accepted is text that lets people on different shifts reach the same conclusion on the same image, and that names who may change a threshold. On packaging, painted housings or metal parts alike, if quality and manufacturing use two vocabularies for the same defect, align the terms first.

Boundary samples are the core of acceptance. Hand over only obvious pass and obvious fail, and the grey zone will be argued every day. Keep separate books for borderline, allowed and must-reject samples, and agree how the books are updated. There is no need to promise a detection figure first. Write the decision steps and the authority first.

  • Defect class and call: scratches, dirt, missing parts, deformation — drop each item to “what you see counts as NG,” with a sketch or a real shot
  • Boundary samples: archive borderline, allowed and must-reject; acceptance draws from these, not only from extreme images
  • Who may change a threshold: who is allowed, what record is left, and whether quality must countersign
  • Misses and false rejects: how a miss is escalated, and whether auto-call may be paused when false rejects persist — write shop-floor procedure, not a capability figure

Item, what happens if it stays open, how far to take it

Put lighting, fixtures and NG definitions on one sheet and the gaps before kick-off become obvious. Leave any one blank, and after the camera is mounted you are often left with a machine that still needs a person watching it. The table below can be used as a pre-order check.

ItemWhat happens if it stays unsetHow far to take it
LightingWhen a shift or a neighbouring lamp changes, false rejects and misses rise togetherWrite angle, color, polarization and shading into the plan, and confirm imaging once on day shift and once on night shift
Fixture and locatingThe same part images in two positions, so thresholds cannot freezeWrite locating allowances, define a changeover restore procedure, and verify repeatability with consecutive shots
NG definitionAcceptance splits on boundary samples; after go-live, quality and process disagreeAgree in writing the defect list, the boundary-sample book, threshold-change authority, and the miss / false-reject procedure

Deep learning is something to evaluate only after real-line samples — including changeover, material change and shift change — have been accumulated to a written rule. If the samples are not ready, do not start. Toolchain comparison is not covered in this article.

Takeaways

Whether machine vision holds on appearance inspection is largely settled before the camera is purchased. Write lighting, fixtures and NG definitions as text the line can run and acceptance can check, then move to imagers and software. Installing hardware first and filling these three items later produces a lot of rework.

If the three items still do not line up, start with scene acceptance on a single station: freeze lighting and shading, measure fixture repeatability, and align the call using a boundary-sample book. Once those three are stable, decide the pilot scope; the line will stop fewer times.

Discuss appearance-inspection prerequisites

Tell us the station type, the defects you need to call, and the imaging you already have. We can help turn lighting, fixtures and NG definitions into a written list that acceptance can check. An English-speaking contact is available.

Contact Us