Lenses & opticsGuide

Lens extension tubes for close-up machine vision

Use lens extension tubes to reach closer focus, estimate magnification and light loss, and validate image quality before adapting an inspection lens.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01What lens extension tubes actually change
  2. 02Estimate magnification and field of view
  3. 03Work through an illustrative close-up example
  4. 04Account for effective aperture and exposure
  5. 05Compare extension with the alternatives
  6. 06Validate image quality at the actual inspection plane
  7. 07Check mechanical compatibility and stability
  8. 08Know when the usual extension answer is wrong
  9. 09Complete the selection checklist before ordering
  10. 10Questions

A lens that cannot focus close enough can sometimes be adapted with an extension tube between the lens and camera. The useful question is not simply whether the image becomes sharp: it is whether the adapted assembly meets your field of view, exposure, measurement and stability requirements. This guide explains the estimates behind that decision, then gives a practical acceptance test. Treat extension as a candidate configuration to validate, not an automatic substitute for a lens intended for your operating distance.

What lens extension tubes actually change

An extension tube adds mechanical spacing between the lens and sensor without adding optical elements. At an unchanged focus setting, this moves the focused object plane closer and increases magnification. The smaller field of view is often useful for inspecting small components, printed features or surface defects.

Extension does not change the lens's nominal focal length. It changes the image-side spacing required for the new object distance. It also normally removes the ability to focus at infinity while the tube remains installed.

Keep these quantities separate:

  • Focal length: an optical property of the lens at a specified configuration.
  • Added extension: the extra mechanical spacing introduced behind the lens.
  • Working distance: clearance between the lens's specified front reference and the object.
  • Magnification: image size on the sensor divided by the corresponding object size.

The distinction matters when interpreting drawings or ordering an adapter. Our explanation of focal length versus back focus separates the optical and mechanical terms.

The LS-LXR-0255 is listed as a C-mount extension tube with a length of 15 mm. Confirm the mating interfaces and clearances before selecting it for an assembly.

Lens accessoriesC-mount extension tubes, 15 mm (LS-LXR-0255)LS-LXR-0255
Type
Extension tubes
$79.00View partBuild a system with it

Estimate magnification and field of view

Start with the required object coverage and the camera's actual active sensor dimensions. A sensor's format designation is not its physical width, so obtain the width from its documentation.

For a thin lens initially focused at infinity, the following estimates apply:

1/f = 1/u + 1/v v = f + e m = v/u = e/f Object field width = active sensor width / m u = f × (1 + 1/m)

Here, f is focal length, e is added extension, m is magnification, and u and v are distances measured from the appropriate principal planes. Use the same length unit throughout.

If the lens already has finite-distance focus extension, a first approximation is m_new ≈ m_original + e/f. This assumes focusing does not substantially change focal length or the internal optical configuration. Internal-focusing lenses can depart from that estimate.

For initial lens screening, the lens finder and focal-length selection guide help establish the unmodified framing requirement.

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 calculator is useful for baseline framing; it is not an extension-tube performance model. Validate the adapted assembly directly, especially near the lens's close-focus limit.

The LS-FFL-0679 is listed as a 35 mm, 2/3", 6 MP, C-mount machine vision lens. Its listing identifies a lens candidate, not a validated extension-tube combination.

Machine vision lenses35 mm, 2/3", 6 MP, C-mount machine vision lens (LS-FFL-0679)LS-FFL-0679
Type
Machine vision fixed
Sensor format
2/3"
Mount
C-mount
Resolution
6-10 MP
$219.00View partBuild a system with it

Work through an illustrative close-up example

Consider a hypothetical thin lens with a focal length of 35 mm, initially focused at infinity. Assume an active sensor width of 8.8 mm and an added extension of 15 mm. These are example inputs, not a prediction for a named product.

The estimated magnification is:

m = e/f m = 15/35 = 0.429, approximately 0.43x Object field width = 8.8/0.429 Object field width ≈ 20.5 mm u = 35 × (1 + 1/0.429) u ≈ 117 mm

The estimated object distance is measured from the lens's front principal plane, not its front housing. You cannot use that result directly as mounting clearance. The principal plane may lie inside or outside the physical lens assembly.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

Now suppose the inspection requires an 18 mm-wide region. The estimated horizontal coverage margin is 20.5 − 18 = 2.5 mm, leaving approximately 1.25 mm per side when centered. Position variation, distortion correction and fixture tolerances must all fit inside that allowance.

A centered sample therefore proves very little by itself. Move the sample to its permitted extremes and verify that every required feature remains visible. The guide to field-of-view and calibration-target coverage margins explains why nominal coverage and usable coverage differ.

If the assembly cannot physically reach the estimated object plane, stop there. A favorable magnification calculation does not overcome insufficient mechanical clearance.

Account for effective aperture and exposure

