LightingHow-to

Near IR bandpass filter contrast: test IR before you buy

Prove near IR contrast before you buy: fit an 850 nm bandpass filter and a matched IR spot on a monochrome camera, then read gray separation and exposure cost.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01Why near IR separates materials white light cannot
  2. 02What you need on the bench
  3. 03The bench test, step by step
  4. 04The two numbers that decide it
  5. 05Worked example: white bench light, IR filter, 40 ms cycle budget
  6. 06850, 940 or 730 nm
  7. 07When the filter is the wrong tool
  8. 08Before you order
  9. 09Questions

Two materials look identical under white light, the threshold fails on every tenth part, and the next purchase is usually a bigger camera. Test what near infrared sees before you spend that money. An IR bandpass filter on a monochrome camera, paired with a matched near-IR LED spot, takes about an hour and a handful of parts to prove on the bench. Materials that reflect visible light the same way often treat near IR very differently: one absorbs it, one reflects it, and the filter removes the visible light that was hiding the difference. This guide gives you the bench procedure, the two numbers that decide it, a worked example and the checks to run before you order.

Why near IR separates materials white light cannot

A silicon machine-vision sensor does not stop at red. Its pixels keep responding out to the 1,100 nm edge of silicon, far beyond what the eye sees, so a camera wearing the right filter becomes a near-IR imager. Absorption and reflection change with wavelength, sometimes decisively: ink that soaks up IR against paper that reflects it, one black plastic against a black rubber, two similar fabrics with opposite IR behavior. In white light such a pair reads as one gray level; under the right wavelength the same pair can sit 100 gray levels apart.

The filter matters as much as the light. Shop lights and daylight are full of visible photons that drown the subtle IR differences, so a visible-blocking bandpass passes a narrow slice around its center wavelength and rejects the rest, which is also why the contrast survives on a bright production floor. We apply the same logic to printed packaging inspection under near IR and to water and silicon inspection, where the wavelength follows the material's spectrum. If the LED color itself is still an open question, start with which LED colour gives the best contrast.

What you need on the bench

Five items, all bench-standard:

  • A monochrome area-scan camera with a C- or CS-mount lens. A color camera works only if its IR-cut window is removable, which is rare on production models.
  • A visible-blocking bandpass filter centered on the light's wavelength, in a thread that matches the lens front. The LS-LXR-0225 is an 850 nm bandpass filter with an M30.5 x 0.5 thread and is the reference part for this test.
  • A matched near-IR spot light. The light finder filters the range by wavelength — 850 nm and 940 nm families both exist — and most units run from 24 V.
  • A lighting controller with a strobe input, so flash length stays under your timing control; the case for one is made in why use a machine vision lighting controller.
  • A white bench light for the baseline shots. Any white unit works; the LS-SPT-0162 is the range's 24 mm diameter white spot. Add a light extension cable if the light sits away from the controller.
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
LightingSpot lights

Small fields and coaxial lenses

191 models · from $109.00

The bench test, step by step

Run the sequence once with the room lights low, then repeat step 5 with the production area lit exactly as it really is.

  1. Baseline in white light. Light the part as production will, capture one frame, and note the exposure. Read the mean gray of background and feature from your library's ROI statistics; a histogram over a small box on each region is enough. These two numbers are the reference every later change is judged against.

  2. Fit the filter. Thread it onto the lens front, square to the axis, and keep light and exposure unchanged. The image should collapse to near black: a phosphor white LED emits almost nothing at that wavelength, so the filter has nothing to pass. If the scene stays visible, light is reaching the sensor another way — a leaking filter seat or an incandescent lamp in the cell. Both are the usual suspects in stray light diagnosis.

  3. Swap in the IR spot and raise the exposure. Keep the spot at the white light's position and angle so the geometry comparison holds. Open the exposure until the background mean reads 150-180 gray levels, then look at the feature. If the spot seems dead, test it the phone-camera way: phone sensors see near IR faintly.

  1. Read the separation. Measure the same two means again. The pair is separable when feature and background differ by at least 30 gray levels on an 8-bit image, a margin that clears the few-level noise floor of a typical sensor and leaves room for threshold drift.

  2. Stress it with ambient. Turn on the shop lights, open the blind, run the overheads. The contrast should hold almost unchanged, because visible ambient never reaches the sensor. If it drops, find the leak before trusting any number from this rig.

  3. Repeat at production timing. Strobe the light at the real exposure and cycle, and re-measure separation at those numbers, because shortening a flash moves the gray values. LED strobe duty cycle and pulsed IR timing cover the timing side, and a lighting stability test before sign-off keeps LED warm-up from moving the numbers after deployment.

