Machine Vision Optics Guide

IR Corrected Lenses for Machine Vision: Focus Stability Across Visible and NIR Illumination

Why a standard lens defocuses under 850nm or 940nm illumination, what separates chromatic focus shift from thermal and filter-induced shift, and which Commonlands M12 lenses hold focus across both bands.

By Commonlands engineering team · Updated July 2026 · 17 min read

An IR corrected M12 lens in a black anodized barrel on a camera board

An IR corrected lens extends chromatic focus correction into the near-infrared band, typically 850nm and 940nm, so visible and NIR light share one focal plane. A standard lens is corrected for the visible band only, so it defocuses when illumination switches to NIR, a wavelength-dependent case of focus shift called longitudinal chromatic aberration.

Removing an IR-cut filter does not fix this: the filter controls what reaches the sensor, not where it focuses. RGBIR sensors and day/night cameras that switch between visible and NIR illumination need the correction built into the lens itself.

What is an IR corrected lens?

An IR corrected lens is a lens whose optical design extends chromatic focus correction beyond the visible band into the near-infrared, typically holding a common focal plane from roughly 400nm through 850nm or 940nm. A standard lens is corrected only across the visible band; a standard lens focused under visible light defocuses under NIR illumination because its designers never targeted that wavelength range for focus.

The distinction matters in four recurring machine-vision configurations:

  • RGBIR cameras capturing RGB and NIR data in a single frame
  • Day/night cameras switching between visible illumination in daylight and 850nm or 940nm LED illumination at night
  • Dual-mode inspection systems alternating white-light and NIR passes
  • Fixed-focus embedded modules where ambient NIR content varies by scene

The practical test is direct: focus the lens under visible light, switch to NIR illumination without touching focus, and capture an image. If it stays sharp, the lens is adequately IR corrected for that use. IR correction is not binary. It runs from a simple uncorrected singlet to a multi-element design using low-dispersion glass pairs, and reputable datasheets specify the wavelength range over which focus stability holds. For background on the aberration family this correction addresses, see lens aberrations in machine vision.

Day/night IR-cut switching

Day/night systems that physically swap an IR-cut filter for a bandpass filter also need the two filter states to have matched optical path length, or the switch itself introduces a separate focus shift. That filter-switcher engineering is covered in the bandpass filter machine vision guide; this page covers the lens-side chromatic correction.

How the optical design achieves IR correction

A single lens element cannot hold visible and NIR light at the same focal plane on its own, because every glass type has its own dispersion curve, the relationship between refractive index and wavelength. IR correction works by pairing element materials with complementary dispersion so that the combined system brings a wider wavelength range to a common focus than any single glass could achieve. This is the same design principle used in an achromatic doublet for visible correction (Hecht, Optics, 5th ed., §6.3.2), extended across a wider band that includes 850nm and 940nm.

Because dispersion curves are nonlinear and glass catalogs are finite, a designer typically has to accept a residual visible/NIR focus offset rather than eliminate it outright. A well-corrected IR lens holds that residual offset within the system's depth of focus at the intended aperture and sensor format; it does not necessarily bring visible and 940nm light to the exact same physical plane. This is why datasheets specify a wavelength range and why validating at the actual operating wavelength, aperture, and sensor matters more than trusting the "IR corrected" label alone (Smith, Modern Optical Engineering, 4th ed., ch. 12, on the design of optical systems, including achromatic and apochromatic design).

A camera module lit half in daylight and half in deep-red 850nm near-infrared
An IR corrected lens holds focus across visible and near-infrared light.

What is focus shift, and why does wavelength cause it?

Focus shift is the movement of the plane of best focus after an optical condition changes, even though no one touched the mechanical focus setting. A lens correctly focused under one wavelength, one temperature, or one filter state can defocus when that condition changes. Focus shift is distinct from back-focus error, which is a static lens-to-sensor misalignment set at assembly and corrected once during installation. Focus shift happens after a known-good focus state, driven by a condition the lens design cannot compensate for.

