addaScan home
Guide

Choosing the camera and lens for a machine vision inspection station

Field of view, resolution, shutter, interface, lens and 3D sensors, explained for engineers planning an inspection.

By addaScan engineering teamTechnical review: Frank GuoPublished 9 min read

Size the camera on your samples
// Short answer

Choose a machine vision camera and lens from the area that must be seen and the smallest defect that must be found: the defect should cover several pixels across the whole field of view. Use an area scan camera for separate products and a line scan camera for continuous material, with a global shutter and a short exposure on moving lines. Pick the lens focal length for the field of view and working distance, a telecentric lens for measurement, and a 3D sensor for heights.

Key points

  • Start from the smallest defect and the area to cover; the camera and lens follow from those two numbers.
  • The smallest defect must cover several pixels in the image, with margin for position and focus.
  • Area scan cameras suit separate products; line scan cameras suit webs and continuous material.
  • Moving products need a global shutter and a short exposure, which in turn needs enough light.
  • Lens, lighting and camera are chosen together and confirmed on your samples.

Start from the defect, not the camera

A machine vision camera is chosen from two numbers: the size of the area that must be seen, and the size of the smallest defect or detail that must be found. Line speed, the product surface and the space on the line then narrow the choice. Starting from a camera model and hoping it will see the defect is the most common way to end up with a station that does not work.

Field of view and resolution

The field of view is the area the camera captures, with a margin for variation in product position. Divide its width by the number of pixels across the sensor, and you get the size each pixel covers on the product. The smallest defect must cover several pixels, not one, to be found reliably; a detail smaller than a pixel may vanish or appear depending on where it falls.

That gives the resolution the camera needs. More megapixels are not automatically better: they mean more data per image, longer processing and often more light for the same exposure. The right resolution is the lowest that shows the defect reliably across the whole field of view.

Area scan or line scan camera

An area scan camera captures a whole rectangular image at once and suits separate products such as bottles, cartons and parts. A line scan camera has a sensor that is one or a few pixels high and very wide; it builds a continuous image line by line as material moves, triggered by an encoder. It suits film, foil, paper, fabric and sheet, and wide or fast products. See web inspection with line scan cameras.

Global shutter, exposure and frame rate

On a moving line, the camera needs a global shutter, which exposes every pixel at the same moment; a rolling shutter exposes row by row and distorts moving products. The exposure must be short enough that the product moves less than a fraction of a pixel during it, and a short exposure needs bright or strobed light. The frame rate must cover the number of products per second times the images per product, with margin; processing and the interface often limit it before the sensor does.

Monochrome or colour

Most inspections use monochrome cameras: they are more sensitive and give sharper detail per pixel, and coloured light can make a feature stand out in grey tones. Use a colour camera when the check is about colour itself, such as a wrong cap colour or a missing print colour, with stable white light.

Specialised cameras extend what can be seen. HDR imaging keeps both bright and dark areas usable in one image, for example foil next to print. SWIR (short-wave infrared) cameras show moisture and see through some materials that look opaque in visible light. Polarisation cameras reveal glare, stress and surface texture on shiny and transparent parts. They are used when a standard camera cannot separate the defect.

GigE, USB3 and other interfaces

GigE Vision cameras send images over Ethernet, allow long cable runs and several cameras on one network, and often take power over the same cable (PoE). USB3 Vision gives high bandwidth over short cables. Both are based on GenICam, the EMVA standard that lets software control cameras from different makers in the same way (EMVA, GenICam). Faster interfaces such as 10GigE, Camera Link and CoaXPress are used for very high data rates. HIKROBOT lists GigE, USB3.0 and 10GigE cameras among its machine vision products (HIKROBOT, About).

Choosing the lens: focal length, C-mount, telecentric

A machine vision lens has a fixed focal length. For a given sensor, the focal length and the working distance set the field of view: a longer focal length gives a narrower view from the same distance. The lens must resolve detail as fine as the camera’s pixels, or small defects blur away, and it must cover the whole sensor, or the corners darken.

C-mount is the usual screw mount on industrial area scan cameras; large sensors and long line scan sensors often need larger mounts. A telecentric lens keeps the image size constant when the distance to the part changes slightly, which is what measurement needs when parts vary in height or position; it is large, heavy and must be at least as wide as the area it measures. See dimensional inspection.

When a 2D camera is not enough: 3D sensors

A 2D camera measures in one plane. For heights, steps, flatness and volume, a 3D laser profiler uses laser triangulation: a laser line on the part, viewed by a camera at an angle, shifts with height. Structured light and stereo cameras are other 3D scanning methods, and time-of-flight cameras suit larger, coarser measurements. Each needs its own lighting conditions and usually product motion with an encoder.

Starting points by application

Starting points only; the final choice is made with the lighting on your samples. See also the machine vision lighting guide.

Starting points for camera and lens by inspection application
ApplicationCameraLensNote
Label presence, position and printArea scan, monochrome or colourStandard fixed focal length lensColour only if colour itself must be checked.
Date and batch codes (OCR/OCV)Area scan, monochrome, or a smart cameraStandard lens sized to the code areaResolution is set by the smallest character stroke.
Barcodes and 2D codesCode reader or area scan cameraBuilt-in or standard lensA fixed code reader is often simpler than a camera.
Fill level and capsArea scan, monochromeStandard lens with a backlightSeveral views for caps and tamper bands.
Surface defects on separate partsArea scan, higher resolutionStandard or low-distortion lensLighting geometry matters more than the camera.
Dimensions in one planeArea scan, monochromeTelecentric lens where height or position variesBacklight for sharp edges.
Heights, steps, volume3D laser profilerBuilt into the sensorNeeds product motion and an encoder.
Film, foil, paper, fabricLine scan cameraLens that covers the long sensorEncoder triggering and a line light.
// FAQ

Questions about cameras and lenses

How do I calculate the field of view for a machine vision camera?
Take the area that must be seen, add a margin for variation in product position, and use that as the field of view. Divide its width by the number of pixels across the sensor to get the size each pixel covers on the product; the smallest defect should cover several pixels.
What is a telecentric lens and when is it needed?
A telecentric lens keeps the size of the image constant when the distance to the object changes slightly, because it only accepts light rays parallel to its axis. It is needed for measurement where parts vary in height or position. Its front must be at least as large as the area to be measured.
Line scan camera vs area scan camera: which should I use?
Use an area scan camera for separate products that pass one at a time, and a line scan camera for continuous material or for wide, fast products imaged as they move. Line scan needs an encoder and a line light.
Why do inspection cameras use a global shutter?
Because products move. A global shutter exposes all pixels at once, so a moving product is not distorted; a rolling shutter exposes row by row and skews fast-moving objects.
Is a GigE camera better than a USB3 camera?
Neither is better in general. GigE allows long cables and several cameras on one network, often with power over the same cable; USB3 gives high bandwidth over short cables. Both are covered by GenICam-based standards, so inspection software can control either.
How many megapixels does an inspection camera need?
As many as it takes for the smallest defect to cover several pixels across the whole field of view, and no more: higher resolution means more data, slower processing and often more light. The number follows from the field of view and the defect size, confirmed on samples.

Sources

  1. EMVA: GenICam standard (standards body, read 2026-09-25)
  2. HIKROBOT: About (product lines) (vendor page, read 2026-09-25)
// Next step

Not sure which camera and lens your check needs?

Send a few good and defective samples and the size of the area to inspect. We size the camera, lens and lighting on your parts in the sample test.

Start an assessment