guides

    Machine vision basics: visual inspection and optical quality control

    Korbinian Kuusisto, CEO and founder of Enao Vision
    Korbinian KuusistoCEO & Founder, Enao Vision
    April 18, 2026
    Share:
    Machine vision basics: visual inspection and optical quality control

    Machine vision basics describe three commonly mixed-up terms: machine vision (the technology), visual inspection (the task) and optical quality control (the process). The technology combines cameras, lenses, lighting, compute and software to automate visual decisions on a production line, serving as a cornerstone of industrial automation. Visual inspection is one such decision: pass or fail, scratched or clean, full or short-filled. The quality management process is the auditable wrapper around it, under which inspection gets documented for ISO 9001 or GMP audits.

    What does machine vision actually mean?

    Machine vision is the umbrella term for systems that combine cameras, lighting, compute and software to automate visual decisions on a production line. The decisions can be pass or fail (quality), which part is this (identification), or where exactly is the part (robot or gripper guidance).

    Three components are always in play: an image source (camera plus lighting plus optics), an algorithm that interprets the image (rule-based image processing or a neural network), and an action the plant floor takes on the result (reject, document, stop the line, trigger a gripper). For the full picture of how these pieces fit together we recommend the industrial image processing guide and the machine vision inspection guide as companion reads.

    What does visual inspection actually do on a line?

    Visual inspection is the classic task most people mean when they talk about quality with machine vision. When a camera on a packaging line checks every label, that is visual inspection. When a camera inside an injection molding machine flags flash or inclusions, that is visual inspection. The term describes the task, not the technology.

    In practice visual inspection is the bridge term quality managers understand immediately. They have done visual checks manually or with magnifiers for decades. A camera that automates the same check is an inspection station. For a deeper definition read What is AI visual inspection.

    Cameras, lenses and optics: what shapes the image

    Before any model runs, the camera and lens decide how much information the system has. Three optical parameters drive every choice.

    Working distance is the gap between the lens and the part. A short setup keeps the rig compact but limits how the line moves around it. A longer one helps when conveyors, robots or operators share the same footprint.

    Field of view is the area the camera captures in one frame. A narrow frame boosts pixel density on a small defect; a wide one covers a whole product but at lower detail per millimetre. Most projects iterate until the smallest defect class still spans enough pixels for reliable image analysis.

    Lens choice follows from those two parameters. A fixed focal length lens is cheaper, sharper and easier to calibrate. A zoom lens trades sharpness for flexibility when the product mix on the line keeps changing. Telecentric lenses remove perspective error and are the natural pick for dimensional measurement, gauging and metrology, where a millimetre of parallax breaks the reading.

    For three-dimensional features such as warpage, dent depth or stacked-part counting, 3D cameras add a depth channel on top of the 2D image. A laser line, structured light or stereo pair gives the system a height map the lens alone cannot recover.

    Optics also set the limit for optical character recognition. OCR on a date code only works if each character spans roughly 20 pixels in the captured image. If the lens cannot deliver that, no model rescues the read.

    What are the four algorithmic classes of machine vision?

    Every machine vision project falls into one of four algorithmic classes. Knowing which one fits changes the data you need to collect and the lighting setup you will build.

    The first class is rule-based image processing, which covers classic measurement, edge detection, OCR and blob analysis. It is deterministic, fast and documented for decades, and it remains the right choice for dimensional measurement, presence/absence and code reading when geometry and lighting are stable.

    The second class is deep learning classification, where a neural network sorts each part into one of several categories such as pass, scratch or dent. It works well when the defect is visually consistent and labelled examples exist for every class. This is where modern artificial intelligence pays off most, because image contrast drives model accuracy.

    The third class is anomaly detection. The model learns what good parts look like and then flags anything that does not match, even defect types nobody has seen before. It is the right pick when defects are rare, varied or non-repeating.

    The fourth class covers object detection and segmentation. The model locates where each feature sits inside the image, pixel by pixel. Teams use it for counting parts on a tray, isolating individual cells inside a batch, or guiding a robot to pick a specific item.

    What four factors decide whether your first project ships?

    The first factor is lighting, and it is the single biggest predictor of whether a machine vision project works. Lighting makes a defect visible or invisible, and no algorithm recovers contrast that never existed in the image. Budget for a week of lighting trials before you touch the model.

    The second factor is data. Classical algorithms need carefully chosen parameters, while modern AI needs examples, usually 50 to 500 labelled images for a pilot. The right number depends on defect variety, and more classes means more images.

    The third factor is integration. A machine vision station that cannot talk to the PLC, MES, control system or the reject flap is expensive decoration. Plan early how inspection results reach the line, including retries, fault states and the operator HMI.

    The fourth factor is maintenance. Every line changes over time, so models drift, lighting ages and cameras gather dust. A working station today is not a working station in six months unless someone owns it. Budget 10 to 20% of build cost per year for ongoing care.

    Which machine vision applications ship fastest?

    Label and print inspection on packaging is one of the most common starting points. The volumes are high, the rules are clear, and there is plenty of reference imagery already in the building. The ROI often proves itself within weeks on the first line that runs.

    Seal and fill checks on bottles, pouches and blisters are another fast-shipping family. For category-specific playbooks see our deep dives into food packaging and pharmaceutical packaging.

    Surface defects on injection molded and stamped parts also ship quickly. The defect classes are well understood, the geometry is stable, and the parts are easy to light. This makes a good first project for SMEs that do not want to start with the hardest problem on the floor.

    Where to start

    Pick a line that runs every day, with a defect class your operators can describe in one sentence. Build a small lighting rig and capture 200 images. Decide between a rule-based and a learned approach only after you have looked at your own images. For a broader technology-by-technology overview also read the machine vision systems guide.

    Frequently asked questions about machine vision basics

    What is the difference between machine vision and visual inspection?

    Machine vision is the technology stack of cameras, lighting, compute and software. Visual inspection is one task you can run on top of it, namely deciding whether a part passes a quality check by looking at it. Other tasks like robot guidance and identification share the same hardware but solve different problems.

    What does a first machine vision project actually need?

    Three things, in this order: a defect class your operators can describe in one sentence, a stable lighting setup that makes the defect visible, and 50 to 500 labelled images. Algorithm choice and integration come after you have looked at your own data, not before.

    When does the rule-based approach still beat AI?

    When the inspection is dimensional, the geometry is tight, the lighting is stable and the defect taxonomy is closed. Code reading, presence/absence and micrometre-level measurements remain the natural ground for classical machine vision. AI takes over when the defect set is open, varied or dependent on subtle texture changes.

    Key takeaways

    Machine vision, visual inspection and the quality-management process are not interchangeable. They name the technology, the task and the procedure respectively, and a working line typically uses all three together.

    Modern systems split across four algorithmic classes: rule-based algorithms, deep learning classification, anomaly detection, and object detection or segmentation. Each fits a different defect pattern.

    Lighting is the single biggest predictor of project success. No algorithm rescues an image where the defect is invisible, so budget time for lighting trials before any model work.

    Plan integration into the PLC, MES and reject path from day one. A standalone inspection station that cannot act on its own results becomes a dashboard, not a control.

    Maintenance is part of the project, not after it. Models drift, lights age, and cameras gather dust. Budget 10 to 20% of build cost per year for ongoing care.

    Get started

    Want to see how Enao Vision works on your line? You can get started for free using an iPhone you already have, or join the community to compare notes with other quality and operations teams putting AI on the shopfloor.

    Explore with AI

    Discuss this article with your favorite AI assistant

    Korbinian Kuusisto, CEO and founder of Enao Vision

    Written by

    Korbinian Kuusisto

    CEO & Founder, Enao Vision