Three separate mechanisms produce focus shift, and each has its own fix. Wavelength change is the chromatic case this pillar covers in depth: glass refractive index varies with wavelength, so 850nm or 940nm NIR converges at a different axial distance than visible light, moving the focal plane by an amount that, in a non-IR-corrected lens, can be large relative to the sensor's depth of focus. Filter-stack change moves focus by inserting glass into the optical path: a filter or switcher shifts the focal plane away from the lens (the image forms ~0.34mm farther back for a 1mm, n=1.52 plate), by thickness times (1 − 1/n), roughly one-third of the glass thickness for n~1.5. Temperature change is a separate, non-wavelength mechanism: lens barrels expand and glass or plastic refractive index shifts with temperature (dn/dT), and that thermal drift belongs to lens material and mounting choices rather than optical correction. See thermal effects in machine vision lenses for the full mechanism and all-glass/athermalized mitigation.

Cause What moves Typical symptom Practical fix
Wavelength change (VIS → NIR) Chromatic focal plane separation Blur in one illumination mode; day/night performance gap IR-corrected lens
Filter or switcher inserted Optical path length increases Defocus when filter is in; varies between filter states Compensated filter switcher; back-focus re-set with filter in place
Temperature rise or fall Thermal focal plane drift Focus degrades at temperature extremes All-glass lens; athermalized design (see ruggedized guide)
Aperture change (stopping down) Depth-of-field envelope widens Appears sharper stopped down (masks the shift, does not fix it) Diagnose at production aperture

The longitudinal chromatic aberration behind wavelength-driven focus shift is different from lateral chromatic aberration, which spreads color fringing across the field rather than moving the axial focal plane. IR correction addresses the longitudinal component specifically by combining glass types with complementary dispersion so visible and NIR bands converge closer together. Filter-induced and thermal focus shift are corrected through different engineering choices (compensated switchers and all-glass or athermalized construction, respectively), not through IR correction itself.

The typical shift magnitude, and why it matters at high resolution

In a non-IR-corrected lens, the focal-plane separation between roughly 550nm visible light and 850nm NIR depends on the specific glass types and element count in the design. Whether that magnitude matters depends entirely on the sensor's depth of focus at the operating aperture. A 1/2.3" sensor at F/2 with 3μm pixels has a depth of focus on the order of 15 to 25μm; a 100μm chromatic shift takes that system completely out of focus in the secondary wavelength. A 12MP sensor with 1.55μm pixels has an even tighter depth-of-focus budget, which is why high-resolution RGBIR and day/night designs cannot rely on "close enough" chromatic correction. The shift has to be small relative to depth of focus at the actual pixel pitch in use, not just small in absolute terms.

Quantifying filter-induced focus shift

The filter-stack mechanism is worth isolating because it is easy to overlook during integration: any glass added to the optical path after the lens has been focused (a cover glass, a bandpass filter, a switcher) moves the focal plane by a predictable amount.

shift ≈ t × (1 − 1/n) t = glass thickness, n = glass refractive index. For t = 1mm and n = 1.52, shift ≈ 0.34mm away from the lens.

A 0.34mm shift exceeds a typical 15-25μm depth of focus by more than an order of magnitude. This is why a day/night filter switcher must hold matched optical path length between its IR-cut and bandpass glass states. If the two filter thicknesses (adjusted for their respective refractive indices) do not match, one filter state will always be defocused relative to the other, independent of whether the lens itself is IR corrected. The Commonlands CLA216-ICR-850BP compensates this directly: its glass thickness offset between the 650nm IR-cut side and the 850nm bandpass side compensates the optical path-length difference between the two filter states, so one focus setting stays valid across both.

How an IR corrected lens compares to a standard lens and a removed IR-cut filter

