Lenses & opticsExplainer

MTF curves for lens selection: contrast at Nyquist frequency

Read MTF curves at your sensor's Nyquist frequency: how to find it from pixel pitch, how much contrast to demand, and a worked lens selection.

LumaSpec Vision9 min read Share on LinkedIn

On this page 9 sections
  1. 01What does an MTF curve tell you about a lens?
  2. 02Which frequency on the curve matches your camera?
  3. 03How much contrast is enough at that frequency?
  4. 04Why do tangential and sagittal curves differ, and which one counts?
  5. 05How does the f-number change the contrast you get?
  6. 06What does a full selection look like with these numbers?
  7. 07When is a Nyquist-contrast check the wrong test?
  8. 08What do you check before ordering?
  9. 09Questions

A lens can look superb through the middle of its curve and still deliver soft, gray edges on the parts you inspect. The fix is to read MTF curves as two numbers instead of as pictures: contrast at your sensor's Nyquist frequency, and contrast at two-thirds of it. For a 5 MP 2/3-inch camera, those two points are 145 lp/mm and 97 lp/mm. This guide gives you the formula, the contrast targets, the aperture ceiling that caps them, and a worked lens selection with the arithmetic shown.

What does an MTF curve tell you about a lens?

An MTF curve states, as a percentage, how much object contrast a lens delivers to each image-plane spatial frequency in line pairs per millimetre. It is only valid at the working distance, f-number, sensor format and wavelength printed alongside it.

A value of 65% at 100 lp/mm means a black-and-white grating of 100 line pairs per millimetre arrives at the sensor with 65% of its contrast. That percentage becomes gray-level difference between neighbouring pixels. At 10%, a 128-level edge survives as roughly a dozen levels, and edge algorithms have little left to interpolate.

Every machine vision lens datasheet draws one curve per field height — on-axis, 70% of the image circle and the corner — split into solid sagittal and dashed tangential lines, with the ideal diffraction limit plotted above them all. Contrast falls with frequency on every line; what separates lenses is how slowly. For curve anatomy in detail, see how to read lens performance curves.

Which frequency on the curve matches your camera?

Read the curve at your sensor's Nyquist frequency, one over twice the pixel pitch, and at two-thirds of it. For the pitch in the table below: 1 ÷ (2 × 0.00345 mm) = 145 lp/mm, and 0.67 × 145 ≈ 97 lp/mm as the second point.

f_N = 1 / (2 × p)

with p the pixel pitch in millimetres. A sensor can place at most one dark and one bright line per pixel pair, so anything finer than f_N aliases into false detail.

Pixel pitch Nyquist frequency Two-thirds Nyquist
2.0 µm 250 lp/mm 167 lp/mm
2.5 µm 200 lp/mm 133 lp/mm
3.45 µm 145 lp/mm 97 lp/mm
4.5 µm 111 lp/mm 74 lp/mm
5.86 µm 85 lp/mm 57 lp/mm

The Nyquist limit guide for camera resolution works this out from the camera side. The same sampling bound governs systems sampled in time; the Nyquist frequency calculation for sampled control systems applies it to control loops.

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

How much contrast is enough at that frequency?

Demand about 30% contrast at two-thirds of Nyquist from the tangential curve at the field point where your part sits. Treat 20% at any frequency you actually need as the floor below which edges smear and decoders start failing.

Below roughly 20%, lens loss plus sensor noise leaves an edge two or three usable gray levels at best. Sub-pixel edge fitting, barcode decoding and fine defect detection then degrade together. The 30% target at two-thirds Nyquist leaves headroom for what the curve omits: Bayer interpolation, a few tens of micrometres of defocus from mounting tolerance, and unit-to-unit spread. The floor also explains failures that look mysterious. A lens can cover the format and focus crisply at centre while a corner measurement returns just 8.8% contrast at Nyquist — under the floor — and the symptom is unreadable fine detail, not a dark image.

Why do tangential and sagittal curves differ, and which one counts?

The tangential and sagittal curves measure contrast in two perpendicular directions at each field point. Aberrations such as astigmatism pull them apart away from the centre, and you should design to the lower of the two.

