Cameras & sensorsGuide

Simulate image quality before hardware: sensor, lens, light

Simulate image quality before hardware: pair lens MTF with the sensor's Nyquist limit in lp/mm, then check light, motion and EMVA 1288 data.

LumaSpec Vision11 min read Share on LinkedIn

On this page 11 sections
  1. 01The decision before any part number
  2. 02The three ceilings: sampling, pixel aperture, diffraction
  3. 03Worked example: one inspection computed on paper
  4. 04Aperture: where diffraction meets depth of field
  5. 05Motion and light: the exposure budget
  6. 06Anchor the simulation in EMVA 1288 data
  7. 07How to choose, case by case
  8. 08Checks before you order
  9. 09When the paper answer is wrong
  10. 10The one-page checklist
  11. 11Questions

In most vision projects the first honest answer to "will this camera and lens resolve my feature?" arrives with the first prototype — after the sensor is ordered, the lens mounted and the schedule committed. You can get most of that answer in an hour, on paper, before anything is bought. The physics is arithmetic: pixel pitch sets a frequency ceiling, the lens MTF sets how much contrast survives below it, and exposure, motion and shot noise decide what stays measurable. This guide runs the whole chain — sensor, lens, aperture, light and motion — with the formulas, one worked inspection, and the checks to run before you order. Simulation does not replace measurement; it tells you which single prototype is worth building.

The decision before any part number

Four pass/fail lines decide whether a sensor, lens and light will image your feature. Pass all four and you can order; the first line that fails names the part to change.

  1. Feature sampling: at least 3 pixels across the smallest feature to detect it, 5 to measure it.
  2. Lens contrast: MTF at the sensor's Nyquist frequency of 30% or more.
  3. Diffraction headroom: working f-number at or under 2 × pixel pitch ÷ wavelength.
  4. Motion: blur of half a pixel or less at your line speed.

Fail line 1 and you need more pixels or a smaller field of view. Fail line 2 and you need a higher-resolution lens. Fail line 3 and you must open the aperture, not stop down. Fail line 4 and you need a strobed light or a slower part. The lens-pixel half of this chain is the Nyquist budget method; this guide wraps the full simulation around it, from field of view to strobe width.

The three ceilings: sampling, pixel aperture, diffraction

The sensor samples at its pixel pitch p, and sampling theory caps recoverable detail at the Nyquist frequency:

f_N = 1 / (2 × p)

With p in millimetres, f_N comes out in line pairs per millimetre. A 2.2 µm pixel caps detail at 1 ÷ (2 × 0.0022) = 227 lp/mm; a 3.45 µm pixel at 145 lp/mm. Past that line a lens does not resolve, it aliases.

The pixel itself low-passes the image. A square pixel of width p responds to spatial frequency ν as sin(πνp)/(πνp), which equals 0.64 at Nyquist:

MTF_pixel(ν) = sin(π · ν · p) / (π · ν · p) MTF_system(ν) ≈ MTF_lens(ν) × MTF_pixel(ν)

So even a perfect lens delivers at most 64% contrast at Nyquist. A lens chart reading 30% there leaves the system at 0.30 × 0.64 ≈ 19%.

Diffraction adds the third ceiling. An incoherent image through a circular aperture loses all contrast at 1 ÷ (λ × N_w), where N_w is the working f-number and λ the wavelength. Set that cutoff equal to Nyquist and the largest working f-number you can afford is:

N_w,max = 2 × p / λ

At 550 nm that is f/10 for 2.74 µm pixels and f/8.0 for 2.2 µm pixels. At half the cutoff diffraction alone still passes 39% contrast, so for measurement jobs hold N_w at or under p ÷ λ and Nyquist lands at half the cutoff. The Airy disk and diffraction limit guide covers the spot-size view of the same physics; for reading the curves themselves, see MTF curves at Nyquist frequency.

Pixel pitch Nyquist limit Demand lens MTF at Max working f-number at 550 nm
5.5 µm 91 lp/mm 91 lp/mm 20
4.5 µm 111 lp/mm 111 lp/mm 16
3.45 µm 145 lp/mm 145 lp/mm 12.5
2.74 µm 182 lp/mm 182 lp/mm 10
2.4 µm 208 lp/mm 208 lp/mm 8.7
2.2 µm 227 lp/mm 227 lp/mm 8.0

Red light lowers the ceiling: at 660 nm the 3.45 µm row drops from 12.5 to 10.5 and the 2.74 µm row from 10 to 8.3. Shorter wavelengths buy headroom, which is the physics behind short-wavelength light for fine detail.

Worked example: one inspection computed on paper

The task: a PCB rides a conveyor at 100 mm/s; confirm a 0.25 mm ceramic capacitor body is present and seated, over a 60 × 44 mm field, with about 85 mm of working distance available.