These three things are often conflated. A standard lens with an IR-cut filter produces a sharp visible image because the filter prevents the out-of-focus NIR light from ever reaching the sensor. The lens is not corrected; the problem is simply hidden. Removing the IR-cut filter from that same standard lens lets NIR light through, but the lens optics still carry the same chromatic focus shift; the NIR contribution is now visible but out of focus relative to the visible-light setting.

An IR corrected lens configured without an IR-cut filter (a NIR-pass variant) is designed in the optics itself to hold focus from visible through NIR, so no refocus step is needed when illumination switches, provided the residual offset stays within the system's depth of focus. Commonlands IR-corrected M12 lenses ship in both a 650nm IRC configuration (IR-cut installed, for daytime visible imaging) and a NIR-pass configuration (filter slot empty, for RGBIR and day/night use); see the product examples below.

Lens and filter setup Best use case Main risk
Standard lens + IR-cut filter Visible-only imaging, no NIR illumination IR-cut blocks NIR; cannot use 850/940nm illumination
Standard lens, IR-cut removed Narrow-band NIR only, refocused for that wavelength Visible and NIR focus at different positions; dual-wavelength use needs refocus
IR corrected lens + 650nm IRC Daytime visible imaging, future NIR capability possible Must swap to NIR-pass variant for dual-band use
IR corrected lens, NIR-pass (no filter) RGBIR cameras, day/night switching, pure 850/940nm systems Residual VIS/NIR shift may still matter at high resolution

Cost and availability track this table loosely. A standard lens with a fixed IR-cut filter is the least expensive and most widely stocked configuration, because it is the default for the large majority of visible-only machine-vision applications. IR-corrected designs cost more to manufacture, since the additional or substituted glass elements needed to extend correction into the NIR band add material and assembly cost, but the price difference is modest relative to the cost of a system that produces unreliable NIR imaging in the field. Specifying IR correction only where the application genuinely needs simultaneous or alternating visible/NIR sharpness, rather than by default, keeps the bill of materials aligned with the actual requirement.

When does IR correction matter for RGBIR and day/night systems?

IR correction is not necessary in every application. A visible-only system with an IR-cut filter and no NIR illumination has no need for it. The cases where it becomes a design requirement share one factor: the system must produce a sharp image at two or more wavelengths from the same focus position.

RGBIR sensors

RGBIR sensors capture RGB and NIR-sensitive pixels through the same lens at the same focus distance. A lens with significant chromatic focus shift leaves the NIR channel softer than the RGB channels, most noticeably on high-resolution sensors with small pixel pitch, where depth of focus (set by F-number and pixel pitch) is small and focus error has a larger fractional effect on MTF. Because both channel types are captured in the same exposure, there is no opportunity to refocus between them the way a day/night camera can refocus between modes. The lens has to hold both wavelengths in focus simultaneously, which makes IR correction a harder requirement for RGBIR than for sequential day/night switching.

Day/night cameras

A day/night camera uses visible illumination in daylight and 850nm or 940nm LED illumination at night. Without an IR-corrected lens, a fixed-focus camera is sharp in one mode and soft in the other, since it has no motorized refocus to compensate on mode change. An uncorrected lens can pass a daytime acceptance test and then image softly as soon as NIR illumination activates at night. Validating focus under both illumination modes before deployment avoids diagnosing this later as a camera fault when the real cause is the lens.

High-resolution sensors with small pixel pitch

Acceptable chromatic focus shift scales with a sensor's depth of focus (set by F-number and pixel pitch). A 5MP sensor at 2.2μm pixel pitch has a tighter tolerance than a 2MP sensor at 4.8μm. As machine vision moves toward 10MP-12MP sensors at similar formats, any residual VIS/NIR mismatch becomes more visible in the captured image, and even a modestly IR-corrected lens will often outperform a standard lens in mixed-wavelength use.

Dual-mode inspection systems

