Machine vision inspection is the automated checking of products with industrial cameras, controlled lighting and image-processing software. The system photographs each part on the line, measures or classifies what it sees against a specification, and returns a pass or fail signal to the line, usually fast enough to reject a faulty part before it moves on.
Key takeaways
- A vision inspection system has five parts: camera, lens, lighting, a processing unit and software, plus a link to the line's PLC or reject mechanism.
- Lighting is often the deciding factor. The right technique (backlight, diffuse, dark field, structured light) makes a defect visible before any software runs.
- Rule-based vision suits measurement, presence checks and code reading; deep learning suits variable, cosmetic defects that are hard to describe with rules.
- Unlike manual sampling, vision can check every part, and it stores an image and a result for each one, which helps traceability.
- Start with one well-defined defect on one station, collect real images and agree on acceptable false-reject and escape rates before scaling up.
How does machine vision inspection work?
Every inspection follows the same cycle, repeated for each part.
- Trigger. A sensor or encoder signals that a part is in position.
- Image capture. Lighting fires (often strobed) and the camera takes one or more images.
- Processing. Software locates the part, then measures, reads or classifies the regions of interest.
- Decision. Results are compared with tolerances and turned into pass, fail or a defect class.
- Action and logging. The result goes to the PLC, which diverts rejects; the image and result are stored for traceability and later analysis.
The cycle must fit inside the line's takt time. On a fast packaging line that may leave only milliseconds per part, which affects every choice from camera interface to where the software runs.
What are the components of a vision inspection system?
| Component | What it does | What to decide |
|---|---|---|
| Camera | Converts light into a digital image | Area scan or line scan, resolution, frame rate, monochrome or colour, 2D or 3D |
| Lens | Projects the scene onto the sensor | Field of view, working distance, depth of field, telecentric for precise measurement |
| Lighting | Makes the feature or defect visible | Technique, colour (wavelength), strobing, enclosure against ambient light |
| Processing unit | Runs the analysis | Smart camera, industrial PC or an edge device with a GPU for deep learning |
| Software | Turns images into decisions | Rule-based tools, deep learning models, or both |
| Integration | Connects to the line and IT systems | PLC protocol, reject mechanism, MES or quality database |
Two industry standards help when you compare hardware. EMVA 1288 defines how camera and sensor specifications are measured and presented, so data sheets from different vendors can be compared fairly. GenICam provides a generic programming interface for cameras regardless of the interface technology, such as GigE Vision, USB3 Vision or CoaXPress, which keeps you from being locked to one camera brand.
Which lighting technique should you use?
Choose lighting for the defect, not for the part. The same scratch can be invisible under diffuse light and obvious under dark field.
| Technique | Best for | Typical use |
|---|---|---|
| Backlight | Sharp silhouettes and edges | Dimensions, hole presence, fill level in clear containers |
| Diffuse (dome) light | Reducing glare on shiny or curved surfaces | Metal parts, foil packaging, printed labels |
| Dark field | Highlighting surface texture | Scratches, engravings, dents on glass or polished metal |
| Structured light | Height and 3D shape | Weld beads, solder joints, warping, volume |
| Coaxial light | Flat, reflective surfaces | Wafer and PCB inspection, laser marks |
What can machine vision inspect?
Most applications fall into five groups.
- Defect detection: scratches, cracks, dents, contamination, discoloration, print errors.
- Presence and completeness: every screw, clip, label and seal is there.
- Measurement: lengths, diameters, gaps and positions against tolerances.
- Identification: barcodes, Data Matrix codes and printed text (OCR) for traceability, including lot and expiry dates.
- Guidance and orientation: confirming position and rotation so that a robot or the next station handles the part correctly.
Typical industries are automotive and electronics, food and beverage, pharmaceuticals and medical devices, packaging, metals and plastics.
Rule-based vision or deep learning?
Use rule-based tools when the defect can be described precisely, and deep learning when it can only be shown with examples. Many production systems use both.
| Rule-based (classical) vision | Deep learning | |
|---|---|---|
| How it works | Engineers set thresholds, edges, patterns and tolerances | A model learns from labelled images of good and bad parts |
| Strong at | Measurement, code reading, presence checks | Cosmetic defects, natural variation, textured surfaces |
| Data needed | A few reference images | A large set of labelled images, including examples of rare defects |
| Explainability | High: every rule is visible | Lower: needs validation sets and monitoring for drift |
| Change effort | Re-tune rules per product variant | Retrain with new images |
Deep learning models usually run on an edge device next to the line, because a round trip to the cloud is too slow for an inline reject decision. The cloud is still useful for storing images, labelling, retraining and rolling out new model versions to many stations. Services such as AWS IoT Greengrass let edge devices run predictions from machine learning models locally and exchange data securely with the cloud. Read more in our article on AI visual inspection for defect detection.
What are the benefits and the limits?
The main benefit is consistency: the system applies the same criteria to every part on every shift. Other gains are:
- Full coverage instead of sampling, so defects are caught before they reach a customer.
- Traceability: an image and a result for each unit, useful for complaints, audits and recalls.
- Process data: defect trends by shift, machine or supplier point to the root cause upstream.
- Less repetitive work for operators, who can focus on review and on the process.
The limits are just as practical. Vision only sees what the optics can show, so hidden internal defects need other methods such as X-ray. Frequent product changes add set-up work. Reflective, transparent or highly variable parts take longer to get right. And every system produces some false rejects; set an acceptable rate with production and quality before go-live, because too many false alarms lead operators to ignore the system.
How to get started
- Pick one defect that costs you money today, through scrap, rework or customer complaints.
- Collect real images from the line, including bad parts. Rare defects are usually the bottleneck for deep learning.
- Run a feasibility test with candidate optics and lighting before buying hardware for the line.
- Define acceptance criteria: detection rate, false-reject rate, cycle time and how results reach the PLC and quality system.
- Plan operations: who monitors performance, retrains models and handles new product variants.
For a deeper look at hardware choices and architecture, see our guide to machine vision inspection system components and selection.
How Opsio helps
Opsio builds and operates visual inspection and computer vision solutions, from feasibility tests and model training to edge deployment and cloud operations for image data and model updates. See our automated visual inspection service and computer vision consulting.
Frequently asked questions
What is the difference between machine vision and computer vision?
Computer vision is the broad field of making computers interpret images. Machine vision is its industrial application: cameras, lighting and software built into a production line to inspect, measure or guide, with a hard real-time link to machines.
Is machine vision inspection better than manual inspection?
For repetitive, well-defined checks at line speed, yes: it is consistent and can check every part. People are still better at judging new, unusual defects and at deciding what counts as acceptable, so many plants combine automated inspection with human review of borderline cases.
How accurate is automated visual inspection?
Accuracy depends on optics, lighting, the defect and the training data, so there is no single figure. Measure it on your own parts during a pilot, as detection rate and false-reject rate against a labelled test set.
What does a machine vision system cost?
Costs range widely, from a single smart camera with standard tools to multi-camera stations with 3D sensors, GPUs and custom integration. Hardware is often the smaller share; engineering, integration and ongoing tuning make up much of the total.
Can machine vision use AI for inspection?
Yes. Deep learning models now handle cosmetic and variable defects that rule-based tools struggle with. They need labelled images and monitoring for drift, and they usually run on edge hardware at the line.
Related reading: What is machine vision software.
Related reading: machine vision integrator.
Related reading: What is machine vision in ai.
Written By

Country Manager, Sweden
Johan leads Opsio's Sweden operations, driving AI adoption, DevOps transformation, security strategy, and cloud solutioning for Nordic enterprises. With 12+ years in enterprise cloud infrastructure, he has delivered 200+ projects across AWS, Azure, and GCP — specialising in Well-Architected reviews, landing zone design, and multi-cloud strategy.
Editorial standards: This article was written by the cloud practitioner named in the byline above. We revise it when the technology or regulation it covers changes; the dates on this page show the latest update. Opsio maintains editorial independence.