Lenses & opticsExplainer

M12 lens light gathering: pick a lower f-number, same focal length

Image light gathering scales as 1/N²: swap an M12 lens to a lower f-number at the same focal length and multiply per-pixel light 2-4x with the FOV fixed.

LumaSpec Vision9 min read Share on LinkedIn

On this page 9 sections
  1. 01The rule: brightness scales as one over f-number squared
  2. 02Keeping the field of view fixes the focal length
  3. 03Worked example: a 70° tracking camera two stops short
  4. 04The trade: depth of field, corners and the diffraction floor
  5. 05What to match when you order the faster lens
  6. 06The same two stops at longer focal lengths
  7. 07When a lens swap is the wrong fix
  8. 08Checks before you order
  9. 09Questions

A tracking camera that only behaves at low gain is short of photons, and the fix is rarely the sensor. On a board camera the f-number of the lens decides how much light reaches each pixel, and image brightness scales as one over f-number squared. When the field of view must stay as it is, the focal length is already fixed and the aperture is the only variable left. This guide gives you the scaling rule, a worked swap from F2.8 to F1.4 on a 70° tracking camera, the costs in depth of field and corner sharpness, and the checks to run before you order a different M12 board lens.

The rule: brightness scales as one over f-number squared

The f-number N printed on a lens (F1.4, F2.8, F5.6) is the focal length divided by the entrance-pupil diameter. Sensor illuminance falls with the square of N — the relation behind the F-number scale — so each step in the standard sequence F1.4, F2.0, F2.8, F4, F5.6 doubles or halves the light per pixel.

light ratio = (N_old / N_new)² exposure_new = exposure_old × (N_new / N_old)² gain reduction available = 40 × log10(N_old / N_new) dB
Lens speed Light vs F2.8 Shutter for the same signal Gain change for the same signal
F1.4 4× ×0.25 -12 dB
F2.0 2× ×0.5 -6 dB
F2.8 1× ×1 0 dB
F4 0.5× ×2 +6 dB
F5.6 0.25× ×4 +12 dB

Two stops is the practical prize in board lenses: F2.8 to F1.4, four times the light. Below F1.4 the M12 choices thin out quickly and the aberration cost grows, so treat F1.4 as the realistic target for a same-field swap.

Keeping the field of view fixes the focal length

On a given sensor the horizontal field of view follows the focal length alone:

FOV = 2 × atan(sensor width / (2 × f))

Fix the sensor and the field of view and f is fixed. What you buy with a lower f-number is a wider entrance pupil, f/N: a 4 mm lens at F2.8 works through a 1.43 mm pupil and at F1.4 through a 2.86 mm one, four times the collecting area. A shorter focal length looks tempting and is a trap: it delivers the same F2.8 brightness while widening the framing you wanted to keep. Work out the focal length your field of view actually needs:

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

The lens finder filters M12 models by focal length, sensor format and image circle once you know the target.

Worked example: a 70° tracking camera two stops short

The inputs: a 70° horizontal field of view that your placement and calibration already depend on; a 1/2.7" sensor about 5.4 mm wide, the format most wide M12 board lenses are built around; a fitted 4 mm F2.8 lens; and images that only pass at high gain.

Step 1 — focal length that keeps 70°: f = 5.4 mm / (2 × tan 35°) = 5.4 / 1.400 = 3.86 mm. A 4 mm lens covers 2 × atan(2.7 / 4) = 68° and a 3.6 mm lens covers 74°, so the swap stays inside the 3.6-4 mm class and the framing moves a few degrees at most.

Step 2 — light gained by the aperture: (2.8 / 1.4)² = 4. Cross-check with the pupils: 4 / 2.8 = 1.43 mm against 4 / 1.4 = 2.86 mm, and 2.86² / 1.43² = 4.

Step 3 — spending the two stops. Say the shutter is 4 ms today: 4 ms × (1.4 / 2.8)² = 1 ms now delivers the same pixel signal, so motion blur shrinks fourfold. Or keep 4 ms and drop gain by 40 × log10(2) = 12 dB.

Decision: an F1.4 lens in the same 3.6-4 mm class returns exactly two stops. If your shortfall is two stops or less, this swap closes it; if you are three or more stops short at F2.8, no same-field M12 lens carries it — add scene light instead.

The trade: depth of field, corners and the diffraction floor

Geometric blur grows in proportion to f-number, so depth of field shrinks roughly in proportion as you open up: F2.8 to F1.4 halves the sharply focused range. At tracking distances it bites less than the number suggests, because a short focal length goes hyperfocal close to the camera.

H = f² / (N × c) hyperfocal distance near sharp limit ≈ H × s / (H + s) focused at distance s

With f = 4 mm and a circle of confusion of 6 µm, twice a 3 µm pixel, H = 16 / (2.8 × 0.006) ≈ 0.95 m at F2.8 and 16 / (1.4 × 0.006) ≈ 1.9 m at F1.4. Focused on a target at 5 m, the near limit sits at 0.95 × 5 / (0.95 + 5) ≈ 0.8 m versus 1.9 × 5 / (1.9 + 5) ≈ 1.4 m, and the far limit is infinity in both cases. A camera watching a line at 5 m or beyond holds focus either way; the trade only bites inside about 2 m.

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.

Wide open is where lens design shows its seams. Most M12 designs are computed to peak one or two stops down, so at F1.4 expect a sharp centre but softer corners, stronger vignetting and shading that is harder to correct. Judge a candidate on a flat target at your working distance, following the loop in M12 lens focusing: adjust, check corners and lock.

