Every machine vision lens choice comes down to four numbers: the field of view you must cover, the working distance you must fit into, the magnification that links them, and the f-number that trades depth of field against light. They are not independent. Fix the sensor and the field of view, and the paraxial equations hand you the focal length, the aperture and the depth of field. This primer collects the definitions, the sensor and mount tables, and the formulas that size most industrial optics, then walks one example from a 30 mm part to a lens and an aperture you can order.
The four numbers and one thin lens
A lens collects the light scattered by an object and rebuilds an image of it on the sensor. Five parameters describe that job:
- Field of view (FoV): the total area the lens images onto the sensor's active area.
- Working distance (WD): the object-to-lens distance where the image is sharpest.
- Depth of field (DoF): the range of object positions that stay acceptably sharp.
- Sensor size: the active area, equal to pixel size times pixel count in each direction.
- Magnification (M): sensor size divided by field of view.
Resolution — the smallest separation of two points that still reads as two points — depends on the lens and the sensor together, and is treated separately from this sizing pass.
The arithmetic rests on two approximations: paraxial optics (only rays near the optical axis) and the thin lens (thickness ignored). With object and image both in air and distances measured from the lens:
s is the object distance, negative by convention; s' is the image distance; f is the focal length; h and h' are object and image heights. Rearranged into the positive magnitudes you will use every week:
Magnification ties sensor, field of view and pixel size
Magnification is the hinge of the whole selection:
A 2/3-inch sensor with an 8.8 mm active width over an 88 mm FoV works at M = 0.1. The same sensor over a 17.6 mm FoV works at M = 0.5 — five times the magnification, one fifth of the scene. Object-space sampling follows directly: pixel size divided by M. At 5.5 µm pixels those two cases put 55 µm and 11 µm of object on each pixel. The object-space pixel size calculation turns that into a feature-detection budget.
Sensor sizes you will meet, in millimetres of active area:
| Format | Width | Height | Diagonal |
|---|---|---|---|
| 1/3-inch | 4.8 | 3.6 | 6.0 |
| 1/2-inch | 6.4 | 4.8 | 8.0 |
| 2/3-inch | 8.8 | 6.6 | 11.0 |
| 1-inch | 12.8 | 9.6 | 16.0 |
| 4/3-inch | 18.8 | 13.5 | 22.5 |
| Full frame (35 mm) | 36.0 | 24.0 | 43.3 |
Treat the format label as a nickname, not a dimension. Two widely used 2/3-inch sensors measure 8.45 × 7.07 mm and 11.26 × 5.98 mm — same label, different shape. Always compute the active area from pixel count times pixel size. The sensor coverage and field-of-view margin guide and the image sensor format reference carry wider tables. Line-scan sensors stretch the same idea along one axis: 2048 pixels at 10 µm form a 20.5 mm line, and 8192 pixels at 7 µm form a 57.3 mm line.
Field of view and working distance
Combine the two relations and you can size a lens from either end:
A 25 mm lens at M = 0.1 sits at WD = 25 × 1.1 / 0.1 = 275 mm. Push the same lens to M = 0.5 and the working distance collapses to 25 × 1.5 / 0.5 = 75 mm, while the FoV on a 2/3-inch sensor shrinks from 88 mm to 17.6 mm. Nothing changed but the conjugates.
Two lens families live at opposite ends of this equation. Fixed focal length lenses are built for objects far away compared with f (infinite conjugates), so the industry labels them by focal length. Macro and telecentric lenses work at finite conjugates with a set magnification and working distance, so the industry labels them by magnification. Below roughly ten focal lengths of object distance you are in macro territory: the focus plane sits well behind f, and the lens behaves as a magnification device rather than a field-of-view device. The machine vision lens focal length guide works the fixed-focal-length side in depth, and the blister inspection field-of-view example applies the same formulas on a packaging line.
F-number, working f-number and depth of field
The aperture stop sets how much light enters. Divide focal length by aperture diameter and you have the f-number:
The standard series runs F/1.0, F/1.4, F/2, F/2.8, F/4, F/5.6, F/8, F/11, F/16, F/22 — each step halves the light. At macro and telecentric distances the honest number is the working f-number, which grows with magnification: a lens set to F/8 and working at M = 0.25 operates at wF/# = (1 + 0.25) × 8 = 10.
Depth of field rides on that working number:
with p the pixel size in micrometres and k an application factor: 0.008 for measurement, 0.015 for defect inspection. The classic value to memorise: M = 0.25, wF/# = 8, p = 5.5 µm, k = 0.015 gives DoF = 8 × 5.5 × 0.015 / 0.0625 = 10.5 mm. Halve the magnification and depth of field quadruples; stop down one stop and it grows by about a third, paid for with half the light.
F/8 is the common working aperture: smaller apertures run into diffraction, larger ones into aberrations and distortion. Diffraction blur diameter is 2.44 × λ × wF/#, so at 550 nm and wF/# 8 the disc is 10.7 µm — about two 5.5 µm pixels. That is the ceiling to watch as you stop down for depth. The working f-number and magnification analysis extends the trade-off, and the exposure and gain control notes cover what the aperture does to your exposure budget. For the range on real glass, the LS-FFL-0567 is a 16 mm, 1.1", 20 MP C-mount machine vision lens with an aperture range of F2.8-22 and distortion under 0.3%.
- Type
- Machine vision fixed
- Sensor format
- 1.1"
- Mount
- C-mount
- Resolution
- 16-25 MP
From F2.8 to F22 the light falls seven stops, a factor of 128 — one lens covering both ends of the depth-versus-light trade.
Worked example: a 30 mm part on a 2/3-inch sensor
The task: surface inspection of a 30 mm wide part with 4 mm of height variation, on a 2/3-inch camera of 1600 × 1200 pixels at 5.5 µm each.
- Sensor area. 1600 × 5.5 µm = 8.8 mm; 1200 × 5.5 µm = 6.6 mm. Active area 8.8 × 6.6 mm, 11.0 mm diagonal.
- Field of view. The part is 30 mm across; hold about 15% for positioning and lighting margin, so plan a 35 mm FoV.
- Magnification. M = 8.8 / 35 = 0.25. Exact coverage: 8.8 / 0.25 = 35.2 mm wide, 6.6 / 0.25 = 26.4 mm high.
- Pixel budget. Object-space pixel size = 5.5 µm / 0.25 = 22 µm. Plan at least three pixels across the smallest feature, so 66 µm is the reliable detection floor.
- Focal length. Clearance allows about 175 mm of standoff. f = WD × M / (1 + M) = 175 × 0.25 / 1.25 = 35 mm. The LS-FFL-0679 is a 35 mm, 2/3", 6 MP, C-mount machine vision lens — a direct fit.
- Focus position. The lens-to-sensor distance is s' = f (1 + M) = 35 × 1.25 = 43.75 mm; the 8.75 mm of extension beyond infinity focus (f × M) is taken up by the focus ring. If you later need more magnification, extension tubes do it mechanically. The LS-LXR-0284 is a 15 mm C/CS extension tube. On a 35 mm lens, 15 mm of extension sets M = 15 / 35 = 0.43.
- Aperture and depth of field. Set F/8: wF/# = (1 + 0.25) × 8 = 10. DoF = 10 × 5.5 × 0.015 / 0.0625 = 13.2 mm for defect inspection, and 10 × 5.5 × 0.008 / 0.0625 = 7.0 mm for measurement-grade sharpness. The 4 mm of part height variation sits inside both.
- Light budget. Closing from F/2.8 to F/8 costs three stops, so plan eight times the exposure time or eight times the light of an F/2.8 set-up.
The decision: a 35 mm lens at 175 mm working distance, run at F/8, delivering 22 µm per pixel and 7–13 mm of usable depth. If the machine later forces 300 mm of standoff, the same math returns f = 300 × 0.25 / 1.25 = 60 mm — same field of view, longer lens.
The same two formulas carry across industries — this field-of-view and working-distance calculation for blister inspection applies them to pharmaceutical cavities.
Mounts and flange distance
The mount is a mechanical standard: flange focal distance, diameter, thread pitch. The lens flange distance and the camera flange distance must match exactly, or focus never lands where the barrel says it should.
| Mount | Flange focal distance | Notes |
|---|---|---|
| C | 17.526 mm | 1-inch (25.4 mm) diameter, 32 threads per inch; the industrial default |
| CS | 12.526 mm | 5 mm shorter; common on 1/3-inch and 1/2-inch cameras |
| F | — | Bayonet from 35 mm photography; large sensors and line scan; no back-focus adjustment |
| M12, M42, M58, M72 | Part of the lens spec | Diameter and pitch in the name, for example M72 × 0.75 |
A C-mount lens on a CS-mount camera needs a 5 mm spacer ring, or it focuses only in the near range; the C mount versus CS mount guide shows the working combinations. Threaded mounts allow a small back-focal adjustment, which matters because the sensor cover glass counts toward the real flange-to-detector distance — telecentric lenses ship with spacer kits for exactly that tuning. Beyond 1.1-inch sensors, large-format M58 and M72 optics take over from C-mount.
Fixed focal length, macro or telecentric
| Fixed focal length | Macro (fixed magnification) | Telecentric | |
|---|---|---|---|
| Labelled by | Focal length | Magnification | Magnification |
| Magnification | Set by working distance | Fixed | Fixed |
| FoV shifts when the part moves in depth | Yes | Yes | No |
| Perspective (parallax) error | Present | Present | Removed on the object side |
| Natural jobs | Presence checks, wide scenes, OCR | Close-up detail at one distance | Gauging and measurement |
Telecentric lenses buy magnification invariance: image size stays constant as the part moves toward or away from the lens, which is what a dimensional measurement needs. The entocentric versus telecentric comparison draws the ray diagrams. As a spec-sheet anchor, the LS-TCL-2194 is a 0.5x, C-mount object-side telecentric lens with a 110 mm working distance, built-in coaxial light, for 1" sensors. On a 12.8 mm sensor width, 0.5x images a 25.6 mm field — close to the worked example above, with the measurement stability that fixed magnification adds.
- Sensor format
- 1"
- Mount
- C-mount
- Image circle
- 11-16 mm
- Type
- Object-side telecentric
| Specification | LS-FFL-0679 | LS-TCL-2194 |
|---|---|---|
| Price | $219.00 | $1,539.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.
Checks before you order
- Image circle covers the sensor diagonal. A 2/3-inch sensor needs 11.0 mm; a lens built for smaller circles vignettes the corners.
- Mount matches, spacers counted. C on CS needs the 5 mm ring; F-mount gives you no back-focus trim.
- Depth of field exceeds part height variation with margin — the k factor is a first-order estimate, so do not run at 90% of the calculated depth.
- Object-space pixel at least three times smaller than the smallest feature you must detect.
- Distortion specified for measurement work. Read geometric distortion, not TV distortion, as the distortion datasheet guide explains.
- Focus ring reaches the computed conjugate with travel to spare on both sides.
When the usual answer is wrong
- The sensor swap changes everything. Put a larger sensor behind the same lens at the same working distance and the FoV grows with the sensor — until the image circle vignettes it. The same lens on a different sensor walkthrough quantifies the shift.
- Stopping down is not free depth. At wF/# 16 the diffraction disc is 2.44 × 0.55 × 16 = 21 µm, nearly four 5.5 µm pixels. The image goes deeper but softer, and sub-pixel measurement suffers first.
- Below ten focal lengths you are in macro. A 25 mm lens used at 150 mm is a fixed-magnification device: its field of view moves with every millimetre of standoff, and focus tracking becomes the dominant error source. Extension tubes deepen the macro end at the cost of working distance and light.
Where to go next
Run your own numbers through the lens focal length calculator or the depth-of-field calculator, filter candidates in the lens finder, or let the system configurator walk camera, lens and light in one pass. For the full vocabulary, the machine vision glossary defines every term a datasheet will use, and the lens selection guide turns these formulas into a repeatable procedure. For a second worked context, this optics selection walkthrough for an industrial camera applies the same sizing to a compact camera build. Questions on a specific part drawing? Reach us through the contact page.
Questions
What is primary magnification in machine vision?
Primary magnification is sensor size divided by field of view — the number that links what the camera sees to what the sensor records. An 8.8 mm sensor width over a 35.2 mm field of view works at 0.25x: every object feature is imaged at a quarter of its size, and each 5.5 µm pixel covers 22 µm of the part. Telecentric and macro lenses are specified by it because it is fixed at their design working distance.
How do you calculate working distance from focal length and magnification?
WD = f (1 + M) / M. A 35 mm lens at M = 0.25 sits 175 mm from the part: 35 × 1.25 / 0.25 = 175. Inverted, the same relation gives the focal length you need: f = WD × M / (1 + M), so 300 mm of standoff at 0.25x calls for a 60 mm lens. The lens-to-sensor distance is f (1 + M), which is 43.75 mm in the first case.
What is the difference between F-number and working f-number?
F-number is focal length divided by aperture diameter, defined for an object at infinity. At finite conjugates the honest value is the working f-number, wF/# = (1 + M) × F/#. At M = 0.25, a lens set to F/8 actually operates at wF/# 10. Light gathered scales with the inverse square of the working number, so close-up work is dimmer than the barrel setting suggests.
Can a C-mount lens be used on a CS-mount camera?
Yes, with a 5 mm spacer ring. The C-mount flange distance is 17.526 mm and CS-mount is 12.526 mm; without the spacer the sensor sits 5 mm too close to the lens and focus lands only in the near range. The reverse pairing, a CS-mount lens on a C-mount camera, cannot be fixed with a ring, because the lens would have to sit 5 mm inside the camera body.
How much depth of field does F/8 give?
DoF = wF/# × pixel size × k / M², with k = 0.008 for measurement and 0.015 for defect inspection. At M = 0.25 with 5.5 µm pixels, F/8 means wF/# 10: about 7 mm of depth for measurement work and 13 mm for inspection. Double the magnification to 0.5 and those figures fall to roughly 1.8 mm and 3.3 mm.
Why does the same lens give a different field of view on another camera?
Field of view is set by the sensor behind the lens, not by the lens alone: FoV = sensor width / M. A lens that frames 35.2 mm on a 2/3-inch sensor frames 51.2 mm on a 1-inch sensor at the same working distance, because 12.8 / 0.25 = 51.2. The catch is coverage: the larger sensor needs a larger image circle, or the corners of the image go dark.

