Sep. 25, 2026
When I design an inspection system, I treat camera resolution, lens selection, and field of view as one connected decision. Choosing Camera Resolution, Lens, and Field of View for Inspection determines whether a defect is visible, measurable, and detected consistently at production speed. A high-pixel camera cannot compensate for an unsuitable lens, excessive field of view, poor lighting, or insufficient depth of field. In this guide, I explain how I calculate the required image resolution, select focal length, evaluate optical limits, and validate the complete system before deployment.
I begin with the inspection requirement rather than a camera catalog. The smallest defect, dimensional tolerance, part size, movement speed, and available installation space define the optical specification. For example, detecting a 0.5 mm surface crack requires a different system from checking a 10 mm hole location with a ±0.05 mm tolerance.
The three main variables are related mathematically:
| Variable | What it controls | Typical design question |
|---|---|---|
| Camera resolution | Number of pixels available | How many pixels cover the smallest feature? |
| Field of view | Physical area visible in one image | Can the entire part and positioning variation fit? |
| Lens focal length | Magnification and image coverage | Can the camera achieve the required view from the available distance? |
A practical system also needs margin. If the theoretical calculation requires exactly 5 pixels across a defect, I would not specify a production system with only 5 pixels. Optical blur, vibration, lighting changes, lens distortion, compression, and part-position variation can reduce the usable information. I normally add at least 20% to 30% resolution margin, then confirm the result using production samples.
The required camera resolution depends on the smallest feature size, the number of pixels needed across that feature, and the physical field of view. The basic calculation is:
Required pixels per millimeter = required pixels across the feature ÷ feature size in millimeters
The minimum horizontal camera resolution is then:
Horizontal pixels = horizontal field of view × required pixels per millimeter
For a 0.5 mm defect that needs 5 pixels across its width, the minimum sampling rate is:
A 1,920 × 1,200 industrial camera would therefore provide enough horizontal sampling in this example, assuming the lens, lighting, and image processing preserve the defect contrast. If the inspection also requires a narrow dimensional tolerance, I may increase the target to 8–10 pixels across the critical feature rather than relying on the minimum detection threshold.
Pixels per millimeter is more useful than megapixels alone because it connects camera specifications to the physical inspection task. A 5-megapixel camera may provide insufficient detail if the field of view is too large, while a 2-megapixel camera may be suitable for a smaller inspection area.
| Inspection requirement | Suggested image sampling |
|---|---|
| Presence or absence of a large feature | 2–4 pixels across the feature |
| Basic defect detection | 5–8 pixels across the feature |
| Edge or shape measurement | 8–15 pixels across the feature |
| Fine dimensional measurement | 15 or more pixels across the critical feature |
These values are starting points rather than universal standards. Surface texture, contrast, motion blur, lens quality, and the inspection algorithm can change the usable threshold. I always test the smallest acceptable feature and the largest acceptable defect separately because detection and measurement may require different image quality.
Higher resolution gives the vision algorithm more samples along an edge, hole, crack, or boundary. This can improve edge fitting and reduce quantization error, but only when the lens and lighting deliver enough optical detail to the sensor. If the lens produces blur larger than several pixels, increasing camera resolution may increase file size without improving inspection accuracy.
Higher resolution also affects processing time. A 2,448 × 2,048 image contains approximately 5 million pixels, while a 1,920 × 1,200 image contains approximately 2.3 million pixels. At the same frame rate, the larger image creates more data for transfer, storage, preprocessing, and algorithm execution. For a conveyor inspection system, I therefore balance pixel count against trigger rate, exposure time, interface bandwidth, and the available processing hardware.
The field of view must include the complete part, the required measurement region, and the expected positioning variation. I do not set the field of view equal to the nominal part size because a part may shift, rotate, expand, or arrive with fixture variation.
A practical calculation is:
Required field of view = inspection area + positioning allowance + optical safety margin
For example, if a product is 80 mm wide, the fixture allows ±5 mm horizontal movement, and I need a 5 mm margin on each side, the horizontal field of view should be at least:
A smaller field of view increases pixels per millimeter, but it may cause part clipping when the object is not perfectly centered. A larger field of view captures more of the scene but reduces sampling density. This is the central camera resolution versus field of view difference: resolution describes available pixels, while field of view describes the physical area represented by those pixels.
For machine vision lens selection, I use four main inputs: sensor size, working distance, field of view, and required magnification. The focal length can be estimated using:
Focal length = sensor width × working distance ÷ field-of-view width
This formula assumes that the distances and dimensions use the same units. It provides an initial focal-length estimate, but the final lens must also be checked for distortion, image circle, aperture, depth of field, mounting compatibility, and optical resolution.
Assume the inspection requires the following values:
| Parameter | Design value |
|---|---|
| Horizontal field of view | 100 mm |
| Working distance | 300 mm |
| Sensor width | 11.3 mm |
| Sensor height | 7.1 mm |
| Target camera | 1,920 × 1,200 pixels |
| Smallest defect | 0.5 mm |
| Target sampling | 10 pixels/mm minimum |
The estimated focal length is:
11.3 mm × 300 mm ÷ 100 mm = 33.9 mm
I would begin testing with a lens near 35 mm. With a 7.1 mm sensor height and a 100 mm horizontal field of view, the vertical field of view would be approximately 62.8 mm if the sensor and image are used without cropping. If the part is taller than this, I would either use a larger vertical field of view, change the sensor format, rotate the camera, or use a different aspect ratio.
Working distance also affects installation and lighting. A longer working distance may create more room for lighting, guarding, and mechanical movement, but it usually requires a longer focal length for the same field of view. A shorter working distance can make the system compact, but it may increase perspective effects and reduce space around the inspection area.
I use a telecentric lens for dimensional measurement when object size, position, or height variation would create unacceptable perspective error. A standard lens makes objects appear smaller as they move farther from the lens, so a part that shifts vertically can produce a false dimensional change. Telecentric optics reduce this change within their specified working range.
A telecentric lens is especially useful for measuring:
The trade-off is cost, limited field of view, fixed working distance, and often reduced depth range compared with a standard lens. I would not select telecentric optics simply because the camera has high resolution. I select them when perspective error, distortion, or height variation is larger than the measurement tolerance allows.
Depth of field is the range in which the part remains sufficiently sharp for the inspection task. A flat product on a stable fixture may need only a few millimeters of depth, while a box, cast component, or uneven refractory product may require tens of millimeters.
I evaluate depth of field at the actual aperture, working distance, sensor format, and magnification. Stopping the lens down can increase depth of field, but it reduces light reaching the sensor and may require a stronger light or longer exposure. If the exposure becomes too long for a moving part, motion blur can cancel the benefit of improved focus.
Barrel and pincushion distortion can shift edges near the image boundary. For a simple presence check, small distortion may be acceptable, but dimensional inspection requires calibration and a lens with controlled distortion. Telecentric lenses provide another option when the measurement must remain stable across the field and through limited height variation.
Perspective also changes the apparent size of features at different distances. I check whether the part can tilt, whether the camera is perpendicular to the inspection plane, and whether the fixture holds a consistent height. Mechanical stability is part of optical accuracy because a lens cannot correct uncontrolled part movement in every application.
A camera cannot reliably detect a feature that has insufficient contrast in the captured image. I select lighting together with the camera and lens, using backlighting for silhouettes, coaxial or diffuse lighting for flat reflective surfaces, and low-angle lighting for scratches, raised edges, or texture.
I test the system with clean parts, acceptable parts near the tolerance limit, and known defective parts. Brightness uniformity, glare, shadowing, and surface reflectivity should be checked across the full field of view rather than only at the image center. The Industrial Vision Detection System must maintain usable contrast when the production environment changes, not only during a controlled demonstration.
If the smallest feature is not visible, I change the system in a defined order instead of immediately buying a higher-resolution camera.
| Observed problem | First adjustment to consider |
|---|---|
| Feature occupies too few pixels | Reduce field of view or increase camera resolution |
| Entire part does not fit | Increase field of view, move the camera, or use a larger sensor |
| Image is sharp only at one height | Stop down the lens, improve fixturing, or use a telecentric lens |
| Edges vary across the image | Reduce distortion, recalibrate, or change lens type |
| Defect blends into the surface | Change lighting angle, color, polarization, or diffusion |
| Images are clear but inspection is slow | Reduce unnecessary pixels, optimize processing, or use a faster interface |
| Motion creates streaks | Shorten exposure time and increase illumination |
| Part position changes measurement | Improve fixturing or use telecentric optics |
This decision process prevents over-specification. Increasing camera pixels cannot solve glare, motion blur, poor focus, or inadequate contrast. Similarly, reducing the field of view may improve sampling but can create unacceptable clipping if the fixture is not repeatable.
The lens must cover the camera sensor without dark corners or image loss. A lens designed for a smaller sensor may not illuminate a larger sensor, while using a much larger lens image circle can increase cost without adding inspection value. I also check the mount, aperture range, spectral transmission, filter compatibility, and whether the sensor requires a specific optical format.
For moving parts, I generally evaluate a global shutter camera because all pixels capture the image at nearly the same time. A rolling shutter can distort fast-moving edges when different sensor rows are exposed at different moments. The correct choice depends on object speed, exposure time, conveyor vibration, and the acceptable geometric error.
Processing speed must be calculated from the complete image pipeline. A system operating at 30 frames per second must acquire, transfer, preprocess, inspect, classify, and communicate a result within the available cycle time. If a 5-megapixel image does not improve the decision compared with a 2-megapixel image, the smaller image may provide a more practical production design.
I validate the selected camera and lens on real production conditions using this checklist:
For an automated quality-control project, I would also retain reference images for both OK and NG parts. This creates a baseline for later maintenance and helps distinguish camera degradation from process variation.
Choosing Camera Resolution, Lens, and Field of View for Inspection requires an end-to-end calculation rather than selecting the largest available camera. I first define the smallest feature, calculate pixels per millimeter, determine the field of view with positioning margin, and estimate focal length from sensor size and working distance. I then verify depth of field, distortion, lighting, shutter behavior, sensor compatibility, and processing speed.
For the worked example, a 0.5 mm defect requiring 5 pixels across the feature, a 100 mm field of view, an 11.3 mm sensor width, and a 300 mm working distance led to a focal-length estimate near 35 mm. A 1,920 × 1,200 camera provided the calculated sampling margin, but only after optical sharpness and lighting were confirmed. Yinglai Technology applies this same system-level approach when developing machine vision equipment and Industrial Vision Detection System solutions, combining camera selection with inspection mechanics, software, lighting, and production validation.
We offer customized development, design, and manufacturing of intelligent equipment.