Take a 1.1"-format 12 MP sensor: 4096 × 3000 pixels at a 3.45 µm pitch, so the active area is 4096 × 0.00345 = 14.13 mm by 3000 × 0.00345 = 10.35 mm. Ground sample distance over a 60 mm field is 60 ÷ 4096 = 14.6 µm per pixel, and the 0.25 mm body spans 250 ÷ 14.6 = 17 pixels — line 1 passes for detection and for measurement. The sensor diagonal is √(14.13² + 10.35²) = 17.5 mm, so the lens image circle must exceed that. Any 1.1" C-mount global-shutter camera fits the geometry; the MV-CH120-11UC is a 12 MP, 1.1", C-mount USB3 example with a global shutter, and 1.1" models sit across the area scan cameras range.

Area scan camerasHikrobot MV-CH120-11UC 12 MP Area Scan Camera, USB3, IMX304, High-speed version, ColorMV-CH120-11UC
Sensor format
1.1"
Lens mount
C-mount
Interface
USB3
Resolution
12 MP
$2,339.00 · quotedView and quoteBuild a system with it

Line 2: Nyquist is 1 ÷ (2 × 0.00345) = 145 lp/mm, so the lens must hold about 30% MTF at 145 lp/mm. Line 3 needs the geometry — magnification and focal length:

m = sensor width / field of view f = WD × m / (1 + m)

Magnification m = 14.13 ÷ 60 = 0.236, and at 84 mm of working distance f = 84 × 0.236 ÷ 1.236 = 16 mm. The lens focal length calculator runs the same equation in both directions, and the selection logic around it is in machine vision lens selection by focal length.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.
Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

For the lens, take the 16 mm, 1.1", 20 MP C-mount option:

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

That rating sits one resolution class above the sensor on purpose. At Nyquist, a chart value of 30% times the 0.64 pixel response leaves about 19% system contrast at the finest resolvable pitch. The capacitor body itself sits at 2 lp/mm on the object — ×4.2 into image space is 8.5 lp/mm — where charts hold most of their low-frequency contrast, so resolution is not this application's bottleneck.

Aperture: where diffraction meets depth of field

Stopping down buys depth of field and eats contrast at frequency. The working f-number grows with magnification: N_w = N × (1 + m). At f/5.6 set, N_w = 5.6 × 1.236 = 6.9.

Diffraction cutoff at 550 nm is 1 ÷ (0.00055 × 6.9) = 263 lp/mm, so Nyquist sits at 145/263 = 55% of cutoff and diffraction alone still passes roughly one third contrast there. Headroom to the 12.5 ceiling is comfortable.

Depth of field, with the circle of confusion set to two pixels (c = 6.9 µm):

DOF ≈ 2 × N × c × (1 + m) / m²

DOF = 2 × 5.6 × 0.0069 × 1.236 ÷ 0.236² = 1.7 mm. If the board warps ±1 mm, stop to f/8: N_w = 9.9, still under the ceiling, DOF rises to 2.5 mm, and diffraction contrast at Nyquist falls to about 11% — fine for a 17-pixel presence feature, wrong for sub-pixel edge metrology. The full trade is laid out in working f-number, light, DOF and resolution.

Depth of field and diffraction
Units
Depth of field
– mm
About the focus plane
– mm
Diffraction limit
– F/#
Blur limit
– µm
Diffraction spot
– µm
At this F-number
–

DOF ≈ 2 × N × c × (1 + m) / m², c = allowed blur × pixel size. Diffraction spot (Airy disk) ≈ 2.44 × wavelength × N × (1 + m); past the diffraction limit it is larger than the blur you allowed.

Browse lenses by aperture and format Open the full calculator

Motion and light: the exposure budget

blur [px] = speed × exposure / GSD

For half-pixel blur at 100 mm/s: exposure ≤ 0.5 × 14.6 µm ÷ 100 mm/s = 7.3 µm ÷ 100,000 µm/s = 73 µs. A full pixel of tolerance doubles that to 146 µs. Continuous lighting at 73 µs asks for extreme irradiance, so strobe instead: set the camera exposure to about 100 µs and pulse a 24 V constant-voltage light from a light controller for 70 µs inside it. The strobe width sets the freeze; the controller sets the pulse.

For the strobe drive, take a 2-channel, 400 W high-power digital controller:

Light controllersHigh power digital controller (LS-CTL-S53, network option), 2 ch, 400 W (LS-CTL-0264)LS-CTL-0264
Channels
2 channels
Control
Digital
Feature
High power
Output
Constant voltage 24 V
$769.00View partBuild a system with it

Then check signal against noise. Collected electrons = photons on the pixel × quantum efficiency, and shot noise is the square root of the count. A 10,000 e⁻ signal carries 100 e⁻ of shot noise, or 1%, so a 5% feature contrast stands at five times the noise and is safely detectable; at 2,500 e⁻ the noise is 2% and the same feature sits at only 2.5:1.

Anchor the simulation in EMVA 1288 data

