How to Choose a Machine Vision Lens

Choosing a lens is mostly an elimination problem. Out of thousands of combinations of focal length, aperture, image circle and mount, only a handful physically fit your camera, your field of view, your machine and your accuracy target. This guide walks through the same method our selection engineers use, in the order that eliminates the most candidates the fastest — the sequence printed in our catalog.

The short answer. Before you open a catalog, write down five numbers:

  1. Sensor format or active width (not the marketing megapixel count)
  2. Field of view you must cover, in mm
  3. Working distance your fixture allows, in mm
  4. Mount on the camera (C / CS / F / M42 / M58 / M72 / M90 / M95)
  5. Accuracy you must hold — only if the job is measurement, not detection

Those five values remove about 95% of the catalog. The rest of this guide is how to use them in order, how to sanity-check the result, and how to avoid the six mistakes that cause most lens returns.

1. The five constraints a lens must satisfy

Every lens decision is a trade against five constraints. When a lens fails in the field, it is almost always one of these — and it is usually cheaper to check all five on paper than to debug them on a machine.

ConstraintWhat it fixesHow it fails
Image circleWhether the sensor is fully coveredDark, soft, colour-shifted corners (vignetting)
MagnificationField of view and object-space resolutionPart does not fit, or resolution is coarser than the defect
Working distanceMechanical fit and lighting roomCannot focus, or the barrel collides with the fixture
Resolution (MTF)Edge sharpness at your pixel pitchSoft edges, unstable thresholds, false rejects
Mount and barrelInterface and clearanceDoes not screw on, or hits the sensor / the light ring

For pure presence/absence or code reading, constraints 1–5 are enough. For dimensional measurement, add two more: distortion and telecentricity — covered in Step 5.

2. Step 1 — Match the lens image circle to your sensor

A lens projects a circular image; the sensor must fit entirely inside that circle. The lens is specified by format (2/3″, 1.1″, 4/3″) or directly by image-circle diameter — always compare it against the sensor diagonal, not the megapixel count.

Sensor formatActive area (mm)Diagonal (mm)Minimum image circle
1/3″4.8 × 3.66.0φ6 mm
1/2.5″5.7 × 4.37.1φ7.1 mm
1/1.8″7.2 × 5.49.0φ9 mm
2/3″8.8 × 6.611.0φ11 mm
1″12.8 × 9.616.0φ16 mm
1.1″ (12/20MP)14.1 × 10.417.6φ17.6 mm
4/3″17.3 × 13.021.6φ21.6 mm
APS-C23.5 × 15.628.2φ28 mm
Full frame36 × 2443.3φ43.3 mm

Coverage works in one direction only: a 2/3″ lens (image circle φ11 mm) covers 2/3″, 1/2″ and 1/1.8″ sensors, but not a 1.1″ sensor. A 1.1″ 20MP lens covers 1.1″, 1″, 2/3″ and 1/2″. Going the other way produces dark, vignetted corners — and worse, those corners usually fail only after you have mounted the lens on the machine.

Line scan cameras: work from the pixel format

A line scan sensor is a single row, so the "diagonal" is essentially the line length. Multiply horizontal pixels by pixel size, then add margin for alignment tolerance and field curvature.

CameraSensor line lengthRequired image circle
2K / 7 µm14.3 mmφ18 mm
4K / 7 µm28.7 mmφ32 mm
8K / 5 µm41.0 mmφ46 mm
8K / 7 µm57.3 mmφ62 mm
16K / 3.5 µm57.3 mmφ62 mm
16K / 5 µm81.9 mmφ90 mm

Our LS series is grouped exactly this way (LS-F for φ32–φ46, LS-W for φ62, LS-XL for φ82–φ90). Larger-format line scan lenses can always be used downward on a smaller sensor — just accept the larger barrel and shorter maximum magnification.

3. Step 2 — Compute the magnification

Magnification is the bridge between the sensor you have and the field of view you need. Note it is the active width that matters, never the diagonal.

Magnification m = sensor width ÷ field of view

Area camera: a 1.1″ sensor (14.1 mm active width) imaging a 40 mm-wide part gives m = 14.1 / 40 ≈ 0.35X.
Line scan camera: sensor width = horizontal pixels × pixel size, so an 8K7µm camera is 8192 × 0.007 = 57.3 mm. Imaging a 229 mm web gives m = 57.3 / 229 = 0.25X.

SensorSensor widthField of viewMagnification
1/1.8″7.2 mm28.8 mm0.25X
2/3″8.8 mm35.2 mm0.25X
1.1″14.1 mm40 mm0.35X
1.1″14.1 mm14.1 mm1.0X
8K / 7 µm57.3 mm229 mm0.25X

Filter the family by magnification first