The two numbers that decide it

Everything reduces to separation and exposure cost.

Separation is the gray-level gap between feature and background at production exposure. Express it as Weber contrast, with background mean B and feature mean F:

C = (B - F) / B

Work to two lines: 60 gray levels of gap is comfortable, and 30 gray levels is the floor. The floor comes from a typical sensor's temporal noise of a few gray levels plus the margin a production threshold needs on both classes. At a background of 160, the floor is C = 30 / 160 = 0.19 and comfort starts at C = 60 / 160 = 0.38. Below 0.19, fix the lighting; from 0.19 to 0.38, proceed but test your worst parts; above 0.38, the set-up is production-ready.

Exposure cost is the shutter time the new signal needs. Sensor output is linear with exposure while the mean sits well above black level, so the exposure E_new that reaches a target gray T from a measured mean M taken at exposure E_old is:

E_new = E_old × T / M

If E_new fits inside the time the part holds still, the set-up is production-ready as tested. If it does not, no camera setting rescues it: the light has to change.

Worked example: white bench light, IR filter, 40 ms cycle budget

Round numbers from a bench run, so every step checks by hand:

  • White ring light baseline: exposure 5 ms, background mean 180, feature mean 165 — a 15-level gap, the failure that started the test.
  • Filter fitted, white light unchanged, 5 ms: background mean collapses to 7, the starvation step 2 predicts.
  • Test targets: background gray 160, minimum gap 30 levels. Line constraint: the part sits still for 40 ms.

The rule is the exposure formula: E_new = E_old × T / M. With the white light behind the filter, E_new = 5 ms × 160 / 7 = 114 ms. That is nearly three times the 40 ms the part holds still, so the white light is dead behind the filter; opening the shutter buys blur, not contrast.

The decision is to change the light. A strobed IR spot at the filter's wavelength puts its output where the filter passes, so the exposure comes back down to milliseconds. Re-measured at 4 ms with the matched spot: background 170, feature 40, a 130-level gap and C = (170 - 40) / 170 = 0.76. That clears the 0.38 comfort line with a wide margin, so order the filter and the matched IR spot and keep the white light for changeover and fixture shots.

850, 940 or 730 nm

850 nm is the default: silicon response is still strong there, it is the most common IR wavelength in the spot-light range, and visible rejection is deep. Move only when a constraint forces it.

Wavelength Sensor signal Ambient rejection To the eye Pick it when
850 nm Strong, the reference Strong Faint deep-red glow, effectively invisible Default bench and production choice
940 nm Typically half of 850 nm or less, as silicon response falls toward its 1,100 nm edge Deepest, because the solar spectrum dips at a water-vapor band near 940 nm Invisible Outdoor daylight, or lights facing operators
730 nm Higher than 850 nm Weakest of the three, because sunlight is brightest here Clearly visible red When the IR view must stay close to the visible look

The 940 nm signal penalty is manageable: pay it back with exposure or LED current and take the deeper ambient rejection in exchange. Beyond silicon's comfort zone the picture changes again — SWIR vs NIR vs visible imaging maps which band to inspect with — and day and night license plate capture runs the same filter logic against traffic-level ambient light.