Some inspection systems alternate white-light and NIR illumination passes to detect different defect types on the same part, such as surface scratches under white light and subsurface voids or moisture under NIR. If the two passes use different focus positions because the lens is not IR corrected, cycle time increases to accommodate a refocus step, and any backlash in a motorized focus mechanism introduces alignment error between the two passes. An IR-corrected lens lets both illumination modes share one mechanical focus setting, which keeps the pixel-to-world calibration valid across both passes.

A practical specification workflow

When a project involves both visible and NIR imaging, decide the lens's IR-correction requirement before selecting a focal length or mount. First, confirm whether the system actually needs simultaneous or alternating visible/NIR sharpness, or whether it only ever operates in one mode at a time with a hard cutover (in which case a standard lens plus a physical filter swap and a refocus step may be acceptable). Second, if both modes matter without a refocus step, specify an IR-corrected lens and choose the NIR-pass or 650nm IRC variant based on whether an IR-cut filter needs to stay in the path. Third, if a physical filter switcher will be used, verify its glass states are optical-path-length matched rather than assuming any switcher works with any IR-corrected lens. Fourth, validate on the bench at the real sensor, working distance, and aperture before committing to production tooling, using the checklist further down this page.

For sensor-format and resolution compatibility when specifying a lens, see sensor size and lens compatibility and image sensor selection for machine vision.

Once the wavelength requirement is settled, choosing the focal length itself follows the same working-distance and field-of-view process as any other lens selection. See how to choose focal length for machine vision.

Can stopping down fix visible-to-NIR focus shift?

Stopping down increases depth of field, which can mask a small chromatic focus shift by bringing both wavelengths within the in-focus zone, but it is not a true correction. The underlying longitudinal chromatic aberration is still present in the lens; the image only looks acceptable because the wider depth-of-field envelope now covers the shifted plane.

M12 lenses used in machine vision typically have fixed apertures with no iris ring, so stopping down is generally not available for that product family. Many C-mount lenses offer an adjustable iris that can extend depth of field, but at larger focus shifts, stopping down to mask the mismatch may cut light to impractical levels or still leave one wavelength visibly softer than the other. Validate at the actual operating aperture, not a stopped-down bench condition, and treat an IR-corrected lens as the design-stage fix rather than relying on aperture to hide the shift. Aperture and depth-of-field fundamentals are covered in F-number in machine vision and depth of field in machine vision.

Top IR-corrected M12 lenses for day/night machine vision

Three all-glass, all-metal IR-corrected M12 lenses that hold one focal plane from the visible band through the 850nm and 940nm NIR illumination lines. Each ships in a 650nm IRC (IR-cut installed) and a NIR-pass (filter slot empty) configuration.

How we picked

We ranked these by how broadly each covers day/night and RGBIR work: focus stability held across visible and NIR, image circle relative to common 1/2" and 1/1.7" sensor formats, and a fixed F/2.0 aperture that keeps enough light for 850/940nm LED scenes. To match a focal length to your sensor, run the numbers in the lens field of view calculator.

Rank Lens EFL F# Image circle Am besten geeignet für
1 CIL046 4.4mm F/2,0 8,9 mm Wide 100° field for RGBIR and day/night on 1/1.7" sensors up to 8MP
2 CIL122 12mm F/2,0 9,2 mm Narrower 43° field for day/night and robotics on 1/1.7" 8-12MP sensors
3 CIL161 16mm F/2,0 8,0 mm Tight 28.8° field for day/night on smaller 1/2" 3-5MP sensors

All three lenses share the 650nm IRC / NIR-pass variant pattern: order the IRC variant for visible-only daytime use, or the NIR-pass variant when the system needs RGBIR or day/night sensitivity without refocusing. The CLA216-ICR-850BP pairs with an IR-corrected NIR-pass lens in systems that physically switch filters rather than running NIR-pass continuously. Its glass thickness offset is designed to compensate the path-length change between IR-cut and bandpass states, addressing filter-induced focus shift as a separate problem from the lens's own chromatic correction.

