AI Adoption & Operations

Machine Vision in Quality Inspection: How to Introduce It Step by Step

Marin Niehues1 February 202411 min read

Technical equipment in a research facility

You introduce machine vision in quality inspection by fixing the inspection task and the permitted error rate first, then choosing optics and lighting, and only then the evaluation software. Software is seen as the hard part, yet in practice a repeatable image and a station that keeps pace with production decide the outcome more often. This article sets out the decisions in the right order.

Machine vision is one of the oldest industrial uses of automated sight, and learning-based methods have set it in motion again. For the management of a manufacturing business the question is when a camera system supplements or replaces visual inspection, and what has to be done before operation is stable.

How does machine vision work in quality inspection?

Machine vision in quality inspection photographs every workpiece, evaluates the image with software and passes a verdict to the line, such as good, bad or recheck. A system has five building blocks: the lighting, the lens, the camera, the evaluation and the interface to the line controller. The lighting decides which features become visible in the image at all. A scratch on a glossy surface shows up only under a particular direction of light, and the same scratch stays invisible under diffuse light. Experienced machine vision engineers therefore spend most of the development time on light and optics.

The evaluation follows one of two basic principles. Rule-based methods measure edges and distances as well as areas and colour values, and compare them with tolerances set by a person. Learning-based methods, usually deep neural networks, learn from labelled example images what a defect is. They suit features that are hard to put into rules, such as surface defects on castings, textiles or food. A special case is anomaly detection, which is trained only on images of defect-free parts and flags anything that deviates. It helps where examples of defects are rare.

Rule-based or deep learning: which method fits?

Rule-based image processing fits when the inspection feature can be described in dimensions and tolerances. Deep learning fits when defects vary widely in shape and location and an experienced inspector recognises them in the image but cannot express them as rules. The table orders the criteria.

The choice does not have to be exclusive. Many inspection stations combine both: rules check dimensions and completeness, while a network assesses the surface. The combination raises the release effort, though, because both parts must prove that they work reliably.

How do you introduce machine vision in five steps?

An introduction succeeds in five steps, each closed by a decision of the people responsible. The sequence follows the logic that applies to other AI initiatives as well: understand first, then build, then roll out.

  1. Define the inspection task: Which defects must be found, at what size, at which location and at what cycle time? This includes the question of what defect rate the company has today and which defects customers complain about today. These figures form the baseline against which success is measured.
  2. Clarify image capture: Lighting and optics are tested together with the camera on real parts from running production, not on clean samples. Vibration and dirt belong in the test, as do part tolerances and changing light in the hall. The guideline series VDI/VDMA 2632 describes how requirement and specification documents for vision systems are structured, so that user and supplier mean the same thing. The EMVA 1288 standard of the European Machine Vision Association defines how characteristic figures of cameras and image sensors are measured, so that data sheets from different manufacturers can be compared.
  3. Develop the evaluation: The method is selected and developed on a data set that reflects the spread of production. For learning-based methods this includes the split into training and test images. The test images must never appear in training, otherwise the test measures memorisation.
  4. Demonstrate capability: The system inspects a sample with known defects, and the result is compared with the reference. The same part must receive the same verdict when inspected repeatedly. The proof follows the methods of measurement system analysis that are established in quality assurance.
  5. Move into operation: The station first runs alongside the existing inspection, deviations are discussed, and only then does the system take over. By then it is settled who steps in on false alarms, who changes parameters and who retrains the model.

Which figures decide the release?

Two types of error decide the release: the escape, where a faulty part passes as good, and the false reject, where a good part is sorted out as bad. Both values depend on the same decision threshold. If the threshold is set more strictly, escapes fall and false rejects rise. The costs of the two types differ greatly: an escape can trigger a complaint, a recall or a stoppage at the customer, while a false reject costs the part and the recheck.

