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
Machine vision camera selection starts 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. Line scan camera resolution across the material is the width covered divided by the pixels on the sensor; along the material it is set by the encoder and the line rate. 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).
Machine vision lens selection: focal length, C-mount, telecentric
A machine vision lens has a fixed focal length. For a given sensor size, the focal length and the working distance set the field of view, which is the arithmetic a machine vision lens calculator does: 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.
| Application | Camera | Lens | Note |
|---|---|---|---|
| Label presence, position and print | Area scan, monochrome or colour | Standard fixed focal length lens | Colour only if colour itself must be checked. |
| Date and batch codes (OCR/OCV) | Area scan, monochrome, or a smart camera | Standard lens sized to the code area | Resolution is set by the smallest character stroke. |
| Barcodes and 2D codes | Code reader or area scan camera | Built-in or standard lens | A fixed code reader is often simpler than a camera. |
| Fill level and caps | Area scan, monochrome | Standard lens with a backlight | Several views for caps and tamper bands. |
| Surface defects on separate parts | Area scan, higher resolution | Standard or low-distortion lens | Lighting geometry matters more than the camera. |
| Dimensions in one plane | Area scan, monochrome | Telecentric lens where height or position varies | Backlight for sharp edges. |
| Heights, steps, volume | 3D laser profiler | Built into the sensor | Needs product motion and an encoder. |
| Film, foil, paper, fabric | Line scan camera | Lens that covers the long sensor | Encoder triggering and a line light. |
Work a spatial and motion budget together
Hypothetical optical example: a 120 mm horizontal field of view on a 2,432-pixel sensor gives 120 / 2,432 = 0.0493 mm per pixel at the object plane. A 0.20 mm feature spans about 4.05 pixels. That may be a useful starting point for an image trial, but it is not a 0.0493 mm accuracy specification. Lens contrast, feature orientation, focus, edge threshold, calibration and mechanical movement all affect the measurement. NIST treats repeatability and bias as separate characteristics; an attractive pixel calculation proves neither. (NIST e-Handbook, 2.4 Gauge R&R studies)
Assume, only for the motion calculation, an object speed of 1,000 mm/s and an allowed image displacement of one pixel. The exposure budget is 0.0493 / 1,000 seconds, approximately 49 microseconds. A brighter or strobed light may be needed to obtain adequate contrast at that exposure. The assumed blur allowance is an engineering trial condition, not a universal standard. Use the fastest local surface motion, including rotation or vibration, rather than the conveyor’s average speed.
| Catalogue reference | Horizontal pixels / pixel pitch | How to use the data |
|---|---|---|
| MV-SC5020XM | 1600 / 3.45 µm | Sensor width about 5.52 mm for an initial optical model |
| MV-SC5050XM | 2432 / 3.45 µm | Sensor width about 8.39 mm; verify chosen lens image circle |
| MV-SC5120XM | 4096 / 3.45 µm | Sensor width about 14.13 mm; check edge sharpness |
| MV-SC6250M | 5120 / 2.5 µm | Sensor width 12.8 mm; smaller pixels do not guarantee better measurements |
HIKROBOT’s catalogue provides the sensor dimensions and lens options used here. (HIKROBOT Smart Product Catalog, 2025 Q4) For first-pass conventional optics, field of view is approximately sensor width multiplied by object distance divided by focal length at low magnification. The working distance measured from the lens housing is not necessarily the optical principal-plane distance. Use the lens maker’s field-of-view data and then image the real product at the nearest and farthest allowed positions. A telecentric lens reduces magnification change over its specified range but does not remove focus, calibration or alignment limits.
Configure and diagnose the complete optical system
| Symptom | Discriminating check | Next action |
|---|---|---|
| Sharp centre, soft corners | Flat target across the full field | Check lens image circle, tilt and aperture |
| Correct on fixture, wrong when reloaded | Height and pose versus reference result | Control presentation or evaluate telecentric optics |
| Sharp stopped, blurred moving | Compare identical settings at both speeds | Shorten exposure and increase controlled illumination |
| Bright background but invisible scratch | Change incidence angle without changing the defect | Choose light geometry that exposes surface slope |
| Scale changes after maintenance | Calibration target and mechanical reference positions | Restore geometry and recalibrate before release |
Lock exposure, gain, focus and aperture after the image trial. Automatic settings can make a dark defective surface appear as bright as an acceptable surface and move a threshold without anyone changing the recipe. Record the light setting and polariser orientation as configuration items. The lighting catalogue distinguishes backlight, bright-field and low-angle techniques; they reveal different physical features, so one attractive image is not evidence that every defect family is visible. (HIKROBOT Light Source Catalog, 2025 Q3, glossary)
For a measurement application, build an uncertainty budget covering reference uncertainty, calibration, repeatability, temperature and presentation. JCGM 100 sections 4–6 explain evaluation and combination of uncertainty contributions; its framework does not prescribe a tolerance for your product. (JCGM 100:2008, Guide to the expression of uncertainty in measurement) Confirm the selected optics against the drawing’s functional requirement, including the datum and the surface being measured, before accepting the station.