Skip to main content

Command Palette

Search for a command to run...

Machine Vision MTF: Match Lens Resolution to Pixel Size

Updated
7 min readView as Markdown

Use spatial frequency and contrast—not megapixel labels—to decide whether a lens can resolve the features sampled by an industrial camera.

A new high-resolution camera is installed, but fine scratches become softer and corner measurements become less stable than expected. The sensor has more pixels; the lens cannot transfer enough contrast at the corresponding spatial frequency.

This article presents a vendor-neutral engineering method. Worked figures are hypothetical and must be replaced by evidence from the actual line.

What you will learn

  • Understand the physical and data-processing limits behind machine vision mtf and lens resolution.

  • Translate an inspection need into measurable component and system requirements.

  • Calculate or test the variable that most strongly controls reliability.

  • Recognize common integration mistakes before commissioning.

  • Validate the final method under representative production conditions.

Technical foundation

Spatial frequency

Alternating bright and dark line pairs express detail in line pairs per millimetre. A sensor with pixel pitch p has a Nyquist frequency of 1/(2p), but useful contrast normally falls before that theoretical limit.

Modulation transfer function

MTF reports how much object contrast survives at each spatial frequency under stated aperture, working distance, field position, and wavelength. It is a curve, not a single megapixel rating.

System response

Lens, sensor sampling, focus, motion, and processing all contribute. The overall system response is limited by the weakest element and varies across the field.

Engineering workflow

1. Convert the feature to image space

What to evaluate: object feature size, magnification, and required pixel coverage.

Why it matters: the lens curve is usually specified in image-space frequency.

How to measure or calculate it: calculate image feature = object feature × magnification. Record the input conditions and keep the same method when comparing alternatives.

Trade-off: higher magnification reduces field of view. What commonly goes wrong: comparing object micrometres directly with lp/mm.

2. Calculate sensor Nyquist

What to evaluate: pixel pitch in millimetres.

Why it matters: it defines the highest representable alternating pattern.

How to measure or calculate it: Nyquist = 1/(2p). Record the input conditions and keep the same method when comparing alternatives.

Trade-off: Nyquist is a sampling boundary, not guaranteed usable detail. What commonly goes wrong: expecting full contrast at Nyquist.

3. Read the correct MTF curve

What to evaluate: aperture, working distance, wavelength, field point, sagittal and tangential curves.

Why it matters: MTF changes when any of these conditions change.

How to measure or calculate it: use the lower relevant curve at the target frequency. Record the input conditions and keep the same method when comparing alternatives.

Trade-off: stopping down reduces aberrations but eventually increases diffraction. What commonly goes wrong: using a curve from another configuration.

4. Allow contrast margin

What to evaluate: minimum algorithmic contrast and production variation.

Why it matters: a barely visible laboratory target will not survive noise and drift.

How to measure or calculate it: measure modulation on a slanted-edge or line target. Record the input conditions and keep the same method when comparing alternatives.

Trade-off: more sharpening can amplify noise. What commonly goes wrong: accepting a lens at single-digit contrast.

5. Check the full field

What to evaluate: center, 70% field, corners, and both axes.

Why it matters: many lenses soften asymmetrically away from the center.

How to measure or calculate it: map measured edge response across the calibrated ROI. Record the input conditions and keep the same method when comparing alternatives.

Trade-off: cropping may be cheaper than a larger premium lens. What commonly goes wrong: validating only at image center.

6. Validate assembled hardware

What to evaluate: focus lock, filters, protective windows, vibration, and temperature.

Why it matters: mounting tolerances change the delivered MTF.

How to measure or calculate it: repeat target captures after warm-up and disturbance. Record the input conditions and keep the same method when comparing alternatives.

Trade-off: a higher-spec lens may need tighter alignment. What commonly goes wrong: trusting a catalogue curve as the installed result.

Worked example

Hypothetical design: Pixel pitch is 3.45 µm and magnification is 0.10×.

Sensor Nyquist = 1 / (2 × 0.00345 mm) = 144.9 lp/mm
A 0.10 mm object line maps to 0.010 mm on the sensor
Equivalent frequency ≈ 1 / (2 × 0.010) = 50 lp/mm

If the lens transfers 55% contrast at 50 lp/mm in the center but only 22% in the corner, a corner inspection may be less robust even though the sensor samples the feature. Evaluate the lower sagittal or tangential curve relevant to the feature orientation.

[Suggested visual: object-to-image spatial-frequency calculation diagram]

Purpose: Turn the engineering workflow into a resource that can be used during commissioning and review.

Required elements: Include the inputs, decision points, measurable outputs, acceptance boundary, and major failure branches.

Suggested caption: “Object-to-image spatial-frequency calculation diagram.”

Accessible alt text: “Technical diagram of object-to-image spatial-frequency calculation diagram.”

Practical decision aid

Evidence Good sign Warning sign
MTF at target frequency comfortable contrast across field only center meets target
Sagittal/tangential separation curves remain close large astigmatic split
Configuration matches WD, f-number, wavelength catalogue curve uses another setup
Installed test repeatable slanted-edge result focus or corner response drifts

Use this table to choose the next experiment, not as a universal component recommendation. Record actual settings, part variants, and evidence beside the decision.

Common mistakes and how to prevent them

  1. Buying by megapixel rating. The rating may hide low high-frequency contrast. Prevent it by read the MTF curve.

  2. Using Nyquist as a quality promise. Sampling does not guarantee contrast. Prevent it by set a lower working frequency with margin.

  3. Ignoring field position. Corner algorithms become unstable. Prevent it by map the full ROI.

  4. Ignoring wavelength. Focus and aberrations change. Prevent it by evaluate the actual illumination band.

  5. Stopping down indefinitely. Diffraction removes detail. Prevent it by optimize aperture experimentally.

  6. Sharpening a poor optical image. Noise and ringing increase. Prevent it by fix optics before processing.

Validate under production conditions

Capture a traceable resolution or slanted-edge target at center and field extremes, after warm-up and after mechanical disturbance. Repeat with the real aperture, filter, protective window, wavelength, focus lock, exposure, and production vibration.

A defensible validation set includes representative acceptable parts, defective parts, boundary cases, and nuisance variation. Repeat complete part presentations rather than processing one stored image many times. Include environmental extremes, line-speed limits, start-up and warm-up, maintenance states, interface faults, and long-duration operation where relevant.

Predefine acceptance criteria for false accepts, false rejects, invalid acquisitions, repeatability, cycle time, and recovery. Preserve raw counts and denominators. After release, trend leading indicators and audit labelled samples so that drift is detected before it becomes a customer escape.

Key takeaways

  • Pixel count and optical resolution are different.

  • MTF links resolution to usable contrast.

  • Use the curve for the actual configuration and field point.

  • Validate the assembled system, not the lens alone.

  • Keep optical contrast margin for production variation.

Follow this Hashnode blog for more practical industrial machine-vision engineering, and connect with Kivanc Ekici on LinkedIn. For related engineering information, visit the ITAGE Türkiye website.

Frequently asked questions

What is Nyquist frequency for a camera sensor?

For pixel pitch p in millimetres, the sampling Nyquist frequency is 1/(2p) line pairs per millimetre.

Does a lens need high MTF at Nyquist?

Not always. It needs adequate contrast at the spatial frequencies required by the application, with margin.

Why are sagittal and tangential curves different?

Aberrations such as astigmatism can transfer contrast differently along radial and tangential orientations.

Can software restore low MTF?

Sharpening may improve appearance but cannot reliably recover information that optics never transferred.

How should installed MTF be tested?

Use a suitable target or slanted edge across the field under final optical and mechanical conditions.

Sources