As magnification rises, the effective f-number generally increases. For an approximately symmetric lens, a useful first estimate is:

Effective f-number ≈ marked f-number × (1 + m) Exposure multiplier relative to infinity ≈ (1 + m)²

These estimates assume unchanged lighting and transmission, with approximately equal entrance and exit pupil diameters. Lenses with different pupil magnifications need a more specific calculation. Compare against the original finite-distance magnification rather than infinity if that was your starting configuration.

At the example magnification, a marked setting of f/4 gives:

Effective f-number ≈ 4 × (1 + 0.429) ≈ 5.7 Exposure multiplier ≈ 1.429² ≈ 2.04

An exposure of 100 microseconds would therefore need approximately 204 microseconds under those assumptions. This is an estimate to test, not a camera setting to copy automatically.

For a moving object, calculate the consequence before accepting the longer exposure:

Object-space motion blur = object speed × exposure time Blur = 100 mm/s × 0.000204 s Blur = 0.0204 mm, approximately 20 micrometers

If allowable blur is 10 micrometers at that speed, the exposure limit is 0.010/100 = 0.0001 s, or 100 microseconds. Increase useful illumination rather than accepting the longer exposure. Additional gain changes signal amplification; it does not collect more photons.

Stopping down can improve some aberrations, but it also increases diffraction and exposure demand. Choose the aperture by the smallest required feature across the whole image, not by center sharpness alone.

Compare extension with the alternatives

Extension is most attractive when a modest adaptation meets the inspection requirement without forcing difficult compromises elsewhere. It is less attractive when the resulting short clearance, light loss or edge performance becomes the dominant design problem.

Approach What it changes When to consider it What still needs validation
Existing lens without extension Retains the available focus range and mechanical arrangement Required coverage fits within the documented operating range Smallest feature visibility and coverage margin
Lens with extension tube Increases image-side spacing and close-up magnification A fixed, close inspection plane is practical Edge quality, exposure, clearance and repeatability
Lens selected for the required magnification and distance Changes the optical selection rather than adapting spacing alone The application needs a defined operating geometry Performance at the actual aperture, wavelength and sensor size
Telecentric imaging Reduces perspective-related magnification changes within its specified operating range Part-height variation makes dimensional measurements unstable Measurement uncertainty and usable depth range

The machine vision lenses category provides alternatives when the extension trial misses its acceptance limits. Compare lenses against the required object field and clearance, rather than matching focal length alone.

The LS-FFL-0914 is listed at 0.3x magnification and WD 168 mm. It provides a candidate with a stated operating geometry; the listing alone does not establish suitability for your inspection.

Machine vision lenses2/3", C-mount machine vision lens, 0.3x, WD 168 mm, length 127.9 mm (LS-FFL-0914)LS-FFL-0914
Type
Machine vision fixed
Sensor format
2/3"
Mount
C-mount
Image circle
8-11 mm
$189.00View partBuild a system with it

A lens intended for your close operating distance may avoid some adaptation compromises. However, neither an extension tube nor a different lens guarantees measurement accuracy without application-level testing.

Validate image quality at the actual inspection plane

Build the trial around the feature that determines acceptance. A sharp-looking photograph is not enough if the inspection depends on locating a low-contrast edge or separating two nearby marks.

Use a flat target and representative production samples at the intended object plane. Lock exposure, gain, aperture, lighting and image processing during comparisons. Save original images so that display scaling does not hide blur or exaggerate sharpening.

Run these checks:

  1. Check center and corners separately. Compare equal-sized features in the center and all four corners, rather than judging the image as one region.
  2. Move through the permitted height range. For an illustrative tolerance of ±0.5 mm, test the nominal plane and both limits. Use the actual application tolerance for acceptance.
  3. Check geometry across the field. Measure known separations at several positions. A center-only scale measurement cannot reveal field-dependent distortion.
  4. Test production motion. Repeat the feature inspection at operating speed and the intended exposure.
  5. Repeat after refocusing and remounting. Determine whether the assembly returns to an acceptable state after normal service actions.

The LS-LXR-0029 is listed as a dot-grid calibration target measuring 76 x 76 mm, with a dot diameter of 0.5 mm. Confirm the feature spacing and dimensional accuracy needed for your particular test.

Lens accessoriesCalibration boards and depth-of-field rulers, dot diameter 0.5 mm, dot grid, 76 x 76 mm (LS-LXR-0029)LS-LXR-0029
Type
Calibration targets
$189.00View partBuild a system with it

Dot diameter is not grid pitch. Do not substitute one for the other when entering calibration geometry. A target larger than the image can support local sharpness checks, but calibration needs the pattern coverage expected by the chosen method.

For dimensional inspection, follow the distinction between calibration and independent verification in length measurement from image markers. Verify with dimensions or samples not used to fit the calibration.

