
A camera is installed to detect scratches on a reflective metal cover. The supplier's demonstration works beautifully. On the actual line, acceptable parts are rejected whenever their surface reflects an overhead light, while some scratches remain invisible. The camera has sufficient pixels and the software has several advanced inspection tools. Neither solves the central problem: the image does not consistently reveal the characteristic that must be inspected.
Machine vision begins with controlling how information reaches the sensor.
Decide what evidence must appear in the image
A dimensional measurement, a surface-defect inspection and a label-reading task require different information. For an external profile, the boundary between the part and its background may be the feature of interest. For a scratch, the important evidence may be a small change in reflected light. For a printed code, contrast and focus may matter more than the appearance of the surrounding component.
Before selecting equipment, obtain representative samples that include the acceptable variation and known unacceptable conditions. Identify which differences are relevant to the engineering requirement and which should be ignored. An inspection that rejects every deviation from a pristine reference image may be commercially unusable.
| Inspection objective | Imaging approach to evaluate | Important limitation |
|---|---|---|
| External outline or hole profile | Backlighting and suitable optics | Does not necessarily reveal surface condition |
| Scratch on a reflective surface | Directional or diffuse illumination, as appropriate | Visibility can depend on scratch orientation |
| Printed identification | Controlled illumination and suitable focus | Print quality, contrast and presentation can vary |
| Height or depth characteristic | Suitable three-dimensional measurement approach | Calibration and accessible geometry matter |
These are possible approaches, not universal camera specifications. Trial the actual surface, material and feature before selecting the optical arrangement.
Calculate the spatial scale
Suppose a camera produces an image 2,048 pixels wide and the horizontal field of view covers 100 mm of the object. Under a simplified uniform mapping, the nominal object-space pixel scale is 100 / 2,048 = 0.0488 mm per pixel.
A 0.10 mm feature therefore spans approximately two pixels along the measured direction. That does not establish that the system can reliably detect or measure it. Contrast, lens quality, focus, perspective, sensor noise, motion blur and the inspection algorithm all influence practical performance.
Reducing the field of view to 50 mm changes the nominal scale to approximately 0.0244 mm per pixel with the same sensor. The feature now spans about four pixels, but a smaller field may require repositioning, multiple cameras or more processing time.
Distinguish pixel scale from measurement uncertainty. Some methods estimate edges at subpixel resolution, but a subpixel numerical result does not establish an equally small physical uncertainty. Validate the complete measurement system against suitable reference evidence.
Control motion and presentation
For a component moving at an illustrative speed of 500 mm/s, a 0.2 ms exposure produces approximately 0.10 mm of movement during the exposure. Under the 100 mm field-of-view example, that corresponds to roughly two pixels of motion in the object plane.
A shorter exposure may reduce blur, but sufficient illumination is still needed. Consider suitable triggering, lighting and mechanical presentation rather than relying entirely on digital correction.
Inspect the range of legitimate part positions and orientations. If the part moves closer to or farther from a conventional lens, apparent scale may change. For demanding dimensional applications, an appropriate optical arrangement and calibration strategy may be necessary.
Validate performance against the actual defect
Define the reference classification independently of the vision system. Include representative defect sizes, locations, appearances and borderline conditions. A collection containing only obvious rejects cannot establish performance near the acceptance limit.
Suppose a validation exercise includes 200 known unacceptable parts and 800 acceptable parts. The system identifies 196 unacceptable parts and incorrectly rejects 24 acceptable parts. Observed detection is 98%; observed false rejection is 3%. The four missed defects may be unacceptable for a critical application even though overall classification accuracy is high.
Review uncertainty in those estimates, the representativeness of the sample and the consequences of each error. Do not select the threshold solely to improve the average score. Establish criteria appropriate to the actual product risk.
Integrate the inspection result into the production sequence
The camera's result must correspond to the correct physical unit. Confirm triggering, part identification, handling of missed images and the response when the system cannot produce a valid result. A correct reject decision is ineffective if the wrong component is diverted.
Retain the appropriate configuration, calibration and inspection evidence. Define what happens after a lens replacement, lighting adjustment, software change or new product variant. Test recovery following a production interruption without compromising independent machinery safety functions.
A vision system succeeds when the physical setup, interpretation and production response work together. Buying a more powerful algorithm should not be the first response to a poor image.
Further reading
Association for Advancing Automation — introduction to machine vision systems and lighting techniques. See mistake-proofing and measurement uncertainty.
