Most machine vision lens failures are specification failures, not glass failures. A 5-megapixel camera with the wrong focal length still delivers a blurry, cropped, or vignetting image. This guide turns five inputs — sensor format, working distance, field of view, resolution target, and environment — into a focal-length choice and a family match you can send in an RFQ.
Lensmind machines and tests FA C-mount lenses, M12 board lenses, telecentrics, line-scan optics, and liquid lenses in one factory. The method below is the same checklist our applications engineers use before they open a catalog.
The five inputs that decide the lens
Skip the catalog until these five numbers are written down. If any one is missing, the RFQ will bounce.

| Input | What to write | Why it matters |
|---|---|---|
| Sensor format | 1/3″, 1/2.5″, 1/1.8″, 2/3″, 1″, 1.1″ or the diagonal in mm | Sets image circle. A 2/3″ lens on a 1″ sensor vignettes. |
| Working distance | Object to front of lens, in mm | Drives focal length together with field of view. |
| Field of view | Width x height of the object you must cover, in mm | Too tight and you clip the part. Too wide and you waste pixels. |
| Resolution target | Smallest feature in mm, or lp/mm on the sensor | Tells you whether a standard FA lens is enough or you need telecentric / higher MTF. |
| Environment | Vibration, washdown, temperature, working distance change | Chooses lock-focus M12, liquid autofocus, IP-rated barrels, or athermal designs. |
Write the sensor as a format, not only a megapixel count. “5 MP” does not tell the lens which image circle to cover. A 1/1.8″ 5 MP sensor and a 2/3″ 5 MP sensor need different glass.
Turn those inputs into a focal length
For a thin-lens first pass:
focal length f ≈ (sensor width × working distance) / (field width + sensor width)
Use the sensor’s active width, not the marketing diagonal. Working distance is object-to-lens, not object-to-camera-back. The formula ignores principal-plane offset, so treat the result as a starting focal length, then pick the nearest catalog value and confirm on a drawing.
A few practical rules after you have f:
- If the object is a discrete part sitting still, start with a C-mount FA lens.
- If the camera is a board module in a tight housing, start with an M12.
- If you are measuring size, not just detecting presence, look at telecentric before you buy a higher-megapixel sensor.
- If the object moves along a web or a cylinder, look at line scan before you tile area-scan cameras.
- If working distance changes from part to part, a liquid lens is often cheaper than a mechanical focus stage.
Worked example: 2/3″ sensor at 200 mm
Assume a 2/3″ sensor (8.8 mm × 6.6 mm active), a 200 mm working distance, and a 40 mm-wide object. You need the full 40 mm in the frame with a little margin, so use 44 mm as the field width.
f ≈ (8.8 × 200) / (44 + 8.8) ≈ 33.3 mm. The nearest catalog focal lengths are 25 mm and 35 mm. 25 mm gives a wider field and more margin for part placement. 35 mm fills more of the sensor and raises spatial sampling on the object. If the smallest feature is 0.1 mm and you are on a 5 MP 2/3″ chip, 35 mm is the better first sample; if the part location varies by a few millimeters, 25 mm is safer.
That is the entire “sensor to focal length” step. Everything after this is family selection, not more math.
Pick a family after the math
Once focal length and image circle are known, match the mount and the job:
- FA machine vision lenses — C-mount, discrete-part inspection, the default when the camera is a standard industrial body.
- M12 / S-mount lenses — embedded cameras, vibration, lock-focus (FT/HT) under a set screw.
- Telecentric lenses — metrology, constant magnification, chief rays parallel to the axis. Use them when object distance or object height would otherwise change the measured size.
- Line-scan lenses — 4K / 8K / 16K lines. Image circle must cover the full line length; a 2/3″ FA lens will not.
- Liquid lenses — electrowetting focus in tens of milliseconds, useful on mixed-height parts and Z-stacks.
- Endoscope objectives — sub-2 mm distal optics paired to a named sensor, not a generic “medical camera.”
Do not invent a custom design until a catalog family fails the image-circle, distortion, or working-distance constraint. Custom optics is the right path when the mechanical envelope, wavelength, or distortion spec is outside the standard matrix — not when the RFQ is simply missing a working distance.
When a cheaper lens is the right lens
Engineers over-specify telecentric and high-megapixel combinations because both sound like “more accuracy.” Telecentric is the right spend when magnification must stay constant with object depth. It is the wrong spend for presence/absence on a flat belt at a fixed distance — a locked-focus M12 or a standard FA lens will do that job.
The same honesty applies to resolution. If the smallest feature already covers 4–5 pixels on a 2 MP sensor, buying 12 MP does not fix lighting, depth of field, or a dirty window. Fix those first.
What to send in an RFQ
A usable quote request is one page:
- Sensor model or format + resolution + pixel size.
- Working distance and the mechanical envelope around the lens.
- Object size (FOV) and the smallest feature you must resolve.
- Wavelength or illuminator type (white, 850 nm, 940 nm, laser line).
- Environment: vibration, washdown, temperature range, expected lifetime in cycles.
- Target annual quantity and whether you need a drawing, a sample, or both.
Send that to contact us. If you already have a competitor model number, include it — we can often match the optical prescription without copying a trademark. Lensmind runs an ISO 9001 quality system; we do not claim CE, RoHS, or REACH on this site unless a specific lot has been tested and documented for that order.
FAQs on machine vision lens selection
Can I use an M12 lens on a C-mount camera?
Only with an adapter, and only if the image circle covers the sensor. Most M12 designs are built for 1/2.5″ to 1/1.8″ sensors. On 2/3″ they vignette. If the camera is already C-mount, start with the FA family.
How do I know I need a telecentric lens?
If a 1 mm change in object height changes the measured size by more than your tolerance, you need telecentric (or a very tightly fixtured working distance). Visual inspection of logos, codes, and presence does not.
What is the fastest way to get a sample?
Send the five inputs above plus a target quantity. For catalog FA and M12 models we sample from stock or a short production slot. Custom prescriptions follow the five-step OEM path on the custom optics page.
Do you publish MTF drawings for every SKU?
We publish measured data for models we have tested. We do not invent MTF plots. If a datasheet is not on the product page, ask — the lab can run the chart on the sample you care about.