Lenses & opticsExplainer

Remove the IR-cut filter from an M12 lens: what you find inside

Where the IR-cut filter sits inside a stock M12 lens, why you cannot remove it from an all-plastic barrel, and the lens or filter swap that works.

LumaSpec Vision11 min read Share on LinkedIn

On this page 8 sections
  1. 01Where is the IR-cut filter in a stock M12 lens?
  2. 02Can you cut or dissolve the filter out of an all-plastic barrel?
  3. 03Do you need an IR-pass filter once the IR-cut is gone?
  4. 04Which M12 lens replaces the stock one for NIR work?
  5. 05How do you keep the same field of view after the swap?
  6. 06Where does a 10 mm IR long-pass disc actually go?
  7. 07What should you check before ordering the parts?
  8. 08Questions

You want a board camera that sees near infrared, and the lens in front of it blocks exactly that band. The stock M12 lens on most small board cameras carries an IR-cut filter bonded inside the barrel, and the usual forum advice, knife it out, heat it, dissolve the glue, destroys all-plastic lenses more often than it frees them. This piece shows where that filter physically sits, when removal is realistic, and the swap that gets you a working NIR camera the same day: a lens built without IR-cut, plus a visible-blocking filter where daylight matters.

Where is the IR-cut filter in a stock M12 lens?

It is almost never a removable ring: in a stock M12 lens the IR-cut element is a coated glass disc bonded behind the front protective window, fixed with cured adhesive rather than held by a thread.

The disc passes the 400-700 nm visible band and rejects wavelengths beyond 700 nm, exactly the band where a silicon sensor still responds strongly. Bonded filter integration is standard practice for M12 assemblies: the maker cures the disc in place with UV or thermal adhesive, so there is no holder, no retaining ring and nothing to unscrew. A C-mount lens carries a front filter thread for this job; an M12 barrel, at about 12 mm outside diameter, is too small for one, so the filter goes inside the barrel.

Its exact position varies by maker: behind the front window, deep between elements, or as a coating on an element itself. From outside, every one of these looks identical, which is why buying four same-looking 3.6 mm lenses and hoping one opens cleanly is a lottery rather than a plan.

Can you cut or dissolve the filter out of an all-plastic barrel?

Almost never without killing the lens: the disc sits millimetres from the front element, the barrel and often the elements themselves are plastic, and every removal route attacks the plastic before it attacks the adhesive.

A blade is the first suggestion you will meet. The disc sits flush against the front group, so the knife tip lands on element edge or barrel plastic, and the lever that lifts the glass chips the coating or scores the element on the way out. A heat gun meets the same physics from the other side: the temperatures that soften cured adhesive also soften a plastic barrel, and an element can shift in its seat while you work.

Solvents are worse. Acetone is an effective adhesive solvent and an effective plastic solvent: it attacks plastic barrels, plastic elements and coatings, and it wicks into the assembly faster than you can control it. Clean any optic that survives surgery with isopropyl instead, sparingly.

The exception worth knowing: a few lenses carry the IR-cut as a loose glass on the sensor side of the holder, or behind a screwed front retainer. If the retainer unscrews and the glass lifts out clean, you have the one lens in the batch built to be serviced, and same-thickness replacement glass keeps the optics innocent. If your lens turns out to use a coating on an element rather than a disc, there is nothing to remove and nowhere to glue a replacement disc.

Do you need an IR-pass filter once the IR-cut is gone?

No, if the scene is dark except for your infrared illuminator, the sensor sees that band fully as soon as the IR-cut filter is gone; a visible-blocking filter earns its place only when daylight or room lighting contaminates the frame.

A silicon CMOS sensor keeps useful response from about 700 nm to 1000 nm. Under a dark scene lit only by an 850 nm or 940 nm illuminator, removing the IR-cut is the whole job: the camera goes from nearly blind to fully sensitive at your wavelength, and adding an IR-pass disc would change nothing.

Daylight is the opposite case. Sunlight and room lighting carry far more visible energy than your illuminator's near infrared, so a NIR scene in daylight needs a long-pass filter that blocks the visible band, or a band-pass filter centred on your LED wavelength. The band-pass at 850 nm is the stronger choice outdoors: the camera then records essentially one wavelength, and ambient visible light stops participating in the exposure.

The full menu of filter types, IR-cut, dual-band and IR-pass, and where each belongs, is compared in Color camera near infrared imaging: IR-cut filter options, and the choice of band itself is walked through in SWIR vs NIR vs visible imaging: which band to inspect with.