Commonlands is not the only source of IR-corrected optics. Sunex and Edmund Optics both ship IR-corrected designs, and either can be the better call when a project needs a C-mount format these M12 lenses do not cover, or when pulling from US stock inventory outweighs a specific M12 focal length and image circle. For M12 day/night and RGBIR cameras at the image circles and price points above, the three lenses here are the direct picks. Check the destination format first with the sensor size and lens compatibility guide.

How availability differs between M12 and C-mount lenses

IR-corrected designs are common in M12 lenses because M12 is the dominant mount for RGBIR and day/night embedded cameras, where the rigid, fixed-aperture body pairs naturally with a fixed-focus, always-in-focus optical requirement. C-mount IR-corrected options exist but are less common in the general catalog, since C-mount systems more often use an adjustable iris and a refocus-capable cam mechanism, which gives an alternative (if imperfect) way to compensate a wavelength-dependent focus shift by stopping down to extend depth of field at the cost of light, or by refocusing between modes. Confirm IR correction as a distinct line item on the datasheet regardless of mount. Do not assume a lens is IR corrected because it is marketed for day/night or security use, since that language is applied inconsistently across suppliers.

A validation checklist for visible and NIR focus stability

A datasheet claim of "IR corrected" is a starting point, not a guarantee for a specific system. Pixel pitch, aperture, working distance, and the actual NIR wavelength in use all affect whether the residual chromatic shift stays within an acceptable margin. Use this checklist to confirm a lens holds acceptable focus across visible and NIR wavelengths in the actual deployment configuration, run at the real working distance, aperture, and sensor format rather than on the bench under arbitrary conditions.

  • Set focus under the primary illumination source and record the mechanical focus position.
  • Switch to the secondary wavelength without adjusting the focus mechanism.
  • Capture a resolution test chart or fine-pitch target at both wavelengths at the operating working distance.
  • Measure sharpness or MTF at the image center and at least two corner positions for each wavelength.
  • Confirm the secondary wavelength meets the minimum system requirement, not just that it looks "similar."
  • Verify at the actual operating aperture. Do not validate stopped down to mask the shift if production runs wider open.
  • If the system alternates wavelengths in operation, confirm both channels are acceptable on the same frame type.
  • Document any residual focus offset in millimeters against the depth of focus (set by F-number and pixel pitch) so future sensor or aperture changes can be evaluated against it.
  • If the system sees significant thermal cycling, validate at operating temperature too, since thermal focus drift consumes the same depth-of-focus margin the residual chromatic offset must fit within.

For the focusing procedure itself, see how to focus a camera. For reading the MTF data this validation produces, see how to read MTF curves. Keep the recorded focus positions and MTF results as part of the production documentation set for the lens and sensor pairing. If a future revision changes the sensor, aperture, or working distance, that baseline is what tells you whether the visible/NIR margin is still adequate or whether the lens choice needs to be revisited.

A day/night IR-cut filter switcher holding two glass filters beside an M12 lens
Some cameras add a switching filter instead of an IR corrected lens.

Häufig gestellte Fragen

What is an IR corrected lens in machine vision?

An IR corrected lens extends chromatic focus correction into the near-infrared band, typically 850nm and 940nm, so visible and NIR light share a common focal plane. A standard lens is corrected for visible wavelengths only and defocuses under NIR illumination. IR correction is a property of the lens optical design, not of any filter placed in front of or behind it.

What is focus shift in a lens?

Focus shift is the movement of the plane of best focus after an optical condition changes, most commonly the illumination wavelength. A lens correctly focused under visible light can defocus when illumination switches to 850nm or 940nm NIR, even though nothing mechanical was touched. This wavelength-dependent case is chromatic focus shift; temperature and filter-stack changes cause focus shift through separate mechanisms.

Why does a standard lens go out of focus under NIR illumination?

