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 Max Henkart, Commonlands · Updated June 2026 · 10 min read

A Commonlands 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 only selects which wavelengths reach the sensor. It does nothing to close the lens's visible-to-NIR focus separation. 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. Focused under visible light, that same standard lens defocuses under NIR illumination, because its designers never targeted that wavelength range for focus.

The practical test is direct: focus 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. Correction ranges from an uncorrected singlet to a multi-element low-dispersion design, and reputable datasheets specify the wavelength range over which focus stability holds. For the aberration family this addresses, see lens aberrations in machine vision.

How the optical design achieves IR correction

A single lens element cannot hold visible and NIR light at the same focal plane, because every glass type has its own dispersion curve, the relationship between refractive index and wavelength. IR correction pairs element materials with complementary dispersion so the combined system brings a wider wavelength range to a common focus than any single glass could. This is the achromatic doublet principle used for visible correction, extended across a band that includes 850nm and 940nm.

Dispersion curves are nonlinear and glass catalogs are finite, so a designer usually accepts a residual visible/NIR offset rather than eliminating it. A well-corrected lens holds that offset within the system's depth of focus at the intended aperture and format. That is why datasheets specify a wavelength range, and why validating at the real wavelength, aperture, and sensor matters more than the "IR corrected" label alone.

A camera module lit half in daylight and half in deep-red 850nm near-infrared
A Commonlands IR corrected M12 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. It is distinct from back-focus error, a static lens-to-sensor misalignment set once at assembly. Focus shift happens after a known-good focus state, driven by a condition the lens design cannot compensate for.

Three mechanisms move the focal plane, each with its own fix. A fourth condition, aperture, changes only how much shift the system tolerates, not where the plane sits. Wavelength is the chromatic case this pillar covers: glass refractive index varies with wavelength, so 850nm or 940nm NIR converges at a different axial distance than visible light. In a non-IR-corrected lens, that separation can be large relative to the sensor's depth of focus.

Condition that changes 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 this focus shift differs from lateral chromatic aberration, which spreads color fringing across the field rather than moving the axial focal plane. IR correction targets the longitudinal component so visible and NIR bands converge closer together.

Filter-stack shift is a separate, predictable effect

Any glass added to the optical path after the lens is focused moves the focal plane away from the lens by a predictable amount. Common examples include a cover glass, a bandpass filter, or a switcher.

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

A 340μm shift exceeds a typical 15-25μm depth of focus by more than an order of magnitude. A day/night filter switcher must therefore hold matched optical path length between its IR-cut and bandpass states. If the two thicknesses (adjusted for refractive index) do not match, one state is always defocused relative to the other, independent of whether the lens is IR corrected.

The Commonlands CLA216-ICR-850BP compensates this: its glass thickness offset between the 650nm IR-cut and 850nm bandpass sides matches the two path lengths, 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 gives a sharp visible image because the filter stops out-of-focus NIR light from reaching the sensor. The lens is not corrected. The problem is only hidden. Remove that filter and NIR light gets through, but the optics still carry the same chromatic focus shift, so the NIR contribution is now visible and out of focus relative to the visible-light setting.

Commonlands labels the no-filter build NIR-pass (SKU suffix ANIR): the filter slot is empty, so visible and NIR both reach the sensor. This is not a NIR-pass longpass filter, which would block visible light.

An IR corrected lens in that NIR-pass build holds focus from visible through NIR in the optics, so no refocus is needed when illumination switches. Commonlands IR-corrected M12 lenses ship in both a 650nm IRC build (daytime visible) and this NIR-pass build (RGBIR and day/night). See the 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

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 one focus distance. A lens with significant chromatic focus shift leaves the NIR channel softer than the RGB channels, most visibly on high-resolution sensors with small pixel pitch. Because both share one exposure, there is no chance to refocus between them, so the lens must hold both wavelengths in focus at once, a harder requirement than sequential 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 on mode change. It can pass a daytime acceptance test, then image softly the moment NIR illumination activates, so validate focus under both modes before deployment rather than diagnosing it later as a camera fault.

Decide the IR-correction requirement before choosing a focal length or mount. It turns on one question: must the system stay sharp at two wavelengths from a single focus position? After that, focal length follows the usual working-distance and field-of-view process. Confirm the destination format with sensor size and lens compatibility, since residual shift bites hardest on small, high-resolution formats.

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

Three all-glass, all-metal Commonlands 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

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

Rank Lens EFL F# Image circle Best for
1 CIL046 4.4mm F/2.0 8.9mm Wide 100° field for RGBIR and day/night on 1/1.7" sensors up to 8MP
2 CIL122 12mm F/2.0 9.2mm Narrower 43° field for day/night and robotics on 1/1.7" 8-12MP sensors
3 CIL161 15.6mm (nominal 16mm) F/2.0 8.0mm Tight 28.8° field for day/night on smaller 1/2" 3-5MP sensors
High resolution M12 Fisheye lens

191°@6.4mm Fisheye Lens

$70.00

Download .STPView Product
DSL210 DSL224 2mm S-Mount Lens IMX335 Framos

190°@6.8mm Fisheye M12 Lens

$49.00

Download .STPView Product
Basler Dart Camera IP67 M12 Lens

No Distortion 3.2mm Lens

$39.00

Download .STPView Product
Wide-Angle 4mm M12 Lens

Wide-Angle 4mm M12 Lens

$99.00

Download .STPView Product

Browse M12 Lenses (S-Mount Lenses) for Embedded Machine Vision

Order the 650nm IRC variant for daytime visible use, or the NIR-pass variant for RGBIR or day/night sensitivity without refocusing. Where a system physically switches filters, pair an IR-corrected NIR-pass lens with the CLA216-ICR-850BP, whose glass thickness offset compensates the path-length change between filter states.

Commonlands is not the only source: Sunex and Edmund Optics also ship IR-corrected designs, and either can be the better call for a C-mount format these M12 lenses do not cover. Confirm IR correction as a distinct line item on the datasheet regardless of mount, since day/night and security marketing 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 all affect whether the residual shift stays acceptable. Confirm a lens holds focus across visible and NIR in the real deployment configuration, not on the bench.

Commonlands provides measured MTF data per lens and can supply depth-of-focus figures on request, giving this checklist a documented baseline to test against.

  • 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.
  • Verify at the actual operating aperture. Do not validate stopped down to mask the shift if production runs wider open.

For reading the MTF data this produces, see how to read MTF curves. Keep the recorded focus positions and MTF results with the production documentation, so a later change of sensor, aperture, or working distance can be checked against that baseline.

A day/night IR-cut filter switcher holding two glass filters beside an M12 lens
A filter switcher, such as the Commonlands CLA216-ICR-850BP, is one alternative to an IR corrected lens.

Frequently asked questions

Commonlands stocks IR-corrected M12 lens variants for NIR illumination. These answers explain when that correction is necessary.

What is an IR corrected lens in machine vision?

An IR corrected lens extends chromatic focus correction into the near-infrared, 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. IR correction is a property of the lens optical design, not of any filter.

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, which still brings visible and NIR light to different focal planes. Closing that gap requires an IR corrected lens design, independent of any filter.

Do I need an IR corrected lens for RGBIR cameras?

Yes, for most RGBIR applications. These sensors capture RGB and NIR pixels from one frame through the same lens at one focus position, so a lens with significant chromatic focus shift leaves the NIR channel softer than RGB, most visibly on high-resolution sensors with small pixel pitch.

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.

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

Set focus under the primary 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 stopped down, and document any residual focus offset against the 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.

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. Commonlands lenses are MTF characterized, and orders placed before 12 PM PST ship the same day.