Visual inspection is quality's first line of defence in manufacturing: detecting scratches, burrs, pores, contamination, assembly errors or colour deviations before the product reaches the customer. For decades it depended entirely on the human eye; today it coexists with automated machine vision, capable of inspecting thousands of parts per hour with a repeatability impossible for a human operator. This article explains inspection techniques, how a vision system is designed, the applicable standards and the mistakes that ruin a control that seemed robust.
Types of visual inspection
Inspection can be classified by degree of automation. Manual inspection is still valid for short runs, highly variable products or subtle aesthetic defects that demand expert judgement; its Achilles' heel is fatigue and subjectivity: two operators may classify the same part differently, and the failure rate grows after hours on shift. Semi-automatic inspection supports the operator with magnification, controlled lighting and templates. Automatic inspection based on machine vision removes human intervention at the point of decision and is the only viable option for high throughput.
By the nature of the defect, we distinguish dimensional defects (dimensions out of tolerance, measurable with metrology), surface defects (scratches, stains, porosity), assembly defects (missing or misoriented components) and chromatic defects (colour or gloss deviation). Each category requires a different lighting technique and algorithm, and confusing them is the most frequent cause of a system that "fails to see" what it should.
Anatomy of a machine vision system
A well-designed vision system rests on four elements, and lighting is usually the most underestimated. Lighting determines whether the defect is visible: grazing light reveals reliefs and scratches, backlighting highlights contours and holes, diffuse light eliminates reflections on glossy surfaces, and coaxial lighting inspects specular surfaces. Good lighting turns a complex software problem into a trivial one.
The optics (lens and working distance) set the spatial resolution: you must ensure that the smallest defect to be detected occupies several pixels. The sensor (area-scan or line-scan camera, monochrome or colour) captures the image, and the processing applies the decision algorithm. The golden rule: no algorithm recovers information that the lighting and optics did not capture. Investing first in the physical scene and only then in software saves months of frustration.
From classic vision to deep learning
Classic computer vision solves many cases with deterministic algorithms: thresholding, edge detection (Canny, Sobel), blob analysis, template matching and morphological filters. It is fast, explainable and needs no training data; it shines when the defect is well defined and the background controlled (is the cap on? is the label centred?).
When the defect is variable and hard to describe with rules—complex textures, natural products, surfaces with aesthetic tolerance—convolutional neural networks (CNNs) step in. The most promising approach in 2026 is anomaly detection trained only on good parts (one-class): the model learns what normal looks like and flags any deviation, which avoids having to collect thousands of examples of each rare defect. This fits the industrial reality, where defects are, by definition, scarce. The price is lower explainability and the need to manage the model's life cycle.
Comparison of inspection approaches
| Criterion | Manual inspection | Classic vision | Deep learning |
|---|---|---|---|
| Speed | Low | Very high | High |
| Repeatability | Variable | Total | High |
| Well-defined defects | Good | Excellent | Excellent |
| Variable/aesthetic defects | Good | Limited | Excellent |
| Needs training data | No | No | Yes |
| Explainability | High | High | Medium-low |
Building the dataset and labelling
In learning-based approaches, the quality of the dataset weighs more than the architecture of the network. The manufacturing challenge is structural: defective parts are scarce (many lines operate below 1% defects), so the dataset is heavily imbalanced. Collecting enough examples of each rare defect type can take months, and that is precisely why anomaly detection trained only on good parts has become so attractive.
Labelling must be consistent: if two experts disagree on whether a mark is a defect or not, the model will learn that ambiguity as noise. It is advisable to define acceptance criteria with physical reference samples (acceptance and rejection limits) and to measure inter-labeller agreement before training. Data augmentation techniques—rotations, controlled lighting changes, noise—artificially expand variety and improve robustness, but they do not replace capturing real defects: a rotation does not teach the model what a pore it has never seen looks like.
Metrics: the balance between false positives and false negatives
An inspection system is measured by two opposing errors. The false negative (an escape, the escape rate) lets a defective part through: it is the most dangerous, because it reaches the customer. The false positive (over-rejection) discards a good part: it raises production cost and erodes confidence in the system. Sensitivity must be calibrated according to the relative cost of each error, which is very different for a decorative screw and for a brake component. The key metrics are the detection rate, the false-reject rate and, for critical defects, the detection capability demonstrated in an attribute Gage R&R study, which quantifies the repeatability and reproducibility of the measurement system.
Applicable standards
Visual inspection sits within a quality management system compliant with ISO 9001, which requires documented and traceable control processes. In automotive, the IATF 16949 standard adds process control and capability requirements. If the inspection system produces a measurement, its uncertainty and metrological traceability must be managed according to the principles of ISO/IEC 17025 for laboratories. When inspection incorporates AI-based vision and feeds product-safety decisions, it is advisable to review the transparency and oversight obligations of the European AI Regulation and to maintain human control over critical rejection decisions.
Phased implementation
A mature automatic inspection project advances as follows: (1) define the defect catalogue with physical samples and unambiguous acceptance criteria; (2) design the scene (lighting, optics, part-presentation mechanics) and validate that the defect is visible in the image; (3) choose the simplest algorithmic approach that solves the case—classic before deep learning; (4) validate with an attribute Gage R&R on known good and bad reference parts; (5) integrate automatic rejection and traceability of every decision; and (6) monitor drift in production, retraining or recalibrating when materials, suppliers or ambient lighting change.
Common mistakes to avoid
The first is starting with software and neglecting lighting: no algorithm fixes a poorly lit scene. The second is not validating with reference parts, assuming the system works without a Gage R&R to prove it. The third is calibrating sensitivity without cost per error, letting critical defects escape out of fear of over-rejection or the reverse. The fourth is forgetting drift: a change of plastic supplier or of the factory lighting can degrade the system without warning. And the fifth is failing to document the model's decisions, which makes it impossible to audit claims and defend yourself before a customer.
Frequently asked questions
Does machine vision completely replace the human inspector?
Not in every case. It automates high-throughput inspection and well-defined defects with total repeatability, but human judgement remains valuable for subtle aesthetic defects, short runs and the final validation of critical decisions.
Why is there so much insistence on lighting?
Because lighting decides whether the defect appears in the image or not. Grazing light reveals a scratch that is invisible under diffuse light. Solving the physical scene well turns a complex algorithmic problem into a trivial one.
When should I use deep learning instead of classic vision?
When the defect is variable, depends on texture or has an aesthetic component that is hard to describe with rules. For presence, position or dimension checks, classic vision is faster, explainable and needs no training data.
What is an attribute Gage R&R?
A study that quantifies whether the inspection system classifies repeatably (the same results across repetitions) and reproducibly (across operators or equipment). It is the standard for validating that a go/no-go control is reliable.
Conclusion
Effective visual inspection is not bought as a black box: it is designed starting from light and optics, choosing the simplest algorithm that solves the specific defect and validating it with reference parts before trusting it. The real indicator of maturity is not the sophistication of the model, but the calibrated balance between escapes and over-rejections according to the real cost of each error, and the discipline to monitor drift when materials or plant conditions change. A defective part that reaches the customer costs far more than the system that would have stopped it. At Summum Marketing we approach every inspection project from the defect catalogue and the physical scene, not from the tool of the moment, because quality is built into the design of the control, not into the supplier's marketing pitch.