The release therefore fixes the permitted escape rate first, usually at a value that is acceptable to the customer and the industry, and optimises false rejects afterwards. A system that finds every bad part and sorts out every tenth good part along the way is a cost driver on the shop floor. Rechecking by people catches false rejects, but it ties up exactly the capacity the system was meant to free.

How does an inspection system pay back?

An inspection system pays back when the saved inspection costs and the avoided failure costs exceed investment and running costs. The following example works with assumed values that every company must replace with its own figures.

The calculation has two weak points that the business case must expose. First, inspector posts only disappear if the company redeploys the people or uses natural turnover. Second, the calculation assumes that false rejects and rechecking are included. The article on robotics in medium-sized manufacturing shows how a robust business case is built, and its logic carries over to inspection stations.

What goes wrong during introduction?

Three patterns recur with inspection systems. The first is the demonstration on sample parts: the system recognises every defect in the lab and fails in the hall under varying light. The countermeasure is a test with parts from several batches and shifts before the purchase decision is made. The second pattern is the missing defect catalogue. If quality assurance has not defined what a defect is, a network learns the opinion of the labeller, and two labellers give different verdicts for the same image. The third pattern is operation without an owner. After commissioning, workpieces and suppliers change and so does the lighting, and without a responsible person the system slowly loses accuracy without anyone noticing.

The article on RPA bots shows a parallel: automation that nobody maintains after go-live also becomes a legacy burden.

Introducing machine vision with Niehues Consulting

Niehues Consulting is a consultancy for AI management and organisation design from a delivery perspective, based in Düsseldorf. Founder Marin Niehues brings AI into operations, in projects ranging from VC-funded scale-ups to DAX 40 groups and in more than 20 countries on six continents. The work covers business analysis and requirements as well as the business case, the selection and sequencing of applications, and introduction and delivery management. The image processing itself comes from system integrators and manufacturers, and responsibility for the result in operation stays with the company.

The approach follows the Niehues Delivery Model. For inspection stations three of its checking questions matter most: What is the baseline, and how do we measure success? Does the prototype prove the benefit in the real process with real data? Who is responsible for operation from day one? The entry point is a free initial consultation of 30 minutes, which you can book through the contact form. Scope and terms of an engagement are discussed there.

Frequently asked questions

How much does a machine vision system cost?

Costs range from a few thousand euros for a simple smart camera to six-figure amounts for an integrated inspection station with special mechanics. Integration and development often make up the largest share, along with the lighting, rather than the camera. Scope and terms of an engagement are discussed in the free initial consultation.

Does machine vision fully replace human visual inspection?

Machine vision replaces visual inspection where the inspection feature is clearly described and the image is repeatable. For complex surfaces or subjective features such as appearance, a sample check by people remains sensible. Many plants run people and system in parallel until the release figures have been stable for several weeks.

How many images does a deep learning model need for inspection?

The number depends on the defect pattern, and hundreds of labelled images per defect class are a common rule of thumb. For rare defects, anomaly detection methods trained only on images of defect-free parts are enough. What matters is that the images reflect the spread of production.

How long does it take to introduce an inspection station?

The duration follows the complexity of the inspection feature and the integration into the line. Simple rule-based applications are trialled in a few weeks, whereas learning-based systems usually need several months for data collection and labelling, then for release. The parallel phase alongside the existing inspection often takes the largest share of time.

When is machine vision worth it compared with manual inspection?

Machine vision is worth it with high volumes, stable inspection features and costly failures. With small batch sizes and changing products, set-up eats the benefit. The calculation in this article shows how many inspection stations it takes for the investment to pay back.

How do you measure the quality of a vision system?

You measure the quality of an inspection system by its escape rate and false-reject rate against a reference inspection with known defects. Repeatability adds to this: the same part must receive the same verdict across several runs. The methods come from measurement system analysis in quality assurance.

Part of the guide: AI Implementation: From Prototype to Operations, the Guide for Decision-Makers

Let’s talk about your initiative.

In 30 minutes we clarify where your organisation stands and which step will pay off most now.

Book a consultation

30 minutes · free of charge · no obligation