Glass refractive index varies with wavelength (dispersion). A lens corrected for the visible band (roughly 400-700nm) is not optimized for 850nm or 940nm NIR, so NIR light converges at a different axial distance than visible light. This longitudinal chromatic aberration is fixed by wavelength, but its blur is more visible at wider apertures because depth of focus shrinks, and it is more visible on sensors with small pixel pitch.

Is removing an IR-cut filter the same as using an IR corrected lens?

No. An IR-cut filter only blocks which wavelengths reach the sensor; removing it lets NIR light through but does nothing to the lens's chromatic focus shift. The optics still bring visible and NIR light to different focal planes. An IR corrected lens design is required to close that focus gap, independent of whatever filter is installed.

Do I need an IR corrected lens for RGBIR cameras?

Yes, for most RGBIR applications. RGBIR sensors capture RGB and NIR pixels from the same frame through the same lens at the same focus position. A lens with significant chromatic focus shift leaves the NIR channel softer than the RGB channels, an effect that is most visible on high-resolution sensors with small pixel pitch.

Can stopping down fix visible-to-NIR focus shift?

Not fully. Stopping down increases depth of field, which can mask a small chromatic focus shift, but the underlying longitudinal chromatic aberration is still present in the lens. M12 lenses typically have fixed apertures with no iris ring, so stopping down is generally not available. Larger shifts remain visible even at reduced aperture, particularly on high-resolution sensors.

How is chromatic focus shift different from thermal focus shift?

Chromatic focus shift moves the focal plane with wavelength (visible versus NIR) and is addressed by IR-corrected optical design, which holds the residual visible/NIR offset within the system depth of focus. Thermal focus shift moves the focal plane with temperature, driven by barrel expansion and glass or plastic dn/dT, and is addressed with all-glass or athermalized construction instead. See the ruggedized lens guide for the thermal mechanism and mitigation.

What wavelengths do IR corrected lenses usually support?

IR corrected machine-vision lenses are typically designed to hold focus from the visible range through the common NIR illumination wavelengths of 850nm and 940nm. The degree of correction varies by design; always verify the specified wavelength range on the datasheet and validate sharpness at the actual operating wavelengths rather than assuming coverage beyond what is documented.

How should I validate visible and NIR focus on a machine vision system?

Set focus under the primary illumination wavelength, then switch to the secondary wavelength without touching the focus mechanism, and capture a resolution target at both. Measure MTF at center and corners at the real working distance and aperture, not a stopped-down bench condition, and document any residual focus offset against the system's depth of focus (set by F-number and pixel pitch).

Do day/night cameras need both an IR-corrected lens and a filter switcher?

Often, yes. The IR-corrected lens keeps the optics focused across visible and NIR; a filter switcher (or a fixed NIR-pass configuration) controls which wavelengths reach the sensor at a given time. Systems that physically swap an IR-cut filter for a bandpass filter also need those two filter states to have matched optical path length, or the swap itself introduces a separate focus shift. See the bandpass filter machine vision guide for filter-switcher selection.

Does an IR corrected lens cost more than a standard lens?

Typically yes, by a modest margin. Extending chromatic correction into the NIR band requires additional or substituted glass elements, which adds material and assembly cost relative to a standard visible-only design. The added cost is usually small compared to the cost of unreliable NIR imaging in a deployed system, so IR correction should be specified where the application genuinely needs it rather than skipped to save a few dollars per unit.

Can I add IR correction to an existing standard lens after installation?

No. IR correction is built into the lens's internal glass elements at the design and manufacturing stage; it cannot be added afterward with an external filter, coating, or accessory. If a deployed system with a standard lens needs visible/NIR focus stability, the lens itself must be replaced with an IR-corrected design rather than modified.

Need help choosing an IR corrected lens?

Send your sensor, working distance, and illumination wavelengths to our San Diego engineering team. We will confirm whether an IRC or NIR-pass variant fits your system, and flag any filter-switcher compensation your day/night design needs. Our lenses are MTF characterized, and orders placed before 12 PM PST ship the same day.