Resources
banner

Choosing Camera Resolution, Lens, and Field of View for Inspection

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.

A Five-Step Method for Selecting an Inspection Camera

  1. Define the smallest feature or defect that must be detected and measured.
  2. Assign the required pixels across that feature, then calculate the minimum camera resolution.
  3. Determine the field of view from the complete part size, positioning tolerance, and safety margin.
  4. Calculate focal length from sensor size, working distance, and required field of view.
  5. Validate depth of field, optical resolution, distortion, lighting, sensor compatibility, and processing speed on real parts.

How to Choose Camera Resolution, Lens, and Field of View for Inspection

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.

What Camera Resolution Is Needed for Inspection?

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:

  • 5 pixels ÷ 0.5 mm = 10 pixels per millimeter
  • A 100 mm field of view requires 100 × 10 = 1,000 horizontal pixels
  • With a 25% safety margin, the target becomes 1,250 horizontal pixels

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 for Quality Inspection

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.

How Does Camera Resolution Affect Inspection Accuracy?

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.

How to Calculate Field of View for an Inspection Camera

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:

  • 80 mm product width
  • 10 mm total positioning allowance
  • 10 mm total inspection margin
  • 100 mm minimum horizontal field of view

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.

How to Choose the Right Lens for Machine Vision Inspection

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.

Worked Lens Selection Example

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.

When Should You Use a Telecentric Lens for Inspection?

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:

  • Hole diameter and center position
  • Pin and shaft dimensions
  • Flatness-related profiles
  • Edge-to-edge distances
  • Components with height variation
  • Parts requiring low distortion across the field

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.

Optical Factors That Affect Inspection Reliability

Depth of Field

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.

Distortion and Perspective

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.

Contrast and Lighting

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.

What to Change When the Calculated System Fails

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.

Sensor Compatibility, Shutter Type, and Processing Speed

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.

Validation Checklist Before Deployment

I validate the selected camera and lens on real production conditions using this checklist:

  • Capture approved parts across the full operating temperature and position range.
  • Test known defects at the smallest specified size and lowest expected contrast.
  • Confirm the required pixels across each critical feature.
  • Measure field-of-view coverage at every fixture position.
  • Check focus and depth of field at the highest and lowest part heights.
  • Verify distortion and calibration error against a traceable reference target.
  • Test exposure time against the fastest expected motion.
  • Confirm image transfer time, algorithm time, and total inspection-cycle time.
  • Repeat the test after cleaning the lens and lighting enclosure.
  • Record false rejects, missed defects, and measurement variation over a representative sample.

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.

Conclusion

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.

GET YOUR FREE CONSULTANT

We offer customized development, design, and manufacturing of intelligent equipment.

Contact Us
Inspection Unit
Intelligent Palletizing and Depalletizing System
Intelligent AS/RS Warehousing System

Inspection Unit

Fully Automated In-Line Inspection System: Enabling Precision Quality Control for Refractory Brick Production

In refractory brick manufacturing, precise control of dimensions and weight is critical to ensuring product performance and reliable kiln lining installation. Traditional manual spot-checking methods are inefficient, prone to human error, and struggle to keep pace with continuous high-speed production.

View More

Intelligent Palletizing and Depalletizing System

Robot Intelligent Palletizing and Depalletizing System: High-efficiency Automated Production Solution

To address critical industry challenges in the downstream processing of refractory bricks—such as heavy reliance on manual labor, physically demanding working conditions, efficiency bottlenecks, and inconsistent palletizing quality—we have developed a fully automated, intelligent palletizing and depalletizing system.

View More

Intelligent AS/RS Warehousing System

Highly Flexible Intelligent Stereo Warehouse: High-Efficiency Automated Production Solution

Yinglai’s highly flexible, intelligent Automated Storage and Retrieval System (AS/RS) is purpose-built for heavy-duty, multi-SKU industrial materials. Integrating three core modules—an Automated Guided Vehicle (AGV) control system, automated high-bay racking, and an intelligent Warehouse Management System (WMS)—it delivers a comprehensive automated warehousing solution. We provide end-to-end turnkey services encompassing facility planning and design, infrastructure preparation, hardware deployment, software development, and ongoing operations and maintenance (O&M).

View More