Cameras & sensorsGuide

Matching a lens to a board level camera with small pixels

Matching a board level camera to a lens: the lp/mm rule from pixel size, the f-number limit, cost and depth of field trade-offs, with a worked example.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01The decision: buy the lens for the pixel pitch
  2. 02The two numbers that set the requirement
  3. 03What smaller pixels cost on the sensor side
  4. 04Focal length shrinks with the sensor, and depth of field follows the iris
  5. 05Worked example: a 12 MP 1/2" board camera on a 30 mm part
  6. 06M12 or C-mount: where each resolution class lives
  7. 07Checks before you order
  8. 08When small pixels are the wrong answer
  9. 09Questions

Board-level cameras keep moving to smaller sensors: 12 MP on a 1/2" chip is a normal catalogue line now, and pixels of 1.6 to 2.2 μm come with it. The camera shrinks and the sensor costs less, but the lens that carried your last 5 MP build quietly stops resolving what those pixels sample. The image goes soft no matter how carefully you focus, because the blur is in the glass.

This guide is for engineers pairing a board-level camera with a lens inside an embedded machine. You will compute the lp/mm figure your pixel pitch demands, set the iris ceiling that diffraction imposes, weigh the sensitivity and depth-of-field trade, and apply all of it to a 12 MP build.

The decision: buy the lens for the pixel pitch

Match the lens to the pixel pitch first; focal length, mount and price come after. A board level camera with 2.2 μm pixels samples 1000/(2 × 2.2) = 227 lp/mm at its Nyquist limit, so the lens must hold about 227 lp/mm across the image circle, not only on axis. In catalogue terms that means a lens one megapixel class above the sensor's rating, run at or below about f/3. Meet that and the pixels carry image. Miss it and a 5 MP camera behind adequate glass draws more real detail than a 12 MP camera behind a lens that merges two pixels into one, with less data to move and less light to find.

The two numbers that set the requirement

One black-and-white line pair occupies two pixels, so the finest pattern a sensor samples is one pair per two pitches. With pitch in micrometres, the demand in line pairs per millimetre is 1000/(2 × pitch). Diffraction sets the matching limit on the iris: a round aperture images a point source as an Airy disk with a diameter of 2.44 × λ × f-number.

lp/mm needed = 1000 / (2 × pixel pitch in μm) Airy disk diameter (μm) = 2.44 × λ (μm) × f-number iris ceiling ≈ (2 × pixel pitch) / (2.44 × λ)

Use λ = 0.55 μm for white LED light. Standard optics tables quote 12.35 μm at f/8 for a 632.8 nm laser line; the same iris at 550 nm gives 2.44 × 0.55 × 8 = 10.7 μm. Either number spans six or seven 1.6 μm pixels, which is why small-pixel builds live near wide-open apertures.

The table turns the formulas into the numbers you order against:

Pixel pitch Lens must resolve Iris ceiling at 550 nm
1.6 μm 313 lp/mm f/2.4
2.2 μm 227 lp/mm f/3.3
3.5 μm 143 lp/mm f/5.2
5.0 μm 100 lp/mm f/7.5

Every halving of pitch doubles the lp/mm demand and pulls the ceiling a full stop wider. The rows come straight from the formulas; substitute your own pitch.

Catalogues print megapixel classes more often than lp/mm. A class means the lens resolves the Nyquist demand of that pixel count on the format it was designed for. Take 6 MP on a 2/3" sensor, call it 3072 × 2048 pixels on an 8.8 mm chip: 8.8/3072 = 2.9 μm pitch, so the rating stands on about 170 lp/mm. A 12 MP sensor with 1.6 μm pixels demands 313 lp/mm, close to twice that, which is where the one-class-above rule comes from. The Nyquist budget method runs the same arithmetic from the sensor side, and matching lens MTF to your sensor adds what the modulation curves tell you. The iris ceiling is the diffraction story told from the feature side in Airy disk size and the diffraction limit.

What smaller pixels cost on the sensor side

Pixel area falls with the square of pitch. Halve the pitch and each pixel collects a quarter of the photons at the same f-number and exposure, and its full well, the charge at clipping, shrinks by about the same factor. Holding signal-to-noise then takes four times the light, four times the exposure, or gain, and gain spends noise. The smaller sensor cuts cost and size; the lighting budget grows to pay for it.

The LS-BCM-0056 shows where the catalogue has landed: a GigE board camera module with a 1/2" sensor, 12 MP, 1.6 μm × 1.6 μm pixels, a rolling shutter and a C-mount.

Board-level camerasGigE board camera / module, 12 MP, Color/Mono, 1.6 μm×1.6 μm pixels (LS-BCM-0056)LS-BCM-0056
Sensor format
1/2"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$209.00View partBuild a system with it