Lens families are built around magnification ranges, because that is what fixes their optical construction:

  • FA fixed focal (FA series) — general imaging, roughly 0.05X–0.5X, widest focal-length choice and lowest cost per unit.
  • Macro (MC series) — 0.1X–0.8X at short working distance, for connector pins, springs, small threads.
  • Line scan (LS series) — 0.01X–3X depending on family, corrected for a flat image plane at the web.
  • Large format / full frame (LD series) — 100MP class at 3.1µm pixels.
  • 360° wall inspection (RB series) — looks sideways into bores and caps; magnification is replaced by bore diameter and depth of field.

Then check object-space resolution

Magnification also sets how much of the part lands on one pixel — the number that decides whether you can see the defect at all:

Object pixel size = sensor pixel pitch ÷ m

At 3.45 µm pixels and 0.25X, one pixel covers 13.8 µm of the part. A 0.1 mm scratch is 7 pixels wide — comfortable. The same defect at 0.05X is 3.5 pixels — marginal once you add lighting and threshold noise. If your defect is smaller than about 3 object pixels, no amount of lens quality will save the inspection.

4. Step 3 — Set the working distance and focal length

Magnification alone does not fix the geometry: the same 0.25X can be reached at 150 mm or 800 mm working distance with different focal lengths. Working distance is usually dictated by the machine (clearance for the part handler, the light ring, the robot). Once m and WD are known, focal length follows.

Approximate focal length f ≈ m × WD ÷ (1 + m)
MagnificationWorking distanceApprox. focal lengthTypical pick
0.10X500 mm45 mmFA50
0.25X150 mm30 mmFA35 / FA30
0.25X400 mm80 mmFA75 / FA85
0.35X150 mm39 mmMC3510A
0.50X300 mm100 mmFA100
1.00X100 mm50 mmMC5010A

Why the real lens differs from the formula. The estimate assumes a thin lens with WD measured from the front principal plane, and it ignores the housing. Real lenses deviate by 10–20%, which is why datasheets publish a working-distance range for each magnification rather than a single number. Use the formula to shortlist, then confirm on the model page — every CLARIOPTICS model page lists its magnification range, WD range and object-to-image (conjugate) distance.

Two practical checks before you commit:

  • Lighting clearance. A ring light sits 20–40 mm in front of the barrel. If your WD is 60 mm and the barrel is 45 mm long, the light is in the part's face and the image is a hotspot.
  • Minimum object distance. Macro work is where this bites: the MC series starts at 59 mm WD, and shorter than that the barrel simply cannot focus.

5. Step 4 — Confirm the mount and the mechanics

Mount errors are the most common reason a delivered lens comes straight back. Flange-back distance (the gap from the mount face to the sensor plane) must match, and there must be room for the barrel.

MountFlange backUsually found on
CS12.5 mmCompact and older analogue cameras
C17.526 mmMost area scan cameras up to 1.1″
M42 × 145.46 mmLarge-format area and some line scan
F46.5 mmSome 8K line scan and 100MP configurations
M58 / M72 / M90 / M95Lens-specific8K and 16K line scan, large-format sensors

Large line scan mounts are not standardised the way C-mount is: bore, thread pitch and flange back are set by the lens design, so confirm them on the datasheet rather than assuming. Two classic mismatches:

  • CS lens on a C-mount camera — the lens cannot reach the sensor; you get a permanently out-of-focus image at any focus position.
  • C lens on a CS-mount camera — flange back is 5 mm too long; the barrel can press against the sensor cover glass.

Also check the mechanical envelope: barrel diameter against the fixture, and filter thread against the light or the polariser you plan to add. CLARIOPTICS publishes STP and IGS models for every series, so the collision check is a five-minute job in your CAD rather than a guess. If the mount is the only thing standing between you and the right optics, we can change the mount at the factory, and we supply adaptor rings between C, CS, F, M42, M58 and M72.

6. Step 5 — Check resolution, MTF and distortion

If the job is detection, you can stop at Step 4. If the job is measurement, three more numbers decide whether the system will hold its tolerance.

Resolution: does the lens match the pixel pitch?

The sensor can resolve detail up to its Nyquist frequency: Nyquist (lp/mm) ≈ 500 ÷ pixel pitch (µm). A lens is only "good enough" if its MTF at that frequency is still respectable — as a working rule, 30% or better at Nyquist.

Pixel pitchNyquist frequencyLens requirement
2.4 µm208 lp/mmHigh-NA design, large aperture usually not usable
3.45 µm145 lp/mm20MP-class lenses, stop down 1–2 stops
5 µm100 lp/mmStandard machine vision lens, easy
7 µm71 lp/mmAny decent FA or LS lens
14 µm36 lp/mmNot the limiting factor

