Knowledge · Optics

Selecting a machine vision lens: field of view, working distance and sensor

The wrong lens blurs small features, crops product variation or leaves too little room for lighting and tooling. This guide connects field of view, working distance, magnification, sensor format and distortion to the inspection task.

Calculate the required field of view and smallest relevant feature first. Then verify sensor coverage, sharpness, distortion and depth of field with representative samples.

Computer Vision lenses for industrial cameras
Industrial lenses map object size and working distance onto the camera sensor, camera choice without lens choice is incomplete.

What an industrial imaging lens does

A Computer Vision lens forms an image of the product on a camera sensor. Its magnification determines the field of view; its focus and optical performance determine which details remain distinguishable. Check the lens for the intended distance, sensor and environmental conditions.

Select the lens together with the sensor in your camera. Check the active sensor dimensions, pixel size and required image area. Confirm that the lens covers the sensor and resolves the relevant detail at the chosen aperture.

Available product families are listed under lenses hub. Use this guide to establish the optical requirements, then verify them against the exact lens datasheet and a sample image.

In one sentence

A lens maps the required product area onto the sensor. Validate sharpness and contrast at the field edges and across the allowed product heights.

Field of view and working distance

Two numbers dominate almost every lens conversation: field of view (FOV) and working distance (WD).

Optics and Computer Vision imaging setup
FOV and working distance are set by focal length, sensor size and mechanical layout of the station.

Field of view

The field of view is the width and height visible in the image. Include product dimensions, position variation and any rotation. Increasing the field while retaining the same pixel count reduces the pixels available across a small feature.

Working distance

Working distance is measured from a reference on the lens to the object plane. Check which reference the manufacturer uses. Leave space for the light, filters, tooling and cleaning access; working distance and total installation height are different dimensions.

How they relate

Use magnification m = active sensor width ÷ required object width. In a thin-lens estimate, f = u × m ÷ (1 + m), where u is object distance from the principal plane. A working distance from the lens housing uses a different reference. Use the manufacturer’s geometry or calculator for final selection.

After establishing the field and available distance, check the lens and sensor together. For full-frame 2D imaging, see area scan for the camera-side requirements.

Magnification and spatial sampling

Magnification(m) is image size on the sensor divided by object size. At m = 0.1, a 10 mm object spans 1 mm on the sensor. At m = 1, object and image have the same size. These ratios do not specify measurement uncertainty.

In practice you usually care less about “m” as a number and more about µm per pixel: divide field width by the active horizontal pixel count. This is the sampling interval. The lens must also retain enough contrast at the relevant detail size; verify that with representative parts.

Example: an 80 mm field width on 2448 active pixels gives about 32.7 µm per pixel. A 0.2 mm feature spans about six pixels. At 160 mm field width it spans about three pixels. These are sampling calculations; whether the feature is detectable depends on optical contrast, focus, movement and the inspection method.

Rule of thumb

Establish feature size and a provisional pixel requirement. Calculate the sampling interval, then test whether the selected lens and lighting make the feature distinguishable.

C-mount, sensor format and image circle

C-mount uses a 1 inch, 32 threads-per-inch connection with a nominal 17.526 mm flange focal distance. CS-mount uses the same thread but a 12.526 mm flange distance. A 5 mm spacer can allow a C-mount lens on a compatible CS-mount camera; the reverse arrangement is not solved by adding that spacer. Check the camera and lens drawings.

Sensor formatlabels such as 1/1.8 inch, 2/3 inch or 1 inch are historical optical-format classes. They are not the measured sensor diagonal in inches. Obtain the actual active width and height in millimetres and calculate diagonal = √(width² + height²). Compare that diagonal with the lens’s usable image circle. For an illustrative 8.8 × 6.6 mm sensor, the diagonal is 11 mm. Coverage alone is insufficient: check corner sharpness and illumination at the intended distance and aperture.

Industrial camera and optics in a vision setup
Match mount, flange distance and image circle to the camera sensor, treat camera and lens as one optical design.

After a camera replacement, recheck active sensor dimensions and pixel size even if the mount still fits. Compare the lens specifications in lenses product hub alongside the camera datasheet.

Distortion, telecentricity and measurement

Distortion changes the mapping between object position and image position. Straight lines may appear curved. Whether the distortion is acceptable depends on the task and image location. For measurements, validate a calibrated model against independent reference positions throughout the field.

Entocentriclenses show perspective: the same object appears smaller when it is farther from the camera along the viewing direction. Changing object height can therefore change image scale. Telecentric lenses designed to be telecentric on the object side reduce scale changes caused by object-distance variation within their specified range. This does not remove focus limits or all measurement errors. Verify the manufacturer’s telecentricity, distortion and working-range specifications.

