Factory Automation Hub
Machine Vision

Machine Vision Basics: How Vision Cameras Work

Published 6 min read

A close-up view of an industrial machine vision camera mounted near a conveyor belt.
Quick answer

Machine vision systems convert light into digital signals using specialized cameras, lenses, and illumination. These components work together to inspect, measure, and identify objects on production lines. Understanding these fundamentals helps engineers select the right hardware for specific automation tasks.

Key takeaways
  • Machine vision relies on three core parts: illumination, optics, and the digital sensor.
  • Choosing the right lens and light setup often matters more than picking the highest resolution camera.
  • Frame rate and exposure time are tied to how fast your product moves and how thin it is.
  • Sourcing decisions depend on matching these hardware traits to your specific inspection task.

A machine vision system does one thing. It captures an image and turns that image into a decision. The camera records light from an object. Software processes the data. The system then flags a defect, measures a dimension, or confirms a label is present. The hardware selection depends on matching the right optical and digital traits to the specific job.

What is machine vision?

Machine vision is the use of cameras and sensors to see, measure, or identify objects in an industrial setting. It sits between the physical product and the software logic. The system receives a physical stimulus, usually light, and converts it into a digital signal. That signal is then analyzed.

This differs from a consumer camera. A consumer camera tries to make an image look pleasing to the human eye. It uses wide color ranges and automatic white balance. Industrial imaging aims for consistency. It needs to capture the same defect every time, at the same brightness, on the same day of the week. The goal is repeatability, not aesthetics.

How does a vision camera capture an image?

The core of any industrial imaging system is the sensor. This is a grid of pixels on a silicon chip. Each pixel acts as a tiny light collector. When light hits the sensor, it generates an electrical charge. The camera electronics measure this charge and convert it into a number. That number represents the brightness of that spot in the image.

There are two main sensor types. Area scan sensors capture the entire frame at once. This is standard for most inspection tasks. Global shutter sensors freeze the entire frame simultaneously. This is useful when the object is moving, as it prevents motion blur across the whole image. Rolling shutter sensors capture the image line by line. This is common in high-speed video but can cause skew if the object moves quickly.

Resolution is the next factor. It is the number of pixels. A high resolution sensor reveals small details. It also captures more data. More data means slower processing and larger storage needs. A low resolution sensor is fast and cheap. It works well for large scale checks. For example, checking if a large box is present on a pallet requires far fewer pixels than checking for a hairline crack on a microchip.

How does illumination affect the image?

Light is the fuel of industrial imaging. Without proper illumination, the sensor sees nothing. The light source is often more critical than the camera itself. It defines the contrast and the visibility of the feature being inspected.

There are two main lighting strategies. Diffuse lighting spreads light evenly. It is good for checking surface flatness or color. It works well for matte materials. Specular lighting creates a sharp reflection. It is used to see fine edges or to make a shiny surface appear black or white.

The angle of the light matters. Front lighting illuminates the object from the same side as the camera. It is simple but can hide defects in deep grooves. Oblique lighting, or side lighting, shines from an angle. This creates shadows. Those shadows make small bumps, scratches, or missing parts stand out clearly.

Coherent light sources, like lasers or ring lights, offer different advantages. A ring light creates a bright circle around the subject. It is good for detecting the edges of a cylinder. A laser sheet can be used to measure the height of a stack of paper. The choice depends on the material and the defect.

How do lenses and optics work?

The sensor captures light. The lens directs that light onto the sensor. The lens is an optical system made of glass or plastic elements. It focuses the light to form a clear image.

The focal length determines the field of view. A short focal length gives a wide view. A long focal length gives a narrow view. The working distance is the physical space between the lens and the object. You must leave enough room for the lens to focus. If the object moves too close, the image blurs.

Aperture controls the depth of field. A wide aperture lets in more light. It creates a shallow depth of field. Only a thin slice of the object is sharp. A narrow aperture lets in less light. It creates a deep depth of field. More of the object stays in focus. This is useful for thick 3D objects.