This is the reason a 2MP lens looks fine on a 2MP camera and falls apart on a 20MP one: the pixel got smaller, the Nyquist frequency went up, and the lens never had the MTF to begin with. See Understanding MTF, resolution and distortion for how to read an MTF curve.

Distortion: is a straight line still straight?

Distortion does not blur the image — it moves the pixel. For measurement, that is worse, because the error grows with distance from the centre. TV distortion below 0.1% is measurement grade; 1–2% is fine for presence/absence and visually invisible in most inspection images. If you cannot calibrate it out, choose a lens with lower distortion rather than a smaller FOV.

Telecentricity: do you need it?

A conventional (entocentric) lens sees the part at an angle, so a feature on a raised surface appears displaced — and the displacement changes as the part height varies. Telecentric lenses eliminate that, at the cost of a large front element and a fixed, narrow working distance.

  • Need telecentric: dimensional gauging where part height varies, hole/position measurement, pin and connector metrology.
  • Do not need it: presence/absence, OCR and barcode, surface defect detection with stable part height.

For a deeper treatment of where accuracy is lost, see Where lens choice limits measurement accuracy.

7. Step 6 — Aperture, light and depth of field

The aperture ring is the only free adjustment you get after delivery, and it trades three things against each other.

Open the aperture (small F-number)Close it down (large F-number)
More light, shorter exposureLess light, longer exposure or more gain
Shallower depth of fieldDeeper depth of field
Softer corners, more vignettingSharper corners, flatter field
Less diffraction blurDiffraction blur grows past the sweet spot
Diffraction spot ≈ 1.22 × λ × F  (at 500 nm: ≈ 0.6 × F µm)

At F8 that is roughly 5 µm, at F16 roughly 10 µm. So on 3.45 µm pixels, stopping past F11 starts to cost resolution; on 14 µm pixels you can close down freely. Most machine vision lenses are sharpest around F4–F5.6 — that is the setting to characterise the system at.

Depth of field, as a rough estimate for an object-space limited system:

DOF ≈ 2 × F × c × (1 + m) ÷ m²

with c the acceptable blur circle, usually 2 pixels. At 0.35X, F8 and 3.45 µm pixels this gives about 1.2 mm — enough for a battery cap sitting on a conveyor, not enough for a tall connector housing at an angle.

8. Cheat sheet by application

Starting points from the jobs we quote most often. Treat the middle column as the typical range, not a rule.

ApplicationTypical magnificationStarting familyWatch out for
3C electronics / PCB0.3X–1XMC macro, 1.1″Depth of field at high magnification; ring light clearance
Semiconductor / wafer0.5X–2XTelecentric or MCTelecentricity if height varies; diffraction if stopped down
Lithium battery caps0.2X–0.5XFA / MC, 1.1″Specular highlights on the can; distortion on seal width
Print & packaging web0.1X–0.35XLS line scan, 8KFlat field across the full web width; chromatic shift
Logistics / code reading0.05X–0.2XFA wide, large FOVLight fall-off at wide FOV; motion blur instead of lens quality
Bore / cap wall inspectionn/aRB 360° seriesBore diameter range and depth of field, not magnification
Large-format 100MP0.1X–0.5XLD full frameImage circle φ43 mm; corner MTF is the real spec

Full application notes live on the applications page, and the lens selector filters our catalog by sensor, FOV and working distance in the browser.

9. Three worked examples

Example 1 — Battery cap inspection (area scan, macro)

Task: inspect 40 mm-wide caps with a 20MP 1.1″ camera at about 150 mm working distance.

  • 1.1″ sensor → image circle ≥ φ17.6 mm → 1.1″ 20MP FA or MC family.
  • m = 14.1 / 40 ≈ 0.35X → macro territory.
  • MC3510A: 0.35–0.7X, 59 mm minimum WD, distortion under 0.05%. WD at 0.35X sits inside a 150 mm fixture.
  • Mount C, filter thread M40.5×P0.5 for the ring light bracket.

Example 2 — 8K line scan on a printed web

Task: inspect a 229 mm-wide web with an 8K7µm camera.

  • Sensor line = 8192 × 0.007 = 57.3 mm → image circle ≥ φ62 mm → LS-W family.
  • m = 57.3 / 229 = 0.25X → within the 0.2–0.5X LS-W band.
  • Object pixel = 7 µm / 0.25 = 28 µm; a 0.1 mm register error is 3.5 pixels — acceptable for register control, tight for print quality.
  • Mount M42 or M58 depending on the camera; confirm flange back and barrel diameter against the web fixture before ordering.

Example 3 — 16K large format

Task: 1.2 m-wide film inspection with a 16K5µm camera.

  • Sensor line = 16384 × 0.005 = 81.9 mm → image circle ≥ φ82–φ90 mm → LS-XL.
  • m = 81.9 / 1200 = 0.068X → the wide end of the LS-XL range.
  • Object pixel = 5 / 0.068 = 74 µm → at this resolution lighting uniformity and web flutter matter far more than lens MTF.