Which M12 lens replaces the stock one for NIR work?

One specified without an IR-cut filter, sold as an IR-sensitive, IR-pass or starlight version of the same focal length, with an image circle at least as large as your sensor diagonal; that is a lens swap on the same M12 thread, not surgery.

The lens description has to say it. Makers of board-camera lenses mark their IR-sensitive variants explicitly, and low-light starlight lines are where no-IR-cut versions concentrate, because the point of those lines is collecting every photon after dark. Beyond that one line of text, apply the ordinary selection rules: sensor format matched, image circle covering the diagonal, distortion low enough for the measurement, resolution class sized to your pixels. The full method is in M12 lens selection for board cameras: format, focal length and IR cut.

Two examples from the M12 board lenses range span the focal lengths this example needs:

M12 board lenses3.3 mm, 1/2.3", 16 MP, M12-mount Low-Distortion M12 lens (LS-MBL-0159)LS-MBL-0159
Type
Low-distortion M12
Sensor format
1/2.3"
$109.00View part
M12 board lenses2.8 mm M12 board lens, 8 MP, F2.8 (LS-MBL-0018)LS-MBL-0018
Sensor format
1/2.5"
Mount
M12
$50.00View part

The LS-MBL-0159 is a 3.3 mm low-distortion M12 lens for 1/2.3-inch sensors, rated 16 MP with an image circle up to 8 mm. The LS-MBL-0018 is a 2.8 mm F2.8 board lens for 1/2.5-inch sensors, rated 8 MP. Both occupy the same M12 holder as the stock lens, so the change is mechanical only.

One boundary worth drawing: near infrared at 700-1000 nm is still reflected light, not heat. Thermal imaging lives around 8-14 µm with germanium optics, a different camera and a different lens world, and no M12 glass lens takes you there.

How do you keep the same field of view after the swap?

Match the replacement's focal length to your sensor width: on a 1/2.8-inch 1920 × 1080 board sensor (2.9 µm pixels, 5.57 mm wide), the stock 3.6 mm gives 75° horizontal FOV and a 3.3 mm gives 80°, both inside a 70-90° target.

sensor width = pixel count × pixel size HFOV = 2 × atan(sensor width / (2 × f)) object width at working distance = sensor width × WD / f

Work the example through. The sensor: 1920 pixels at 2.9 µm gives 5.57 mm width, and 1080 pixels gives 3.13 mm height, so the diagonal is √(5.57² + 3.13²) = 6.39 mm, the image circle the lens must cover. The stock 3.6 mm lens: 5.57 / (2 × 3.6) = 0.774, atan gives 37.7°, doubled to 75.5° horizontal. The 3.3 mm replacement: 5.57 / (2 × 3.3) = 0.844, atan gives 40.2°, doubled to 80.3°. At a 500 mm working distance the 3.6 mm covers 5.57 × 500 / 3.6 = 774 mm across, and the 3.3 mm covers 5.57 × 500 / 3.3 = 844 mm, so the replacement sees slightly wider and both hold the brief.

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.

For your own sensor and distance, the calculator runs the same arithmetic:

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

Beyond roughly 100° horizontal, a rectilinear lens this short gives up and you are in fisheye country; Fisheye lens selection for M12 board cameras: circle, BFL and FOV covers that ground.

Aperture arithmetic decides the exposure side. Light gathering scales with the inverse square of the f-number: F2.8 against F2.0 costs (2.8 / 2.0)² = 1.96, about one stop; F5.6 against F2.8 costs (5.6 / 2.8)² = 4, two stops. Stock all-plastic lenses usually sit near F2.0, so treat that as an assumption until you measure, and budget roughly double the exposure on an F2.8 replacement, partly paid back by the NIR sensitivity you just gained. The fuller picture is in M12 lens light gathering: pick a lower f-number, same focal length.

Where does a 10 mm IR long-pass disc actually go?

Flat in the lens-holder cavity on the sensor side, between the M12 thread and the sensor's cover glass, where a 10 mm disc fits the standard holder bore; if it replaces glass of the same thickness, back focus does not move.

Sensor side beats lens front for a bare M12 build. The disc is protected, adds no front length, and the physics that matters is this: a plane-parallel plate of thickness t and index n shifts the image plane back by t × (1 − 1/n). For filter glass, n ≈ 1.5, so a 1.0 mm disc shifts focus by 1.0 × (1 − 1/1.5) = 0.33 mm. On the M12 × 0.5 thread one full turn moves the lens 0.5 mm, so that shift costs two-thirds of a turn of refocus. Replace existing glass with the same thickness and the shift is zero, the reason to match thickness, not just diameter. Lens focal length vs back focus in board cameras and M12 lens thread pitch and focus shift: the physics of S-mount focus take those two mechanisms further.

