← All tools

Sensor sampling

How many pixels land on the feature you need to see? Set the lens, working distance and sensor, then compare the feature under the pixel grid with the image the camera actually records.

Lens and distance

mm
mm
nm
Lens limits optional checks
mm
mm

Sensor

×
µm

Feature you need to see

—pixels across the feature
Your feature laid over the pixel grid
What the sensor records each pixel averages the light it receives

How this works

Magnificationm = f / (WD − f)

Thin lens magnification for an object at working distance WD, the same model as the field of view tool.

Pixels across the featureN = feature size · m / pixel size

The feature size divided by the object-space pixel, pixel size / m. A colour sensor samples each colour on every other pixel, so the verdict uses N / 2.

Nyquist limitν = m / (2 · pixel size)

The finest bar pattern the sensor can record, in line pairs per mm on the object: one pixel per bar.

Diffraction blurAiry diameter = 2.44 · λ · Nw, Nw = N · (1 + m)

Once the Airy disk is wider than about 2 pixels, stopping down further softens the image. The simulation blurs the feature with a Gaussian of σ = 0.42 · λ · Nw, a close fit to the Airy core.

Depth of fieldH = f² / (N · c) + f
near = s (H − f) / (H + s − 2f)
far = s (H − f) / (H − s)

Same model as the depth of field tool, with the circle of confusion c set to one pixel and s the working distance.

  • Drag the feature on either image to change where it lands on the grid. Near and below 2 pixels across, the recorded size, shape and contrast all change with sub-pixel position.
  • The simulation assumes a dark, neutral feature on a bright background, a 100% pixel fill factor and a lens limited only by diffraction. Aberrations, defocus, noise and illumination are ignored, so treat it as a best case.
  • Colour mode simulates an RGGB Bayer filter with simple bilinear demosaicing. Camera demosaicing is usually smarter, but the loss of resolution and the colour fringes at edges are typical.
  • Sensor presets are nominal active pixel counts for common machine vision sensors. Cameras sometimes crop slightly, so check your camera's data sheet.
  • Uses a thin lens model with working distance measured to the lens's principal plane, so check the lens data sheet for the exact magnification.