Compare optical options against a stated tolerance and permitted height range. A presence check may work with a standard fixed-focus lens. A dimensional measurement may require tighter control of perspective, calibration and mounting. Confirm this in the test, rather than selecting by lens category alone.

Optical resolution, aperture and depth of field

A lens must preserve contrast at the detail size sampled by the sensor. The modulation transfer function (MTF) describes how much contrast remains at different spatial frequencies. Compare the manufacturer’s curves at the relevant aperture and image position, then test actual parts. A megapixel label alone does not specify this behaviour.

Aperture (f-number) controls admitted light and affects depth of field. Closing the aperture can increase the usable depth range but requires more light or exposure time, and eventually reduces fine detail through diffraction. Movement limits exposure under both continuous and pulsed lighting. Select the aperture and light together using the lighting hub.

Depth of field must cover part height variation and presentation tolerance. Tall objects or floating parts on a belt may need smaller apertures, telecentric designs, or multiple views, not only “more megapixels.”

Common industrial lens types

TypeBest whenWatch-outs
Fixed focal lengthStable WD and FOV on discrete stationsMust match format & resolution class
Varifocal / zoomCommissioning flexibility; multi-SKU FOVLock after setup; check resolution at setting
TelecentricPrecision 2D gauging, constant magnificationCost, size, WD constraints
Macro / high-magSmall features, electronics, DPM detailShallow DOF; lighting harder
360° / optics accessoriesSidewalls of bottles, threads, cavitiesSpecialist setup; validate FOV maps

Motorized or liquid-lens focus can be useful when the working distance changes. Confirm the focusing time, repeatability and supported control interface. For a fixed distance, a manual lens with the manufacturer’s focus lock may suffice.

Worked example: choosing FOV and focal length

Industrial production cell where lens FOV must fit
Mechanical clearance, light housings and part placement tolerance constrain WD and FOV as much as the datasheet.

Illustrative inputs: a cover is 70 mm wide and its position varies by ±10 mm, requiring at least a 90 mm horizontal field before any additional margin. A 0.3 mm burr with a provisional requirement of five pixels gives 0.3 ÷ 5 = 0.06 mm/pixel. The required horizontal count is therefore 90 ÷ 0.06 = 1,500 pixels. Check the vertical field separately. Total megapixels do not replace these two-axis checks.

Suppose the active sensor width is 7 mm and the required object width is 90 mm. Magnification is then 7 / 90 ≈ 0.078. In a thin-lens model, an object distance of 300 mm measured from the principal plane gives f = m × u / (1 + m) ≈ 21.6 mm. A working distance measured from the lens front is a different reference. Use the exact lens drawing and manufacturer calculation to check the available installation space and field of view.

These are sizing calculations, not evidence of burr detection. Test the required detail at the field edges and height limits under the selected lighting. Use the feasibility trial to establish whether the assumed pixel count and contrast are sufficient.

Specs that matter on a lens datasheet

  • Focal length, primary control of FOV at a given WD and sensor size.
  • Supported sensor format / image circle, must cover your chip diagonal.
  • Mount, C/CS or other; adapters change flange distance.
  • Resolution class, matched to megapixel and pixel size of the camera.
  • Aperture range, light vs DOF; lockable iris preferred in factories.
  • Distortion, stated %; critical for gauging.
  • Minimum object distance / WD range, whether focus reaches your plane.
  • Filter thread, for polarizers, bandpass filters, protection windows.

Before you buy, eight questions

  1. What FOV width/height covers the part plus tolerance?
  2. What working distance does the machine allow?
  3. What is the smallest feature and required pixels across it?
  4. Which camera sensor format and mount do you use?
  5. Do you measure (low distortion / telecentric) or only detect?
  6. How much height variation must depth of field cover?
  7. Will filters or protective windows sit in front of the lens?
  8. Who locks focus and iris after commissioning?

Filters, windows and mechanical accessories

Filters and protection windows affect the image as well as the mechanical design. Crossed polarizers can reduce certain reflections, particularly from dielectric surfaces such as plastics, but effectiveness depends on material and angle. Test the actual surface rather than assuming the same result on bare metal. Spectral filters can suppress unwanted wavelengths; assess them with the chosen light and camera. Commission with all windows and filters installed.

Extension rings change the lens-to-sensor distance and can alter the focus range and usable image quality. Verify any adapter at the actual magnification and sensor size. Recheck field width, corner sharpness and distortion after installation.