Fix the disc with a drop of UV-cure optical adhesive at the edge, or a retaining ring if the holder has one. Cyanoacrylate is a poor choice near coated glass, because its vapour fogs coatings as it cures.

The lens front is the alternative when there is a thread to use. M12 barrels rarely carry one, but larger machine-vision lenses do, and a C-mount lens can sit on a board camera with the right adapter, see C-mount lens on an M16 board camera: adapters and flange distance. For that route, from lens accessories:

Lens accessoriesBand-pass filter, 850 nm (near IR), M30.5 x 0.5 thread (LS-LXR-0225)LS-LXR-0225
Type
Filters & polarizers
$119.00View partBuild a system with it

The LS-LXR-0225 is a band-pass filter centred at 850 nm in an M30.5 × 0.5 thread, sized for front-threaded barrels rather than bare M12 holders.

What should you check before ordering the parts?

Five checks: the lens description states no IR-cut or IR; the image circle equals or exceeds your sensor diagonal; the focal length holds your FOV target; the resolution class fits your pixel size; any added filter glass matches the thickness it replaces.

  • IR statement. One line in the description decides this purchase; if it is silent, assume the lens carries an IR-cut and pick another.
  • Image circle. Your sensor diagonal, 6.39 mm in the example, must sit inside the lens's circle; a circle up to 8 mm covers it with margin.
  • Focal length. Run the FOV arithmetic before ordering: one calculation on paper beats a return shipment.
  • Resolution class. 2.9 µm pixels ask more of a lens than 3.45 µm ones; take the higher megapixel rating when the choice is close.
  • Filter thickness. Measure the glass you remove with calipers or a micrometer and order the same number.
  • Refocus and lock. Focus with the IR illuminator on, because chromatic aberration puts the NIR focus plane slightly behind the visible one, then lock the ring as described in M12 lens focusing: adjust, check corners and lock.

Start with the lens finder filtered to your sensor format, or run the configurator's lens step against your camera. If the sensor is unusual, or you are juggling band, filter and lens at once, contact us with the sensor model and the scene, and we will pick the parts.

Questions

Does the sensor's cover glass block infrared too?

No. The cover glass bonded over a CMOS sensor is clear window glass that transmits from the visible band out to about 1000 nm, so it does nothing to your NIR signal; leave it in place, because it also keeps dust off the die. The part that blocks infrared is the coated disc or coating inside the lens barrel. On a few modules a separate filter glass sits in front of the sensor and lifts out with the holder.

Why is the image soft at 850 nm when you focused in daylight?

Because focus in near infrared lands slightly farther back than in visible light, chromatic aberration again. On a short wide-angle lens the shift between 550 nm and 850 nm is often tens of micrometres, while a 2.9 µm pixel at F2.8 has a depth of focus of roughly 2 × 2.8 × 2.9 µm ≈ ±16 µm, so daylight focus misses at 850 nm. Focus with the IR illuminator running and lock the ring there.

Is 850 nm or 940 nm the better illuminator wavelength?

850 nm when the camera decides: silicon response at 850 nm is far stronger than at 940 nm, so each watt of LED power buys noticeably more signal and exposure times shrink. Move to 940 nm only when the faint red glow of an 850 nm LED at close range is unacceptable for the installation, covert traffic or occupancy sensing for example, and pay for it with longer exposure or more LED power. Centre any band-pass filter on the exact wavelength you run.

Can the filter be removed from the camera module instead of the lens?

Sometimes, and it is the better bet to try first. On a number of board cameras the IR-cut sits as a loose glass in front of the sensor, inside the lens holder, and lifts out once you unscrew the holder from the board. If the module instead relies on a coated element or a bonded disc in the barrel, the module route fails too, and the answer is a replacement lens specified without IR-cut.

What happens to a color camera run without an IR-cut filter?

Colors drift pink to magenta. The red and green sites of the Bayer filter keep strong response from 700 to 950 nm, so near infrared floods two of the three channels and no white balance can separate it from real red. In daylight, put the IR-cut back or fit a dual-band filter; at night under IR illumination, switch the camera to monochrome output, which sums the sites instead of trying to color-balance them.