System design

Calculate camera resolution from field of view and the smallest feature

Megapixels are not a requirement. What matters is how many pixels actually represent the smallest relevant feature under real acquisition conditions.

FOV → mm/px → px/feature

Selecting a camera by asking “5 MP or 12 MP?” starts in the wrong place. Required resolution comes from the inspection task: What scene must be captured reliably, which detail must the algorithm detect or measure, and how much contrast remains after the lens, lighting, focus and motion have taken their share?

The calculation below produces a traceable preselection. It is deliberately not release evidence. A feature can be sampled by enough pixels on paper and still be unusable in the real image.

1. Define the smallest relevant feature correctly

“Smallest defect” is often too vague. In a presence check, the width of a missing tab may be decisive. In a contour inspection, it may be the narrowest gap between two edges. For OCR or Data Matrix codes, the narrowest stroke or module matters. A measurement task also needs an explicit allowable measurement uncertainty.

Detection and measurement are not the same. Barely separating a bright and a dark region does not automatically support stable subpixel measurement, classification or pose estimation. The required pixel coverage must therefore come from the actual algorithm and its planned verification.

2. The field of view includes real positional variation

Field of view (FOV) must not equal only the nominal part width. Feed tolerance, positioning error, variants, edge margin and any required reference geometry belong inside it. Adding this margin after camera selection silently reduces the number of pixels available per feature.

Calculate width and height separately and use the more critical axis. Sensor orientation matters as well: a 3200 × 2400 sensor meets the requirement only when the 3200 pixels are aligned with the corresponding wider FOV axis.

3. Convert millimetres per pixel into required sensor resolution

Basic calculation for each image axis

Object sampling [mm/px] = field of view [mm] ÷ pixel count

Pixels per feature = feature width [mm] ÷ object sampling [mm/px]

Required pixel count = field of view [mm] × target pixels per feature ÷ feature width [mm]

Example: the real field of view is 240 × 180 mm and the relevant feature is 0.30 mm wide. For preselection, four pixels across that feature are assumed as a project-specific target. This requires at least 3200 pixels horizontally and 2400 pixels vertically, or 7.68 megapixels. A 2448 × 2048 sensor provides only about 3.1 pixels on the more critical axis and misses this assumption.

Four pixels are an assumption for this worked example, not a universal standard or a release threshold. Edmund Optics uses three pixels for a barcode feature in one design example; that is an application-specific decision, not a general rule.

4. Pixel count and real resolution are not the same

The calculation above covers sampling only. ISO 12233 explicitly distinguishes the number of addressable sensor elements from a camera system's ability to reproduce fine optical detail with adequate contrast. Spatial frequency response (SFR), or modulation transfer function (MTF) for linear optical systems, describes how contrast falls as spatial frequency increases.

A lens must therefore do more than cover sensor format, focal length and working distance. It must transfer enough contrast at the required operating point—not only in the image centre, but also near the edges and across the required depth range. Aperture, focus, wavelength, manufacturing tolerances and contamination change that operating point. More megapixels do not help when the lens cannot transfer the extra detail.

Pixel size in a data sheet is a sensor-plane quantity. Object sampling can also be calculated as sensor pixel size divided by optical magnification. For an initial plausibility check, FOV divided by pixel count is often more direct because it starts with the scene that actually has to be inspected.

5. Signal quality and motion can consume the margin

A four-pixel-wide feature is useful only if its signal separation remains stable. Lighting angle, surface reflections, exposure, gain, sensor noise and colour-filter mosaics affect effective contrast. EMVA 1288 provides a standardized basis for characterizing and comparing cameras and image sensors. It does not replace a test of the complete imaging chain with the real object, lens and illumination.

Moving parts add motion blur. If an object travels at 500 mm/s during a 1 ms exposure, it moves 0.5 mm. At an object sampling of 0.075 mm/px, that is about 6.7 pixels—more than the width of the 0.30 mm feature. The static resolution calculation would be insufficient on its own. A shorter exposure or light pulse needs sufficient light reserve and must be coordinated with triggering and machine motion.

6. Only a test turns the calculation into a decision

A defensible selection tests the limiting cases of both the imaging chain and the algorithm. A useful verification plan includes at least:

  • a real limiting feature or suitable resolution target in the planned FOV,
  • measurements at the image centre and edges and across the required depth range,
  • the intended illumination, aperture, exposure, gain and triggering,
  • part motion, positional variation and relevant surface or batch variation,
  • evaluation with the production pipeline and acceptance criteria defined in advance.

ISO 12233 defines edge-, line- and sine-pattern methods for characterizing resolution and SFR. Industrial release additionally requires representative good, defective and disturbed process samples to be evaluated with the real inspection feature. A test chart characterizes the imaging chain; it does not prove classification performance in production.

7. What the current RobuTrace prototype does—and does not do

The current RobuTrace development prototype uses confirmed FOV and smallest-feature inputs to screen camera candidates on the more critical FOV axis. Its preselection passes candidates from three pixels per feature and explicitly states that lens MTF and contrast are not yet included.

This is a transparent exclusion and clarification aid, not component approval. The three-pixel threshold is a prototype heuristic that must be challenged for each application. Before purchasing or releasing a system, the camera, lens, illumination, working distance, exposure and pipeline must be tested with real production images. RobuTrace itself has not yet been industrially validated; simulated rankings and preliminary designs are not measured performance evidence.

Checklist before selecting the camera

  1. Define the inspection feature and allowable detection or measurement uncertainty.
  2. Determine the real FOV including positional and edge margin.
  3. Derive the pixel target from the algorithm and test strategy, not from a copied rule of thumb.
  4. Calculate both sensor axes and verify sensor orientation.
  5. Evaluate lens MTF or system SFR at the required operating point.
  6. Check motion blur, signal-to-noise ratio, bandwidth and cycle time together.
  7. Verify the complete imaging chain on the real limiting feature under process variation.

For the next verification step: test disturbance factors systematically and interpret false accept and false reject correctly.

Sources

All online sources last checked on 24 September 2026.

Can you explain your resolution margin?

RobuTrace structures FOV, smallest feature, imaging chain, open assumptions and the required verification plan—without presenting a preliminary design as approval.

Discuss a product demo