Why manual visual inspection is reaching its limits
In many SMEs, visual quality control is still carried out by operators. They pick parts, compare them to a reference sample, and assess surface condition, geometry, and the presence of defects. This approach works as long as volumes are modest and the criteria are simple. It shows its limits as soon as the production rate increases, the product range expands, or customer requirements tighten.
Quality managers are familiar with the problem: an operator's vigilance drops noticeably during a repetitive task, and studies on human visual inspection show that a significant proportion of defects are missed, especially when the task is difficult. On critical parts, these undetected defects result in scrap at the customer's site, returns, and cost-of-poor-quality charges that weigh heavily on margins.
The industrial answer has existed for decades: machine vision. For a long time, it was reserved for large corporations: expensive proprietary hardware, specialized integrators, heavy engineering. The falling cost of cameras, the maturity of open-source image-processing libraries, and the advent of deep learning have made it accessible to SME budgets. This article presents the building blocks, possible architectures, and deployment methodology to help a production manager or CTO evaluate an automated quality-control project.
The building blocks of a machine vision system
A machine vision system relies on five inseparable elements: the camera, the optics, the lighting, the trigger, and the processing. Neglecting any one of them dooms the project, regardless of the budget spent on software. This is the most misunderstood point: in machine vision, lighting often matters more than the camera.
Cameras: sensors, resolutions, shutters
The sensor determines image quality. Industrial cameras today almost exclusively use CMOS sensors, which supplanted CCDs during the 2010s. To inspect moving parts, a global shutter is essential: it exposes the entire sensor at the same time and avoids the distortion caused by a rolling shutter, which skews measurements on moving objects. Common global-shutter sensors, such as the Sony IMX264 and IMX250 (5 megapixels) or onsemi families, cover resolutions from roughly 1 to 24 megapixels, sufficient for most applications.
Resolution should not be chosen "as high as possible" but "as appropriate as possible." The rule of thumb is that a defect must cover at least 3 × 3 pixels to be reliably detected. To measure a tolerance of ±0.1 mm on a 100 mm part, you need a resolution of about 0.03 mm per pixel, i.e., roughly 3,300 pixels along the relevant dimension: a 5 MP camera (2448 × 2048) is not enough across the full length, and you need to move to roughly a 12 MP sensor (4096 × 3000) or reduce the field of view. Conversely, over-specifying the resolution increases cost, data volume, and processing time without any gain in reliability.
Optics: lenses and working distance
The lens determines the field of view (FOV) and the working distance. C-mount fixed-focal-length lenses (8, 12, 16, 25, 35 mm) cover the majority of cases. For dimensional metrology, particularly on small parts (electronic components, connectors), telecentric lenses are a must: they eliminate perspective, so measured dimensions remain identical regardless of the part's distance. They cost significantly more than standard optics (on the order of €1,000 to €3,000 versus €100 to €500), but they save hours of calibration and focusing.
Lighting: the most cost-effective variable
Lighting is the most underestimated lever. Good lighting simplifies processing to the point of making the algorithm trivial; poor lighting defeats even the most sophisticated algorithm. The classic configurations:
- Backlight: the part is illuminated from behind and appears as a highly contrasted silhouette. Ideal for dimensional measurement, detection of burrs, holes, and recesses.
- Coaxial lighting: light is reflected by a half-mirror tilted at 45°, along the camera axis. Suited for shiny and reflective surfaces (polished metal, packaging).
- Low-angle ring light: it reveals relief and scratches through shadow effects. Typical for surface-finish inspection.
- Dark field: only diffusing elements (scratches, asperities) appear bright on a dark background. Very sensitive to micro-defects on surfaces.
LED sources dominate: lifespan on the order of 50,000 hours, spectral stability, and the ability to operate in stroboscopic mode synchronized with the trigger. The wavelength is chosen according to the material: red (660 nm) and infrared are often used to attenuate color variations and certain reflections, UV for fluorescent markings, blue for certain contaminants. A bandpass optical filter combined with the lighting eliminates most ambient light: a well-designed system performs identically day or night or under workshop fluorescent tubes.
Triggering and acquisition: GigE Vision, USB3 Vision, GenICam
The trigger synchronizes image capture with the passing of the part: photoelectric cell, conveyor encoder, or PLC signal. At high throughput, the encoder is the reference: each pulse corresponds to a known conveyor displacement, and the image is taken at exactly the same position on the part each time.
For image transport, two standards dominate: GigE Vision (Gigabit Ethernet, with PoE power delivery to the camera via the network cable) and USB3 Vision (up to 5 Gbit/s, lower latency, but cable length limited to a few meters). Both rely on GenICam, the standard that unifies camera configuration interfaces: a GenICam camera works with any compatible software, regardless of manufacturer. This standard has greatly reduced dependence on proprietary solutions and driven down prices. For very high bandwidths, Camera Link and CoaXPress remain options, but only for a minority of applications (electronics, inspection of continuous webs at very high speed).
From classical image processing to deep learning
Once the image is acquired, processing falls into two broad families of approaches, often combined.
Classical processing: deterministic and controlled
Classical algorithms (OpenCV foremost, free and open source) cover a wide variety of inspections: thresholding, contour analysis, mathematical morphology, circle and edge detection, template matching, distance measurement, OCR, and code reading (Data Matrix, QR). They are deterministic: given an identical image, the result is identical, which simplifies validation and auditing. For a large share of industrial applications (presence/absence, dimensional measurement, positioning, code reading), classical processing is sufficient and is often the most robust and quickest approach to implement.
Deep learning: non-reproducible defects
Deep learning takes over for defects that no deterministic rule can describe: random scratches, porosity, color variations, cosmetic defects. Three families of models cover most needs:
- Classification: the image is classified as "pass" or "fail." This is the simplest form, for an overall verdict on the part.
- Object detection (YOLO, Faster R-CNN): defects are localized by bounding boxes with a confidence level, to count and position them.
- Semantic segmentation (U-Net): each pixel is classified, allowing precise measurement of a defect's area, shape, and orientation.
Anomaly detection, popularized by architectures such as PatchCore or PaDiM, is particularly interesting in industry: the model is trained only on images of conforming parts and flags any deviation. There is no need to collect images of defects, which are rare and often impossible to gather in sufficient quantity: images of good parts, easy to produce, are enough. This is the approach to favor when defects are varied and unpredictable.
Models are trained on GPU (a consumer-grade card is sufficient for a few hundred to a few thousand images) and exported as ONNX or TensorRT for inference. On a GPU or a low-power accelerator (NVIDIA Jetson, Hailo, Intel Movidius), inference typically takes 5 to 50 ms per image depending on model complexity, which is compatible with most production rates.
The right trade-off: a hybrid approach
The most effective systems are generally hybrid: classical processing handles deterministic checks (measurement, positioning, code reading) while deep learning deals only with cosmetic defects that classical rules cannot qualify. This split reduces the volume of data fed through the neural network, hence the hardware cost, and preserves auditable checks where auditability is required.
Architecture: where to place the intelligence?
The choice between centralized processing and edge processing determines the system's cost, latency, and availability.
Edge computing: the image stays on the shop floor
For the vast majority of quality-control applications, processing runs on an industrial PC (IPC) equipped with a GPU or accelerator, installed near the camera. The reasons are technical: latency must remain below the cycle time (typically 100 to 500 ms per part), and the raw stream from a 5 MP camera at 30 fps represents about 150 MB/s in 8-bit monochrome—three times more in color—which is unnecessary and expensive to transport. Edge processing also guarantees that inspection continues if the network goes down: a quality check that depends on an internet connection is an unacceptable risk. For more details, see our article on Edge AI on embedded systems for industry.
Smart cameras, which integrate processor and vision software and are offered by established manufacturers in the sector, are an alternative: easier to install when the inspection is simple and localized, they are however less flexible for evolving the algorithm.
From inspection to data: IoT data collection
This is where machine vision meets IoT. A modern quality-control system does more than deliver a pass/fail verdict: it feeds the results (part ID, defect type, location, measurement) to a supervision platform. This data flow opens up three high-value use cases:
- Real-time quality statistics: defect rates by line, by shift, or by batch, visible on a dashboard, with alerts as soon as an indicator drifts.
- Correlation with process parameters: a drift in the defect rate can be correlated with temperature, pressure, or tool wear. This is a gateway to predictive maintenance.
- Full traceability: each part is linked to its time-stamped, archived inspection results. This is a decisive asset in the event of a complaint and a solid support for ISO 9001 or IATF 16949 audits in the automotive industry (see also industrial traceability through IoT).
Communication relies on standard industrial protocols: MQTT for data collection to the platform, OPC UA for exchange with the PLC or MES, EtherNet/IP or Profinet when the system communicates directly with the PLC. Results are time-stamped and logged locally before sending, in a buffer that prevents any data loss in the event of a network outage.
Robotic integration: vision that guides the machine
Machine vision reaches its full potential when coupled with robotics: the robot no longer follows a fixed program—it adapts to what it sees. This is called vision-guided robotics (VGR).
Eye-in-hand and eye-to-hand: two geometries, two use cases
In an eye-in-hand configuration, the camera is mounted on the robot arm, near the end effector: it follows the motion and provides a close-up, changing view, ideal for picking parts from a bin, inspecting specific points, or reading codes on parts with varying geometry. In an eye-to-hand configuration, the camera is fixed, above or beside the scene: the view is stable and calibration is simpler. This is the natural choice for inspecting parts at a fixed station or on a conveyor, and for guiding the robot to a known position.
In both cases, calibration is the critical step: it establishes the transformation (4 × 4 homogeneous matrix) between the camera frame and the robot frame. Good calibration is verified by a reprojection error on the order of a tenth of a millimeter. Classic errors (distorted or degraded calibration target, insufficient number of poses) result in missed picks, invisible at startup and costly in production.
Typical use cases
- Bin picking (pick & place): the camera detects the position and orientation of parts in a bin; the robot grasps them without pre-positioning. This saves loading time and eliminates a presentation station.
- In-line inspection on a conveyor: each part is photographed as it passes and inspected; then a rejection mechanism (air blast, arm, chute) diverts non-conforming parts without stopping the line.
- Post-machining inspection: the robot presents the finished part in front of multiple cameras (multiple faces); measurements are compared to tolerances and the decision is recorded with the part ID.
- Machine loading and unloading: the robot locates raw parts whose position varies, loads them into the machine tool, then unloads and inspects the machined part. The standalone cell becomes an autonomous cell.
For the integration of collaborative robots in an SME, see our collaborative robotics integration guide; for internal logistics, our article on AGVs and AMRs in industry.
Communication between robot and vision system
The vision system and the robot communicate via market-standard protocols: fieldbuses (EtherNet/IP, Profinet, EtherCAT) or OPC UA, with structured exchanges: position request, response with coordinates and orientation, acknowledgment. The end-to-end latency (image capture, processing, transmission, robot motion) must be sized at the design stage: for a part pick, a budget of 100 to 300 ms between the image trigger and the motion command is common, which requires local processing and low-jitter communication.
Project methodology: how to avoid failure
A machine vision project rarely fails on the technology; it fails on the methodology. The proven approach comprises four steps.
1. Precise functional specification
Everything starts with a quantified specification: which defects to look for, which tolerances to measure, at what rate, on which parts and variants, in what environment (vibrations, dust, temperature, ambient light). Golden rule: a criterion that cannot be quantified cannot be validated. "Detect scratches" is not enough; "detect scratches longer than 2 mm visible to the naked eye, on the visible face, at a rate of 60 parts per minute" is a specification.
2. Feasibility study on real parts
Before any purchase, images must be acquired with the intended camera and lighting, on real parts, including defective parts from production (failing that, parts deliberately damaged). This step is what essentially determines feasibility. It is conducted on-site or with parts sent to the supplier—never from photos taken with a phone. The questions to settle: is the contrast sufficient? Is the lighting stable? Is the defect visible under these conditions?
3. Prototype under real conditions
The prototype (POC) is installed on the line, in real production, for a significant period (several weeks). True false-acceptance rates (undetected defects) and false-rejection rates (good parts rejected) are measured and compared to the objectives. Two indicators guide the decision: sensitivity (proportion of defects detected) and specificity (proportion of good parts accepted). A system that rejects 5% of good parts will be refused by operators, even if it detects all defects.
4. Industrialization and change management
Production deployment integrates the system into the flow (conveyor, rejection chute, PLC interfaces), trains operators and maintenance staff, and defines reject management (manual confirmation check, root-cause analysis). The human factor is real: a system perceived as a "judge" is bypassed; a system perceived as an assistant, displaying the part and the reason for rejection, is adopted. Displaying rejection images with the defect circled is not a gimmick: it is the main factor for user acceptance.
ROI: what a vision system costs and what it returns
The cost of a complete system varies greatly depending on the project. As an indication, the following orders of magnitude are commonly observed:
- Simple inspection station (one camera, lighting, classical processing, no robot): €10,000 to €25,000, including hardware and integration.
- Deep-learning cell (GPU, image collection and labeling, training): €25,000 to €60,000.
- Vision and robot cell (bin picking or multi-face inspection): €50,000 to €120,000 depending on the robot and complexity.
On the other side, the gains add up: elimination or reassignment of the manual inspection position, reduction of scrap and returns, 100% inspection instead of sampling, and often the most profitable of all, the ability to justify a throughput increase or win a contract that requires automated inspection. Depending on the case, payback often falls between one and two years. Automated inspection also changes the commercial relationship: a supplier able to produce a complete inspection file for each batch (PPAP, conformity report) can respond to tenders that were closed to them with manual inspection.
Mistakes that cause projects to fail
A few recurring mistakes are costly:
- Treating lighting as an afterthought: this is the number-one cause of failure. Choose the lighting first, then the camera.
- Testing with perfect parts: if the prototype has never seen a real defective part, the production rollout will reveal everything the system cannot handle.
- Ignoring the environment: dust, vibrations, and temperature variations change the images. The system must be tested under worst-case conditions, not best-case.
- Confusing accuracy and repeatability: a 12 MP camera does not make a measurement more accurate if the lighting varies or the part is not positioned reproducibly.
- Under-specifying the software: the operator interface, recipe management (product changeovers), result archiving, and integration with the information system often account for half the effort, not 10%.
- Ruling out deep learning for cosmetic defects: persisting with threshold-based rules for non-reproducible defects leads to a dead end; an anomaly-detection model trained on conforming parts often delivers a much faster solution.
Conclusion: a building block of the connected factory
Automated quality control through vision is no longer reserved for large corporations. Standardized GenICam cameras, open-source processing, accessible deep learning, IoT data collection of results: the technology is mature and costs have dropped significantly. For an industrial SME, the sensible approach is sequential: choose a high-stakes application (a manual inspection on a high-value part, or a recurring customer requirement), conduct a feasibility study on real parts, validate a prototype in production, then industrialize with quality data fed back to the supervision platform.
Machine vision is also, often, the first building block of a connected-factory approach: once inspection results are digitized and centralized, correlating them with production parameters opens the door to predictive maintenance, and full traceability strengthens the commercial position. Success then depends as much on mastery of embedded systems, industrial protocols, and data collection as on the algorithm itself: that is what separates a lab demonstration from a system running in production 24/7.