A paper light budget needs real conversion numbers, and that is what an EMVA 1288 sheet supplies: quantum efficiency versus wavelength, temporal dark noise in electrons, saturation capacity and photo response non-uniformity. Match QE to your LED wavelength first — silicon sensors often peak near 525-560 nm and fall toward deep red. Take a datasheet QE of 45% at 660 nm: 22,000 photons on the pixel give 0.45 × 22,000 = 9,900 e⁻ with √9,900 ≈ 99 e⁻ of shot noise, again 1%. Reading those sheets is its own skill — start with EMVA 1288 camera comparison.

How to choose, case by case

  • Presence and counting (3 px per feature): the sampling target relaxes toward 91-145 lp/mm. On a 2/3" sensor, a 35 mm, 2/3", 6 MP C-mount lens such as the LS-FFL-0679 covers it, and the aperture ceiling moves out of the way.
  • Measurement and metrology (sub-pixel edges): mono sensor, 10 px per feature, working f-number near p ÷ λ — 6.3 for 3.45 µm at 550 nm — and distortion in the 0.3% class.
  • Moving parts: global shutter plus strobe, per the exposure budget above; a rolling shutter smears geometry line by line at speed.
  • Low-contrast surface defects: demand 50% MTF at half Nyquist rather than 30% at Nyquist, because defect edges scatter rather than block. Light geometry decides more than lp/mm here.

Pull candidates from the lens finder and the camera finder, or start configuring from the lens step.

Checks before you order

  • Image circle exceeds sensor diagonal: a 16-22 mm class lens over the 17.5 mm diagonal here.
  • MTF chart quoted at your working f-number, not wide open.
  • Distortion class fits the task: 0.3%-class for metrology, looser for presence.
  • Relative illumination above about 60% at full field if one threshold serves the whole image.
  • Global shutter if anything moves during exposure.
  • Strobe controller output class matches the light: 24 V constant-voltage, current within the channel rating.
  • Order one lens and one camera first, shoot a slanted-edge or USAF-style bar target, and confirm the 30%-at-Nyquist line before releasing quantity.

When the paper answer is wrong

  • Lens MTF curves are nominal design values; production units land below them, and sensor alignment shifts the corners. Nominal versus as-built lens MTF quantifies the gap.
  • A rolling shutter at 100 mm/s skews geometry line by line; the simulation above assumed a global snapshot.
  • Ambient light and stray reflections are absent from the budget — control them as covered in ambient light variation in pick and place vision.
  • Vibration on the mount adds blur the table never sees; anti-vibration lens constructions hold focus through it.
  • A color sensor interpolates one true sample per pixel position; budget the 20-30% detail loss.

The one-page checklist

  • Feature ÷ GSD ≥ 3 px to detect, ≥ 5 px to measure.
  • Lens MTF ≥ 30% at 1 ÷ (2 × pixel pitch).
  • Working f-number = set f-number × (1 + m) ≤ 2 × pitch ÷ wavelength.
  • DOF ≈ 2 × N × c × (1 + m) ÷ m², with c = 2 pixels, covers the part height tolerance.
  • Exposure ≤ 0.5 × GSD ÷ line speed, with the strobe pulse inside it.
  • QE at your LED wavelength from the EMVA 1288 sheet; keep feature contrast at five times the shot noise or better.
  • One prototype frame of a slanted-edge target before release.

Run your geometry in the calculators above, then configure the full station or ask the applications team to check the budget with you. More selection pieces sit on the cameras topic page.

Questions

How close does the paper answer come to measurement?

Treat it as a ranking tool with a tolerance. The physics — Nyquist, diffraction, pixel aperture — is exact; the lens MTF is a nominal curve, and production units land a few to a few tens of percent below it. Order one lens of the shortlisted pair, shoot a slanted-edge target, and derive the measured MTF in an afternoon before committing to quantity.

Does a megapixel rating tell me the lp/mm my lens needs?

No. The rating states the sensor class a design covers, not a spatial frequency. The same 12 MP label can sit on a 1.1" sensor needing contrast at about 145 lp/mm and on a 2/3" sensor needing it near 227 lp/mm. Compute Nyquist from pixel pitch — 1 ÷ (2 × pitch) — and demand the MTF value at exactly that frequency.

How much detail do I lose with a color sensor?

A Bayer color sensor fills two of every four pixels with green and one each with red and blue, then interpolates; expect on the order of 20-30% less resolved detail than mono at the same pixel pitch. Choose mono for edge metrology and feature geometry; choose color when hue itself is the feature — wire color, LED tint, print verification.

When should I stop down past the diffraction ceiling anyway?

When depth of field outranks fine contrast: presence checks that already hold 15-plus pixels per feature, or parts with several millimetres of height variation. Doubling the working f-number doubles depth of field and drives contrast at Nyquist toward zero — acceptable when your feature frequency sits far below Nyquist, wrong for sub-pixel edge measurement.

What do I ask for so the numbers I feed the simulation are real?

Three documents: lens MTF curves measured at your working f-number and wavelength, plus distortion and relative illumination; the camera's EMVA 1288 sheet with quantum efficiency and temporal dark noise; and one sample frame of a resolution target taken on your sensor format. With those, every estimate in this guide becomes a measured input.