When the filter is the wrong tool

Three results send you down a different path:

  • The difference is hue, not material. Near IR erases color: a yellow cap and an orange cap reflect the same IR wavelength almost equally. For hue discrimination, use a color camera under white light or a visible color filter on a mono camera; the contrast logic is the one in monochrome camera with optical filter: why contrast beats color.
  • Both materials reflect IR alike. If the gap stays under 30 gray levels with the matched light, wavelength is not the lever. Change geometry instead: scratches and dents that vanish in bright field pop out in dark field, and bright field vs dark field lighting gives the reflection law that picks the angle.
  • The surface is glossy. Specular glare is IR too, so the filter passes it along with the signal. Cross polarization kills the glare; expect roughly two extra stops of light loss, costed in f-stops in polarizer light loss in machine vision.

Before you order

Five checks, five minutes:

  • Thread match. Measure the lens front thread and order the filter to fit it; M30.5 x 0.5 on the reference filter, and other threads plus step-up rings live in lens accessories. The configurator's extras step adds the filter to a full build.
  • Wavelength match. Center the filter on the LED's peak wavelength; both drift a few nanometers with temperature, so pairing filter and light from the same wavelength family is the safe combination.
  • Camera confirmed monochrome, or a color model with a removable IR-cut window. The IR-cut subject has its own guide at color camera near infrared imaging.
  • A strobe path. Controller channel, trigger wiring and a correctly matched cable; connector and current pairing are covered in light controller to light cable adapters.
  • Exposure headroom. Run the exposure formula on your own baseline numbers. The worked example's 114 ms against a 40 ms budget is the pattern: when the scaled exposure overruns the motion budget, order the matched light together with the filter, not the filter alone.
Build the whole station

The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.

Start with the light

If your two mean values land where the worked example lands, the parts list is settled. If the gap stalls under 30 gray levels, take the failing frame, the exposure and both means to the contact page and we will work through wavelength, angle and geometry alternatives with you. The lighting topic page holds the rest of the lighting guides.

Questions

Will an 850 nm bandpass filter work on a color camera?

Usually not on its own. A color sensor's built-in IR-cut filter blocks most light beyond roughly 650 nm, so an external filter at that wavelength leaves the sensor almost nothing to see. Run this contrast test on a monochrome camera. If only a color camera is available, shortlist models with a removable IR-cut window first, then repeat the bench test with the filter before buying anything.

Why choose 850 nm instead of 940 nm?

850 nm gives the stronger signal. Silicon response is typically about half or less at 940 nm than at 850 nm, so exposures roughly double. Choose 940 nm when the light must stay invisible to operators or when daylight rejection has to be deepest, because the solar spectrum dips at a water-vapor band right near 940 nm. Start at 850 nm on the bench and move only if ambient light or visibility forces it.

How much light does the filter cost at the matched wavelength?

Little. At its center wavelength a quality bandpass passes on the order of 90 percent of the light, so a matched LED loses almost nothing. The heavy loss falls on everything else: a white LED emits almost no power in the near IR, so white light behind the filter collapses to a small fraction of its unfiltered brightness. Match the light to the filter and the exposure stays in milliseconds.

Can I do the first test with sunlight instead of an IR LED?

Yes, and it is the fastest screening pass. Daylight carries plenty of near IR, so with the filter on the lens and room lights low, materials that reflect IR differently separate on the first frame. What sunlight cannot prove is performance under your strobed LED at production exposure and cycle time, so treat it as a screening pass and repeat the measurement with the matched light before ordering.

What if the filter thread does not match my lens?

Measure the front thread of the lens, order the filter in that thread, or bridge the difference with step-up rings; M30.5 x 0.5 is common on small C-mount designs. Keep the filter square to the optical axis: tilting a bandpass shifts its passband slightly toward shorter wavelengths, which matters when the LED peak sits near the edge of the band.