
A machine vision system captures images and analyzes them to inspect, identify, measure, or locate objects. In manufacturing, the complete system includes the imaging setup, decision logic, timing, and the mechanism that connects a result to the correct part.
AI-based inspection can help with variable appearances and complex defect patterns. It does not remove the need for good lighting, representative examples, or an explicit acceptance specification. Start by defining what must be seen and what decision the inspection supports.
Get the image right first
| Element | Purpose | Question to test |
|---|---|---|
| Lighting | Make the relevant feature distinguishable. | Does glare, shadow, or ambient light hide the defect? |
| Optics and camera | Capture the required area and detail. | Are focus, resolution, exposure, and motion blur adequate? |
| Trigger and handling | Associate an image with a physical part. | Can missed triggers or changing spacing confuse identity? |
| Processing | Produce a measurement or classification. | Does the result meet accuracy and time requirements? |
| Line interface | Record or act on the result. | Does the intended part reach the intended disposition? |
Cognex's vision-system introduction describes image acquisition, triggering, and processing in a practical system. A model cannot reliably recover a feature that the camera never captured. Test the imaging setup at production speed and across normal part variation.
Choose logic that matches the inspection
Conventional image processing can be a good fit for presence checks, geometric measurements, or consistent contrast patterns. Learned models can address more variable textures and appearances when appropriate training and evaluation data are available. A combined system might locate a part geometrically, then classify a defined region.
Separate dimensional measurement from visual classification. A camera that recognizes a scratch is not automatically a calibrated measuring instrument. Establish the field of view, distortion correction, repeatability, and uncertainty when reporting dimensions.
Define acceptable, defective, and uncertain examples with the quality team. Include borderline cases and document disagreements. A learning system trained on inconsistent judgments will not settle the underlying specification.
Worked example: inspect a molded cover
A fictional inspection evaluates 1,000 independently reviewed cover images. Of these, 100 are defective and 900 are acceptable. The system rejects 95 defective parts, misses 5 defective parts, and incorrectly rejects 18 acceptable parts.
| Actual condition | System accepts | System rejects |
|---|---|---|
| Defective: 100 | 5 missed defects | 95 detected defects |
| Acceptable: 900 | 882 correct accepts | 18 false rejects |
Defect recall is 95 / 100 = 95%. The false-reject rate among acceptable parts is 18 / 900 = 2%. Overall accuracy is 977 / 1,000 = 97.7%, but that single number obscures the five missed defects.
With 113 total rejects, 95 are defective, so the precision of a reject decision is about 84.1%. Changing the production defect rate can change that value even if the underlying sensitivity and false-reject rate remain similar.
Validate the whole inspection station
Keep evaluation parts or batches separate from development examples. Several photos of the same part should not be split across training and testing as if they were independent products. Include different lots, surface finishes, positions, and expected lighting conditions.
Measure time from acquisition to usable decision, including image transfer and processing. Test missing frames, low-confidence results, a disconnected camera, and a failed reject mechanism. Define an explicit hold or review response for an unreadable inspection rather than silently treating it as a pass.
Verify that each result follows the correct physical part through the line. A correct classification applied to the next part is still an inspection failure. Retain appropriate evidence, configuration versions, and part identifiers to investigate escapes.
Use AI assistance to organize evidence
Design an offline evaluation for this labeled inspection sample. Report missed defects and false rejects separately by defect type and production lot. Keep images of the same part together. Show the threshold tradeoff and identify sample gaps before suggesting deployment.
An assistant can help draft evaluation scripts or organize reviewed examples. A generative model's invented defect images may help exploration, but performance on synthetic images does not establish performance on real parts. Review training changes and retain a repeatable evaluation set.
Should the system learn continuously from every rejected image?
Only through a controlled labeling and validation process. Rejected images can include acceptable parts, lighting faults, or unfamiliar products. Automatically treating them all as defects can reinforce mistakes.
For identity across moving video frames, see video tracking. For connecting inspection outcomes to production context, see operations monitoring.