What that pitch does to contrast on fine detail is covered in why smaller pixels give lower contrast, and the countermeasure, sizing light and exposure before anything else, in stable 2D vision inspection systems.

Focal length shrinks with the sensor, and depth of field follows the iris

A smaller sensor needs a shorter focal length for the same field of view, and a shorter lens at the same f-number gains depth of field. Small pixels give that gain straight back: the iris ceiling forces apertures two stops and more wider than a big-pixel camera would use. At equal magnification, usable depth of field scales with the square of the pitch once both cameras sit at their ceilings, so a camera with pixels twice as wide holds roughly four times the range on the same field of view. The geometry is developed in aperture, working distance and depth of field; the station planning starts with why sensor size and focal length set the field of view and choosing a board camera lens by working distance and field of view.

Geometric depth of field is approximately 2 × f-number × blur × (1 + m) / m², with the blur measured on the sensor and m the magnification. Allow two pixels of blur and the sums come out small at board-camera magnifications; the worked example below lands near half a millimetre.

Depth of field around the focus plane Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.depth of fieldfocus planeapertureoutside it, pointsblur into circleswide aperture: steep cone, shallow zonesmall aperture (high F#): deeper zone
Depth of field around the focus plane. Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.

Worked example: a 12 MP 1/2" board camera on a 30 mm part

The case: inspect a part 30 mm wide, with a station anywhere between 90 and 200 mm, the part moving at 50 mm/s. The camera is the LS-BCM-0056: 12 MP, 1.6 μm × 1.6 μm pixels, 1/2" sensor, C-mount. A 1/2" sensor is 6.4 mm wide, so the array is 6.4 mm / 1.6 μm = 4000 pixels across, and 4000 × 3000 = 12 MP matches the rating.

Magnification first: m = sensor width / field of view = 6.4/30 = 0.213. Focal length from working distance: f = WD × m/(1 + m). At 200 mm, f = 200 × 0.213/1.213 = 35 mm. With a 16 mm lens instead, WD = 16 × 1.213/0.213 = 91 mm. Field-of-view check: 6.4/0.213 = 30 mm on target. Each pixel then covers 1.6 μm/0.213 = 7.5 μm of the part, so a two-pixel feature is 15 μ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

Lens demand: 1000/(2 × 1.6) = 313 lp/mm, iris ceiling f/2.4. Two C-mount candidates cover the sensor. The LS-FFL-0679 is the long-station type: 35 mm, 2/3" format, 6 MP class, 8-11 mm image circle. The LS-FFL-0567 is the high-resolution type: 16 mm, 1.1" format, 20 MP class, F2.8-22 iris, 16-22 mm image circle, under 0.3% distortion.

Set the two candidates side by side:

Specification LS-FFL-0679 LS-FFL-0567
Format 2/3" 1.1"
Resolution 6.0 Megapixel (2.4 μm pixel size) 20 Megapixel
Focal length 35 mm 16 mm
Aperture F2.8 Manual iris F2.8-22
M.O.D. 0.2 m 0.1 m
Price $219.00 $679.00

All 2 share: Mount C-mount. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

The 6 MP class stands on about 170 lp/mm, half of what this sensor samples, so at a 200 mm station it caps the system. The 20 MP class clears 313 lp/mm with margin, so the build goes to 91 mm working distance and the 16 mm lens. Run it at F2.8: the Airy disk is 2.44 × 0.55 × 2.8 = 3.8 μm, or 2.3 pixels.

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

Exposure comes from the motion budget: one pixel of blur on the part is 7.5 μm, so t = 7.5 μm / 50 mm/s = 150 μs. That is strobe territory, or a bright continuous LED with the exposure clamped; ambient will not carry it, and the rolling shutter adds smear above that budget.

Depth of field at F2.8, allowing two pixels of blur: 2 × 2.8 × 0.0032 × 1.213/0.213² = 0.48 mm. Stopping to F4 raises it to 0.68 mm at the cost of a 5.4 μm Airy disk, just over three pixels. Half a millimetre is the number to design around; hold the part inside ±0.24 mm mechanically.

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

Decision for this case: 16 mm, 20 MP class, F2.8 to F4, 91 mm working distance, strobed light at 150 μs, part window ±0.24 mm. If the station must sit at 200 mm, order a 35 mm lens in a 12 MP or better class — filter machine vision lenses on focal length, mount and resolution class — and leave the 6 MP glass for the coarser camera.

M12 or C-mount: where each resolution class lives

M12 board lenses own the smallest builds: short, light, and spread in this catalogue from pinhole types to 12 MP classes. Two checks decide fit. Image circle first: a lens listed at up to 8 mm exactly meets a 1/2" diagonal with nothing to spare, so from 1/2" upward prefer 8-11 mm circles or C-mount glass. Speed second: the iris ceiling from the table applies whatever the mount. The mechanical side, format and focal length and IR cut, is covered in M12 lens selection for board cameras, and the threads in board camera lens mount sizes.

Two M12 examples that show the spread:

M12 board lenses2.8 mm M12 board lens, 8 MP, F2.8 (LS-MBL-0018)LS-MBL-0018
Sensor format
1/2.5"
Mount
M12
$50.00View part
M12 board lenses12 mm, F5.6, 1/1.7", 12 MP, M12-mount lens (LS-MBL-0118)LS-MBL-0118
Sensor format
1/1.7"
Image circle
8-11 mm
$39.00View part

The LS-MBL-0018 is a 2.8 mm, F2.8, 8 MP M12 lens for 1/2.5" sensors with an image circle up to 8 mm. That speed with that class is the shape of a sub-2 μm pixel build. The LS-MBL-0118 is a 12 mm, F5.6, 12 MP M12 lens for 1/1.7" sensors. That iris suits pixels around 3.5 μm and larger, where depth of field is worth more than the last of the contrast. For sub-2 μm sensors, take the faster glass, a lower f-number at the same focal length, rather than a slow lens you have to open all the way.

Checks before you order

  • Image circle at or above the sensor diagonal. An 8 mm circle on an 8 mm diagonal leaves zero margin for sensor alignment.
  • Resolution class at least equal to the sensor's, and one class above for pixels under 2 μm.
  • Maximum aperture at or under the table's ceiling, and the lens sharp near wide open, because that is where it will run.
  • Bandwidth: a 12 MP mono frame is 12 MB at 8 bits, and a GigE link carries about 125 MB/s at the wire, so plan on about 10 fps. USB3 moves roughly three times that.
  • Light: four times the photons for every halving of pitch. Budget the LED and its controller together with the exposure time, not after.
  • Bench-test on a resolution target at the working f-number and working distance before the design freezes.

When small pixels are the wrong answer

Three cases flip the decision. Low light and wide dynamic range: a quarter of the photons per pixel for each halving of pitch is a price no lens pays back, so big pixels win. Depth of field at magnification: the stopped-down big-pixel camera holds several times the range, as the scaling above shows. Data-limited pipes: 12 MP rolling-shutter frames flood a modest link, while a global-shutter camera with fewer, larger pixels delivers usable frames. The LS-BCM-0003 is that shape of camera: 3.1 MP, IMX252 sensor, 1/1.8" global shutter, 120 fps, USB3, C-mount. Behind 6 MP-class glass it out-resolves a starved 12 MP build on about a quarter of the data. The wider camera-side trade-offs sit in board level camera selection for embedded vision machines.

Run your own pitch through the lens focal length calculator once the station geometry is fixed, then open the lens finder filtered on format, class and maximum aperture, or start at the lens step of the configurator. For a pairing outside the ordinary, send the pixel pitch and the field of view to the Applications Team through the contact page and we will run the lp/mm check with you.

Questions

How many lp/mm does my lens need for 2.2 μm pixels?

One line pair spans two pixels, so the demand is 1000/(2 × 2.2) ≈ 227 lp/mm. The lens must hold that over the image circle, not only on axis. In catalogue terms that is a 1/1.8"-class sensor near 10 MP (7.2 mm / 2.2 μm ≈ 3300 pixels across), so buy the lens one megapixel class above the sensor. Below that, the sensor happily samples blur.

Can I reuse a CCTV or older machine-vision lens on a 12 MP board camera?

Only if it covers the image circle and its resolution class matches. Glass qualified on 4-5 μm pixels resolves roughly 100-125 lp/mm, about a third of what 1.6 μm pixels sample, so corners and fine detail go soft. Bench-test the pair on a bar target at your working f-number before the design freezes; if it fails, a current 12 MP-class board lens is the fix.

Why does my small-pixel camera get softer when I stop down?

Diffraction. The Airy disk diameter grows as 2.44 × λ × f-number: about 3.8 μm at f/2.8 and 10.7 μm at f/8 with 550 nm light. On 1.6 μm pixels that is 2.3 pixels versus nearly seven, so detail contrast falls as the iris closes. Keep the iris at or below the ceiling for your pitch and win depth of field with light or a shorter working distance instead.

Do smaller pixels always mean a worse image?

No. More, smaller pixels put more samples on the part, which wins when light is plentiful and the lens keeps up. You pay in sensitivity and full well: each halving of pitch leaves a quarter of the photons per pixel at the same f-number. Low-light and high-dynamic-range jobs, and builds that need a stopped-down iris for depth of field, are better on bigger pixels.

What should I check before ordering the lens?

Image circle at or above the sensor diagonal; a resolution class at least equal to, and for sub-2 μm pixels one class above, the sensor; a maximum aperture at or under the diffraction ceiling (f/2.4 to f/3.3 for 1.6-2.2 μm pixels); the right mount and back-focus room; and enough light for the exposure your motion budget allows. Then bench-test at the working f-number.