Check mechanical compatibility and stability

Matching a nominal mount name is only the first check. Confirm thread diameter, pitch, male and female interfaces, usable engagement and the camera's flange arrangement. Also check whether rear lens elements or retaining parts could contact the camera's internal structures.

The lens accessories category and accessory finder help narrow the mechanical options. Treat an extension tube and a mount-conversion adapter as different functions, even when both add axial length.

Check the following before a running trial:

  • The tube seats on its intended shoulder without an unexpected gap.
  • The assembled bore does not introduce unacceptable clipping or corner shading.
  • Focus and iris controls remain accessible and can be secured as intended.
  • The lens clears the part, fixture and lighting throughout the full allowed motion.
  • Added length does not leave the lens vulnerable to contact or excessive bending loads.

Where required, provide lens support using the documented mounting arrangement. Avoid forcing alignment through a rigid support that bends the camera-to-lens connection.

Mechanical tilt can make one side of the image focus differently from the other. If the best-focus plane appears tilted, inspect mounting faces and target alignment before attributing the problem entirely to optics.

Know when the usual extension answer is wrong

Extension tubes are not a correction for every close-up imaging problem. They can make framing look right while leaving the underlying inspection limitation unchanged.

Height-dependent measurements: an ordinary perspective lens still changes apparent scale when object distance changes. Calibrating one plane does not remove that behavior at other heights.

Insufficient feature contrast: more magnification does not automatically recover detail lost to unsuitable lighting, aberrations, diffraction or motion. Confirm that the required feature is resolved, not merely enlarged.

A wide depth range: larger magnification usually reduces the usable object-depth range for a fixed image-sharpness criterion. If height variation dominates, consider changing the geometry or inspection method rather than adding more extension.

A very short clearance: the closer object plane may prevent useful illumination or create a collision risk. Select a different optical arrangement if the required lighting cannot physically reach the inspection region.

Variable framing: extension is a fixed-spacing adaptation, not a convenient zoom control. If several part families need different fields, assess the adjustment and recalibration workload explicitly.

Unstable measurements after maintenance: calibration can describe a stable assembly, but it cannot compensate for connections that move unpredictably. Correct the mechanical problem before refining the calibration model.

Complete the selection checklist before ordering

Record the accepted configuration as an assembly, including focus setting, aperture, tube arrangement and camera sensor mode. Keeping only the nominal lens focal length is not enough to reproduce a close-up setup.

Use this final checklist:

  • Required coverage: include part-position variation and any processing crop, not just the nominal part outline.
  • Actual magnification: verify it from a known object dimension and the corresponding sensor image dimension.
  • Mechanical clearance: measure from the physical lens reference specified in its documentation.
  • Exposure budget: confirm acceptable brightness and motion blur at production speed.
  • Image quality: retain center, corner and height-limit images against defined pass criteria.
  • Measurement performance: check independent samples across the usable field.
  • Service repeatability: confirm acceptable behavior after the planned cleaning or replacement procedure.
  • Interface compatibility: verify threads, seating faces, internal clearance and support requirements.

Choose the shortest extension that meets the required coverage and passes these tests; unnecessary extension can add magnification, light loss and clearance constraints. If the adaptation fails, select a lens around the required magnification and working distance instead of adding further spacing by trial and error.

Start with the lens configurator for an optical alternative, or use accessory selection for a defined mechanical requirement. For an assembly review, send the required field, sensor dimensions, available clearance and test images through application support.

Questions

Do lens extension tubes change focal length?

No. An extension tube adds spacing between the lens and sensor rather than changing the lens's nominal focal length. At an unchanged focus setting, that spacing moves the focused object plane closer and increases magnification. Internal focusing can complicate predictions, so measure the assembled field of view.

How do you estimate the extension length needed?

For a thin lens initially focused at infinity, estimate extension as focal length multiplied by the required magnification. Find magnification by dividing active sensor width by required object-field width. Existing focus extension and internal lens movements can change the result, so use the calculation for screening rather than final mechanical design.

Does an extension tube always reduce image quality?

A tube contains no glass, but it changes the operating conditions of the lens. Aberrations, field curvature, effective aperture and corner illumination may become less favorable. An adapted assembly can still be suitable when it passes feature-level tests across the required field, height range and exposure budget.

Can the lens still focus at infinity with a tube installed?

Extension normally removes infinity focus while the tube is installed. The remaining focusing range depends on the lens and added spacing. If you need both distant and close inspection configurations, plan separate validated setups or select an optical arrangement designed for the required adjustment range.

When should you choose a different lens instead of extension tubes?

Choose a lens intended for the operating distance when an adapted lens cannot meet clearance, edge quality, exposure or repeatability requirements. Also reconsider extension when height variation drives measurement error. A stated magnification and working distance help selection, but application testing is still necessary.