Use the focus and aperture locks specified by the lens manufacturer. Record filter type and polarizer orientation. Apply thread-locking products only where the manufacturer permits them; retain a documented maintenance and replacement procedure.

How industries use industrial lenses

Packaging and FMCG

When a label, date code and seal share one image, size the optics for the smallest required detail while retaining the full inspection area. Test every pack format and the allowed surface reflections.

Automotive and metal

For a robot-presented component, include the actual height and angular variation in the optical trial. Distinguish the need to detect a marking from the need to measure an edge. Validate mounting stability under the expected vibration.

Electronics

Small electronic features may require higher magnification, leaving less room for tooling and lighting. Check the complete mechanical arrangement before selecting the lens. Match the optics to the active sensor dimensions under Cameras.

Pharma secondary packaging

Keep a reference image and the settings needed to reproduce it. After cleaning or replacement, compare the restored field, focus and contrast with the accepted configuration before releasing inspection.

Cost, quality and what “good enough” means

Compare the optical options against the inspection requirement. A more expensive lens is justified when it meets a necessary field, contrast, stability or measurement requirement that the alternative does not meet. Confirm that difference with the same sample set.

Include lens, adapter, filters, lighting changes and mounting in the investment. Add hours for optical trials, calibration and validation at the applicable rates. For recurring cost, consider cleaning, replacement and time needed to restore settings. Use measured reject and intervention data to assess any benefit.

Agree acceptance criteria using known good products, defects and borderline cases under the proposed lighting. Test the full field of view and permitted height range, including contamination expected between cleaning intervals. For measurements, compare against reference parts and quantify bias and repeatability. For detection, record missed defects and false rejects separately. Further optical selection guidance is available under Knowledge. Resolve uncertain samples in a feasibilitytrial before finalising the optical parts list.

Integrating optics into the machine

Support the camera and lens without allowing cable loads to move the optical axis. Keep access for cleaning and adjustment. Record working distance, focal length, aperture, filters and fastening method with the machine documentation.

Verify exposure and any light pulse against the maximum permitted blur. A pulsed light only limits effective exposure when it dominates the image during the pulse; ambient illumination can still create blur. For the processing architecture, use smart vs PC vision to establish the controller and camera requirements.

For a complete 2D image, consider area scan. A dedicated code reader is another option when the task is limited to identification. Check its integrated optics against the same field and detail requirements.

Common first-system mistakes

  • Buying megapixels first, then discovering the kit lens cannot resolve them.
  • Ignoring image circle when swapping to a larger sensor.
  • Setting FOV to the part only, no margin for placement error.
  • Leaving focus and iris unlocked on a vibrating machine.
  • Expecting software to fix perspective and distortion on a metrology job.
  • Forgetting that lighting geometry and lens aperture share one photon budget.

Architecture still matters: a smart camera with integrated optics differs from a C-mount area scan plus separate lens. See smart vs PC-based vision when that choice is open.

Short glossary

FOVField of view, world width/height imaged onto the sensor.
WDWorking distance, lens-to-object distance (definition varies by vendor).
Image circleDiameter of usable image projected by the lens.
C-mountCommon industrial lens mount and flange standard.
TelecentricOptics with near-constant magnification and reduced perspective error.
MTFModulation transfer function, how well the lens transfers contrast at a spatial frequency.
f-numberRelative aperture, light gathering vs depth of field and diffraction.

FAQ: Computer Vision lenses

Can I use a CCTV or photography lens?

Sometimes in a lab, rarely on a production cell. Industrial lenses offer lockable mechanics, documented formats, and resolution classes matched to Computer Vision sensors.

Do I always need a telecentric lens?

No. Use telecentric when magnification constancy and low perspective error are part of the measurement. For presence, codes and many cosmetics, fixed entocentric lenses are enough.

Why are the corners dark?

Often the lens image circle is too small for the sensor, or the aperture/filter stack vignettes. Confirm format compatibility first.

How do lenses relate to code readers?

Dedicated readers often integrate optics. PC-based ID uses the same FOV/WD rules as inspection. Module size drives µm/pixel the same way a defect size does.

Where do I browse products?

Start at the lenses hub, then match to your camera under Cameras.

Next steps

You now have the optics model: FOV and WD set focal length with the sensor; image circle and mount must match; distortion and telecentricity matter when you measure; resolution class must keep up with the camera, and lighting finishes the optical path.

Related: Knowledge, area scan, feasibility.

Related measurement methods

When the task also needs depth information

A 2D lens forms an image; recovering an unknown surface height requires a suitable measurement method. Compare stereo, structured light and RGB-D when the required decision depends on the object’s three-dimensional shape or position.

Comparing 3D sensing