The opposite error costs resolution too. The diffraction spot is 2.44 × λ × N in diameter, about 11 µm at F8 with 550 nm light, nearly four 3 µm pixels across; at F5.6 it is already about 7.5 µm. Stopping down is no brightness strategy, and on small pixels the usable band is roughly F1.4 to F4 before aberrations and diffraction take their cut from either end.

What to match when you order the faster lens

  • Focal length within about 10% of the fitted lens. At 4 mm that is ±0.4 mm, and it moves a 68° field of view by roughly ±6°.
  • Image circle at or above the sensor diagonal. A 1/2.7" sensor has about a 6.7 mm diagonal, so the up-to-8 mm class covers it; a 1/1.8" sensor needs the 8-11 mm class.
  • Resolution class at or above the sensor's megapixel count, as the listings group it.
  • Mount and back focal length: M12 barrels focus by threading in and out, and focal length versus back focus in board cameras explains what moves when the focal length changes.
  • f-number: the fastest lens whose corners still pass the flat-target test.

Most wide board lenses run F2.8, as the LS-MBL-0018 does: a 2.8 mm, F2.8, 8 MP lens for 1/2.5" sensors.

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
Resolution
6-10 MP
Image circle
Up to 8 mm
$50.00View partBuild a system with it

For the 4 mm, 1/2.7" tracking geometry above, start in the starlight low-light family: the LS-MBL-0198 is a 4 mm lens for 1/2.7" sensors from that series.

M12 board lenses4 mm, 1/2.7", 4 MP, M12-mount starlight low-light lens (LS-MBL-0198)LS-MBL-0198
Type
Starlight
Sensor format
1/2.7"
Mount
M12
Resolution
5 MP
$59.00View partBuild a system with it

The same two stops at longer focal lengths

The scaling ignores the focal length; only the pair of f-numbers matters. F5.6 to F2.8 is again (5.6 / 2.8)² = 4×. At 12 mm the shop carries both speeds side by side: the LS-MBL-0113 is a 12 mm, F2.8, 5 MP lens for 1/1.8" sensors, and the LS-MBL-0118 is a 12 mm, F5.6, 12 MP lens for 1/1.7" sensors.

M12 board lenses12 mm, F2.8, 1/1.8", 5 MP lens, M12-mount (LS-MBL-0113)LS-MBL-0113
Sensor format
1/1.8"
Mount
M12
$39.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 slower 12 MP part is not a waste: holding that pixel count on a small frame is the harder optical problem and speed is what it costs. The faster 5 MP part is the light gatherer. One limit to keep straight: this is the distant-scene case. Once the target sits closer than about ten focal lengths, magnification m is no longer negligible and the working f-number N(1+m) sets the light — the working f-number guide carries the correction.

When a lens swap is the wrong fix

  • Three or more stops short at F2.8: no same-field M12 swap gets there. Add light to the scene instead; photons from a lamp cost less than photons squeezed through glass.
  • The scene is dark but blur allows 10-50 ms: a longer shutter collects the missing photons without new glass.
  • Close-range targets inside about ten focal lengths: compute the working f-number first, or the swap will under-deliver.
  • The camera itself is the bottleneck — sensor too small, too noisy, wrong shutter type: choosing it is its own exercise, covered in board level camera selection for embedded vision machines.

Checks before you order

  • Compute the focal length that holds your field of view and shortlist within ±10% of it.
  • Check the image circle against the sensor diagonal before anything else; an undersized circle darkens every corner of every frame.
  • Filter the machine vision lenses by your format and resolution class, then shortlist the two fastest candidates.
  • Test both on a flat target at the working distance and judge corners, not just the centre.
  • If the camera is monochrome, settle the IR question first: filter or IR-corrected optics.
  • Thread to focus, check corners, lock the barrel and re-check after a temperature cycle; camera focus drift with temperature shows why the lock matters.

Run the numbers first: two stops of aperture is usually the cheapest fix on the bench, and if the shortfall is bigger, no lens recovers it. Shortlist from the finder above, or start the lens configurator with your sensor and field of view; if you need more than two stops, send the scene, shutter and distance in a quote request and we will spec the lighting instead.

Questions

Does a lower f-number change my field of view?

No. Framing follows the focal length and the sensor, so the picture lines up exactly as before; only brightness and depth of field change. One subtlety: fast lenses can show a small focus shift when you stop down, because wide-open spherical aberration bends the best-focus plane, so re-confirm focus at the aperture you will actually run.

How much gain can I drop after a two-stop aperture swap?

A two-stop swap is four times the photons. Sensor signal amplitude follows photon count, so the same digital level comes out at about 12 dB less analogue gain, or at a quarter of the shutter time. Take the gain cut when motion blur is tight; take the longer shutter when the scene is static and blur is free.

Why is more light better than simply raising gain?

Gain multiplies whatever the sensor delivered, photon shot noise included, so a high-gain image carries the same signal-to-noise ratio as the low-gain capture that fed it, plus extra read noise at high settings. Extra photons from a wider aperture raise the shot-noise-limited ratio before any amplification. That is why systems tuned for low gain look for glass before they look for gain.

Will an F1.4 board lens stay sharp across the whole frame?

Usually not to the corner at full aperture. Designs are optimised one or two stops down, so expect a good centre and softer corners wide open, with more vignetting that shading correction only partly recovers. Test at your working distance on a flat target; if corners fail at F1.4 but pass at F2.0, run F2.0 and bank one stop instead of none.

Does a shorter focal length gather more light?

Per pixel, no. At normal object distances the image illuminance depends on the f-number alone, so a 2.8 mm lens at F2.8 and a 12 mm lens at F2.8 deliver the same brightness per pixel of the same scene. A shorter focal length widens the field of view instead; each pixel then sees a wider slice, not a brighter one.