10. Six mistakes that cause most lens returns

  1. Comparing megapixels instead of image circle. "20MP lens" is shorthand for a format and a pixel pitch, not a guarantee. Check the circle against the sensor diagonal.
  2. Using the sensor diagonal in the magnification formula. It is the active width that maps to field of view.
  3. Specifying magnification without working distance. The same 0.25X exists at 150 mm and at 800 mm; the machine only fits one of them.
  4. Forgetting the light. A ring light 20–40 mm in front of the barrel changes the working envelope and often the image.
  5. Assuming a C-mount lens fits any "C-mount" camera. Flange back matches, but barrel diameter and filter thread may still collide with the fixture.
  6. Buying the cheapest lens that fits, for a measuring job. On a detection job the difference is invisible; on a 0.02 mm tolerance it is the whole error budget.

11. Decoding lens model numbers

Line scan: LS series

LS2540A-0.24X → LS = line scan · 25 = 25 mm focal length · 40 = F4.0 maximum aperture · 0.24X = centre magnification. The letter suffix marks the mechanical revision.

Fixed focal and macro: FA / MC series

FA1220A → 12 mm focal length, F2.0, A revision. MC5010A → 1.1″ macro, 50 mm, F1.0 class. A trailing "D" marks a large-aperture or revised version.

Full frame: LD series

LD5028-100MP → 50 mm, F2.8, 100-megapixel class at 3.1 µm pixels.

Every model page in the catalog lists focal length, aperture range, image circle, distortion, minimum working distance, filter thread and mount — the six numbers this guide asks you to check.

12. FAQ

What is the difference between focal length and magnification?
Focal length is a property of the lens; magnification is the result of how you mount it. The same 50 mm lens gives 1X at 100 mm working distance and roughly 0.1X at 550 mm. That is why catalogs group lenses by magnification range and working distance rather than by focal length alone.
Can I use a 2/3-inch lens on a 1-inch sensor?
No. A 2/3″ lens has an image circle of about φ11 mm while a 1″ sensor needs φ16 mm, so the corners fall outside the image and come out dark and soft. Always compare the image circle with the sensor diagonal.
How do I calculate the field of view from a lens and camera?
Field of view = sensor active width ÷ magnification. For a line scan camera the sensor width is horizontal pixels × pixel size, for example 8192 × 7 µm = 57.3 mm. Use the active width, not the diagonal.
Do I need a telecentric lens?
Only when accuracy depends on part height. If the part sits at a varying height, or you must measure a feature on a raised surface, a conventional lens introduces perspective error that changes with height. For presence/absence, OCR, barcode and surface defect detection, a standard FA or macro lens is sufficient and far cheaper.
Why is my image sharp in the centre and soft at the corners?
Three usual causes, in order of likelihood: the lens image circle is smaller than the sensor diagonal; the aperture is wide open and the lens is not corrected to the corners at full aperture; or the lens does not resolve your pixel pitch, so corner MTF is already below the sensor's Nyquist frequency.
What working distance should I choose?
As long as the machine allows. A longer working distance leaves room for lighting and reduces perspective error, but collects less light and usually needs a longer focal length. Keep at least 20–40 mm of clearance in front of the barrel for a ring light, and stay above the lens minimum working distance.
Can the mount be changed on a standard lens?
Yes. We can change the mount at the factory between C, CS, F, M42, M58 and M72, and we supply adaptor rings. Tell us the camera model and the fixture clearance and we will confirm which combination keeps the flange back correct.
Do you offer NIR versions for 850 nm or 940 nm?
Our standard catalog lenses are visible-band coated. NIR at 850 nm and 940 nm is a custom development: a new coating and often a revised optical design, from 0 to 1, about 6 weeks, minimum order 1 piece. Send the wavelength, sensor and working distance and we will quote it.
What is the minimum order quantity and lead time?
One piece, for both standard and custom lenses. Stock items ship in about 3 working days; non-stock standard items take around 3 weeks; a fully custom design is about 6 weeks. Samples are sold, not loaned, and are non-returnable. Warranty is 12 months against non-accidental failure, with free replacement.

Still unsure?

Send your camera model, field of view and working distance — our engineers return a complete selection proposal, including a sanity check on resolution and lighting, within one business day. Start here →

Lenses referenced in this guide

FA1205DFA fixed focal seriesView specifications → FA1620AFA fixed focal seriesView specifications → LD3528-100MPFA fixed focal seriesView specifications → LS1602A4K/8K/16K line scan seriesView specifications → LS4016K-0.08X4K/8K/16K line scan seriesView specifications → WBHX3602305A360° wall inspection seriesView specifications →