The choice of lens is a trade-off. You cannot have a huge field of view, high magnification, and deep depth of field all at once. You must prioritize. If you are inspecting a thin profile, you need a long working distance and a specific focal length. If you are inspecting a large area, you need a wide field of view.

How does the system make a decision?

The camera captures a stream of pixels. The software processes those pixels. This is where the vision system becomes an intelligent tool.

The first step is image preprocessing. The software adjusts the contrast and filters out noise. This makes the features easier to find. The next step is segmentation. The software separates the object of interest from the background. It might use color, brightness, or shape to do this.

After that, the system looks for specific features. This could be a corner, an edge, or a specific pattern. The software compares the current image to a reference model. If the match is within a defined tolerance, the pass condition is met. If not, the system flags a fail.

The speed of this process is critical. The software must run faster than the cycle time of the machine. A high resolution image takes longer to process. A complex algorithm takes longer to run. The system must be sized for the throughput of the line.

How do you choose the right hardware?

Sourcing a machine vision system requires matching the hardware to the task. Start by defining the defect or the measurement. What is the size of the feature? How fast is the product moving? What is the background?

Look at the resolution. Count the number of pixels needed to resolve the smallest detail. A rule of thumb is to have at least two or three pixels across the smallest feature. This ensures the software can detect it.

Check the frame rate. Calculate how many seconds you have to capture and process the image. This is the cycle time minus the time the product is under inspection. The camera must be fast enough to meet this deadline.

Consider the lighting. A standard white LED might not work for a shiny metal part. A line light or a backlight might be needed. The lighting setup determines the image quality. If the image is bad, no amount of software can fix it.

Component Key Parameter Sourcing Consideration
Camera Resolution Match pixels to smallest defect size
Lens Focal Length Determine working distance and magnification
Light Angle Choose diffuse vs specular based on material
Software Algorithm Select based on defect type and speed

A worked example

Imagine a line that packs small glass bottles. The task is to check that the cap is present and centered. The bottle moves at a moderate speed. The cap is small and reflective.

First, the lighting is chosen. A backlight is used behind the bottle. This makes the silhouette of the cap stand out against a dark background. The reflective surface of the cap does not matter because the light is coming from behind.

Next, the camera is selected. The resolution is high enough to see the edge of the cap. The frame rate is fast enough to capture the bottle as it passes. A global shutter sensor is used to prevent blur.

The lens is mounted on a bracket. The working distance is set so the entire cap is in focus. The software looks for a circular shape. It measures the center of that shape. It compares the center to the center of the bottle body. If the difference is small, the cap is centered. If the difference is large, the system triggers a reject signal.

The system is not just a camera. It is a coordinated setup. The light defines the image. The camera captures it. The software interprets it. The sourcing decision is about getting these three parts to work together for the specific job.

Frequently asked questions

Do I need a high resolution camera for every machine vision task?

No. Resolution should match the size of the smallest feature you need to detect. High resolution increases cost and processing time. A lower resolution camera works well for large scale checks.

What is the difference between a global shutter and a rolling shutter sensor?

A global shutter sensor captures the whole image at once, which is good for moving objects. A rolling shutter sensor captures line by line, which can cause skew if the object moves quickly.

Can a standard web camera be used for industrial imaging?

Generally no. Web cameras are designed for human viewing, not machine inspection. They lack the consistent exposure, high frame rates, and specialized lenses needed for reliable factory automation.

How does the background affect the choice of lighting?

The background contrast determines the best lighting method. A dark background works well with diffuse lighting. A bright background may require backlighting or specular lighting to create contrast.

What is the biggest mistake in sourcing machine vision systems?

Focusing only on the camera resolution. The lighting and lens selection are often more critical for image quality. A high resolution camera with poor lighting will produce useless data.