On-axis the two coincide. Off-axis, astigmatism and field curvature focus the two directions at slightly different depths, so a crack, pin or printed mark aligned with the weaker direction loses contrast first. Curves where T and S track each other across the whole field mark a well-corrected design; a wide gap warns that results depend on part orientation. Mark the radius where the part sits — a centred part lives at the 70% field line, not the corner. Read both curves there, and design to the lower one.

How does the f-number change the contrast you get?

Diffraction sets a hard ceiling of one over wavelength times f-number. At 0.55 µm the cutoff is 455 lp/mm at f/4 and 227 lp/mm at f/8, which caps even a perfect lens near 25% contrast at 145 lp/mm once you stop down to f/8.

f_c = 1 / (λ × N)

At λ = 0.55 µm, the mid-visible wavelength most curves assume, the cutoffs are 455 lp/mm at f/4, 325 lp/mm at f/5.6 and 227 lp/mm at f/8. The diffraction-limited contrast at 145 lp/mm works out near 60% at f/4, 45% at f/5.6 and 25% at f/8 — a ceiling no lens can beat, computed from the ideal circular-aperture MTF.

Aberrations push the other way: wide open, measured curves sit far below the ceiling; stopped down, the ceiling itself sinks. At a 145 lp/mm Nyquist, the working aperture that preserves full contrast is f/4 to f/5.6. If depth of field forces f/8, judge the lens at 97 lp/mm instead. At magnification the working f-number becomes N × (1 + m), as the working f-number guide derives, and stopping down also cleans up aberrations, per the aberration guide.

What does a full selection look like with these numbers?

The 5 MP, 2/3-inch camera from the table, a 35 mm lens at f/4 and a 300 mm working distance gives m = f ÷ (WD - f) = 35 ÷ 265 = 0.132 and a field of view of 8.8 mm ÷ 0.132 ≈ 67 mm.

Object side: pixel pitch ÷ magnification = 3.45 ÷ 0.132 ≈ 26 µm per pixel. A 0.12 mm feature spans about 4.6 pixels and sits near 4 lp/mm on the part — far below Nyquist, where any FA lens is comfortable. The frequencies that decide this selection are the fine ones.

Restated as a spec: at least 30% contrast at 97 lp/mm and at least 20% at 145 lp/mm, tangential, at the 70% field radius, at f/4 and a 300 mm working distance.

The matching lens for this camera is a 35 mm focal length rated for 2/3-inch sensors at the 6 MP resolution class:

Machine vision lenses35 mm, 2/3", 6 MP, C-mount machine vision lens (LS-FFL-0679)LS-FFL-0679
Type
Machine vision fixed
Sensor format
2/3"
Mount
C-mount
Resolution
6-10 MP
$219.00View partBuild a system with it

The class matches the pixel pitch; the printed curve at your working distance and aperture is what confirms the two readings.

Push the pitch to 2.5 µm and the two-thirds point climbs to 133 lp/mm, past what ordinary FA lenses hold at the field edge. From roughly 3 µm pixels down, shortlist lenses measured for 16-25 MP sensors. One such design is a 16 mm lens for 1.1-inch sensors with <0.3% distortion:

Machine vision lenses16 mm, 1.1", 20 MP, C-mount machine vision lens, F2.8-22, <0.3% distortion (LS-FFL-0567)LS-FFL-0567
Type
Machine vision fixed
Sensor format
1.1"
Mount
C-mount
Resolution
16-25 MP
$679.00View partBuild a system with it

As pixel counts climb, the sensor format and lens coverage guide maps image circle to format.

Dimensional measurement changes the arithmetic again. At 1x magnification the sensor's 145 lp/mm maps straight to the part — pixel-sized features. At 0.166x the same sensor reaches only 24 lp/mm, a ~21 µm smallest feature. Magnification, not lens contrast, sets the small-feature limit there. That is why gauging stations run telecentric lenses at the magnification the tolerance needs; the entocentric versus telecentric comparison and the object-space pixel size calculation cover that trade. For a 2/3-inch camera at 1x, the C-mount shortlist starts:

Telecentric lenses1x, WD 108 mm, 2/3", C-mount telecentric lens (LS-TCL-2118)LS-TCL-2118
Sensor format
2/3"
Mount
C-mount
Image circle
8-11 mm
Type
Object-side telecentric
$1,239.00View partBuild a system with it

When is a Nyquist-contrast check the wrong test?

Skip the Nyquist reading when your features are coarse. A 0.5 mm print spanning 19 pixels at 26 µm per pixel lives near 1 lp/mm, where nearly any FA lens holds 80-90% contrast. There, lens choice should follow distortion, spectral response and mounting instead.

Two more cases move the decision to lower frequencies. Sub-pixel measurement: gradient and interpolation algorithms read edges from contrast spread over several pixels, so accuracy tracks contrast at one-quarter to one-half of Nyquist — 36-72 lp/mm here — more than at 145 lp/mm. Large pixels: at 5.86 µm pitch (85 lp/mm Nyquist) most machine vision lenses clear the 20% floor, and distortion, relative illumination and telecentricity become the real differentiators. The general lens selection guide walks those criteria; the Nyquist reading earns its keep once pixels drop below about 4.5 µm.

What do you check before ordering?

Reproduce your set-up in the curve's own variables — working distance, f-number, sensor format, wavelength. Read the lower of the two curves at 97 and 145 lp/mm for this camera, keeping about 10 contrast points of margin for unit-to-unit spread.

  • Match the curve's stated conditions to your set-up; a curve at f/2.8 says little about your f/4.5 working aperture.
  • Read at the field radius where the part sits: centred parts at the 70% line, full-frame parts at the corner.
  • Take the lower of tangential and sagittal at that radius.
  • Check both frequencies: 30% at two-thirds Nyquist, 20% at Nyquist itself.
  • Confirm the image circle covers the sensor diagonal — 11 mm for a 2/3-inch format.
  • Compute the aperture ceiling 1 ÷ (λ × N) and place it above your Nyquist frequency.

When the numbers clear, the rest is mechanical: the machine vision lens finder filters by sensor format and resolution class, the lens configurator steps through sensor, mount and working distance, and contact takes a curve question with your camera model and working distance attached.

Questions

Does a 6 MP lens rating guarantee 20% contrast at my Nyquist frequency?

No. Megapixel classes group lenses by the pixel pitch they were designed for, but the class is not a measured curve. Two lenses in the same 6 MP class can differ by tens of contrast points at 145 lp/mm at the field edge. Read the printed curve at your working distance and f-number, or ask for it, before committing a design.

How do I convert curve frequencies in lp/mm to feature sizes on my part?

Multiply the image-space frequency by magnification, then invert. At m = 0.132, the sensor's 145 lp/mm Nyquist corresponds to 19 lp/mm on the object, so the smallest sampleable period is 1 ÷ 19 ≈ 52 µm and the smallest feature about 26 µm — one object pixel. Smaller features need more magnification or smaller pixels, not a better lens.

Why do measured curves sit below the diffraction limit line?

The ideal line assumes a perfect, aberration-free lens. Real elements add residual design aberrations plus manufacturing tolerances — element tilt, decenter, surface errors — so measured contrast falls below the ceiling and reaches zero at a lower frequency. Use the ideal line only as a ceiling to sanity-check a quoted curve; a curve that touches or beats it plots theory, not glass.

Do these contrast targets change for a colour camera with a Bayer filter?

Yes — in the harder direction. Demosaicing interpolates half the colour samples, so luminance contrast at Nyquist drops below the monochrome curve, unevenly across the image axes. For colour cameras hold the 30% target near half of Nyquist — about 72 lp/mm for the pixel pitch above — or qualify the lens on the actual camera with a colour resolution target.

Can I compare MTF curves from different lens datasheets directly?

Only when the curves share conditions: working distance, f-number, sensor format or image circle, and wavelength band. A curve at f/2.8 and 546 nm on a 2/3-inch format is not comparable to one at f/4, broadband, on 1-inch glass. Check the stated conditions first, then compare at your two frequencies and your field height.