A motor-focus USB camera module imaging a 47 mm filter at about 10 cm keeps producing soft 25 micron particles no matter where the focus motor stops. That symptom is common, and the fix is rarely another turn of the focus ring. This article runs the three numbers that decide the outcome — pixels across the feature, magnification, and working f-number. It shows which camera and lens combinations pass at this field and distance, and gives a target test that proves the build before it goes on the line.
Why is the image soft at 10 cm even at best focus?
Because the 25 micron feature is only 1/1,880 of the field, so the optics must deliver about 0.28× magnification with an aperture near f/4 — and a compact motor-focus module usually cannot hold both at 100 mm working distance.
Your test images already contain the diagnosis. The 250 micron lines are crisp at the same focus setting that leaves the 25 micron lines soft, and a misfocused lens blurs both sizes together. Focus decides where the blur lands, not how small it can get. Three calculable numbers set that floor: the pixels that sample the feature, the magnification that scales it onto the sensor, and the working f-number that diffracts it. The sections below run them in order, and each yields a pass or fail for the field at 100 mm.
How many pixels do you need across a 25 micron feature?
Plan for at least 3 pixels across the feature, which at this field width means about 5,640 pixels across the sensor; a 12 MP camera leaves the feature about 2 pixels wide, while a 20 MP camera covers it at close to 3.
Count it straight from the field: 47 ÷ 0.025 mm = 1,880 features across the image, and 1,880 × 3 = 5,640 pixels. One pixel detects a change, two are the Nyquist minimum for an edge, three give a measurable profile. A 12 MP sensor carries about 4,100 pixels across, a 20 MP sensor about 5,500. On a color sensor the Bayer pattern halves the per-channel sampling, so hold the 3-pixel line instead of trimming to 2.
| Sensor class | Pixels across | Magnification at the field | Object pixel | 25 µm feature spans | Verdict |
|---|---|---|---|---|---|
| 5 MP, 1/1.8-inch, 2.8 µm | ~2,600 | 0.15× | 18.3 µm | 1.4 px | fails |
| 12 MP, 1.1-inch, 3.45 µm | ~4,100 | 0.30× | 11.5 µm | 2.2 px | detects, not measures |
| 20 MP, 1-inch, 2.4 µm | ~5,500 | 0.28× | 8.6 µm | 2.9 px | passes |
The object pixel column is pixel size ÷ magnification, and the pixel rule for defect detection explains the 3-pixel convention in full. Sensor widths here are the standard active widths for each optical format: 13.2 mm for 1-inch, 14.1 mm for 1.1-inch, 7.2 mm for 1/1.8-inch.
What magnification does the field need at 100 mm?
Magnification is sensor width divided by field width: 13.2 mm ÷ 47 mm gives 0.28× on a 1-inch sensor, 0.30× on 1.1-inch, and only 0.15× on 1/1.8-inch — which is why the small sensors struggle first.
At a 100 mm working distance the 1-inch build needs f ≈ 100 × 0.28 ÷ 1.28 ≈ 22 mm; the 1.1-inch build about 23 mm; the 1/1.8-inch build about 13 mm. Mind the trap in the table above: a 12 mm board lens does put the field at roughly 90 mm on a 1/1.8-inch sensor, so the geometry passes while the 5 MP sensor behind it fails the pixel count. Geometry without pixels solves nothing.
The blister inspection working distance and field of view formula runs the same arithmetic on another close-range part, and calculating object space pixel size from magnification formalizes the pixel conversion. A lens that refuses the distance entirely is hitting its minimum object distance; lens focuses only at close distance: diagnose focus range covers that case. The same focal length also changes field when the sensor changes — same lens on a different sensor: how HFOV changes.
What aperture resolves 25 microns at that magnification?
At 0.28×, f/4 puts about 12 µm of diffraction blur on the object — half the 25 µm feature and a 2× margin; f/8 puts 24 µm on it, which leaves no margin at all.
Diffraction sets the floor once the iris closes. For an imaging lens at magnification m and f-number N, the working f-number is N_w = N × (1 + m) and the object-side blur estimate is d ≈ 1.22 × λ × N_w ÷ m, with λ = 0.55 µm for white light.
| Lens f-number | Working f-number | Object-side blur | Against 25 µm |
|---|---|---|---|
| f/2.8 | 3.6 | 8.6 µm | 2.9× margin |
| f/4 | 5.1 | 12.2 µm | 2.0× margin |
| f/5.6 | 7.2 | 17.2 µm | 1.5× margin |
| f/8 | 10.2 | 24.5 µm | ~1.0×, marginal |
| f/11 | 14.1 | 33.7 µm | fails |
In numerical-aperture terms the object-side NA is m ÷ (2 N_w) ≈ 0.027 at f/4, and the Abbe limit λ ÷ (2 NA) lands near 10 µm — the same verdict from the other direction. Treat both as diffraction estimates: a real lens adds aberrations, so f/5.6 is the last safe stop and the corners give up first. The reward for the fast aperture is light. Opening from f/8 to f/4 buys a 4× shorter exposure at equal brightness, and working f-number and magnification covers that trade, as does picking a lower f-number at the same focal length.
Why can't the stock module lens and motorized focus get there?
Because a motor-focus module is built for field coverage, not resolution: focused down to 100 mm its effective aperture typically sits far slower than f/4, and no amount of focus travel changes that.
A focus motor slides the lens along a short screw thread — a few millimetres of travel in total — so it re-centers the blur circle but cannot touch the aperture, the numerical aperture or the pixel size behind it. M12 lens thread travel: why short threads lock out close focus explains why that same short travel often blocks 100 mm in the first place.
Two more limits stack on top. The stock lens is corrected for its nominal field, not for macro distances, so aberrations rise as it focuses down and the corners suffer first. And a higher megapixel count on the same small sensor does not rescue it: the pixel table above already counted across the field, and the aperture table still sets the blur. Replacing the optics means running the same two calculations for the module's own sensor — the M12 board lenses category is where that search starts — and a sealed module rarely makes the swap a supported one.
Which camera and lens combination covers the field at about 100 mm?
The passing build is a 20 MP, 1-inch color camera with a 22 mm-class lens run at f/4 to f/5.6: 8.6 µm object pixels, about 12 µm of diffraction blur, and a 2× margin on the 25 µm feature.
For the camera, the catalog's match is the MV-CS200-10GC, a 20 MP, 1-inch color area scan camera on GigE with a rolling shutter: the pixel count that clears 5,640 across the field, in color, on an interface that carries a full-resolution stream over one cable. The filter sits still during capture, so a rolling shutter costs nothing here.
- Sensor format
- 1"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- 16-25 MP
For the lens, order a 22 mm-class machine vision lens whose image circle covers the 16 mm diagonal of the 1-inch sensor and whose iris reaches f/4. The machine vision lenses finder filters by focal length and image circle, and the lens step of the configurator narrows the rest. One in-catalog example of the same idea, a format up, is the LS-FFL-0567, a 16 mm, 1.1-inch, 20 MP lens with F2.8-22 aperture and under 0.3% distortion.
- Type
- Machine vision fixed
- Sensor format
- 1.1"
- Mount
- C-mount
- Resolution
- 16-25 MP
A 16 mm lens on a 1.1-inch sensor covers the same field at about 70 mm working distance — 16 × 1.30 ÷ 0.30 ≈ 70 mm — with its F2.8 end a full stop faster than the f/4 the table asks for. If the stand-off must grow instead, pick by magnification: the LS-TCL-0574 is a 0.4× fixed-magnification lens with 227 mm WD covering a 1.2-inch sensor.
- Sensor format
- 1.2"
- Mount
- C-mount
- Image circle
- 16-22 mm
At 0.4× a 1-inch sensor's field narrows to 33 mm, so that route suits a sub-region, a longer stand-off on a larger sensor, or gauging-grade accuracy — macro lens for machine vision: choose by magnification and when you need a telecentric lens for gauging cover the two branches.
Before ordering, tick four boxes:
- Image circle: the lens circle covers the sensor diagonal, 16 mm on the 1-inch build; catalog filters list image circles up to 90 mm.
- Aperture: the iris reaches f/4 or faster and locks so it cannot drift after setup — lens locking screws: focus, aperture and enclosure clearance.
- Mount: a C-mount lens on a C-mount camera keeps the flange distance honest; camera lens adapter focus: check fit and flange distance covers adapters and spacers.
- Illumination: even, white, diffuse light over the membrane, with the exposure budget you just gained from the faster aperture.
When does a smaller field beat a bigger camera?
If the analysis only needs a 24 mm-wide strip of the filter, halving the field doubles the magnification and the 12 MP camera becomes a passing build: at 0.59× the object pixel falls to 5.9 µm and a 25 µm feature spans 4.3 pixels.
Every requirement relaxes as the field shrinks — pixels per feature rise, and the diffraction estimate improves because the blur scales with 1/m. Two stage positions can beat one larger sensor on cost and cycle time. The reverse holds just as firmly: no crop, resize or sharpening step adds detail after capture, because pixels per feature were fixed by the optics at the moment of exposure. Instrument choice follows the same logic at other scales; why a 1 mm optical distance sensor cannot resolve 20-50 micron sheets makes the point for distance sensors.
How do you prove the build resolves 25 microns before it ships?
Image a calibrated resolution target carrying 25 µm line groups in the part plane, run it at f/4, and require clean line separation at center and corners; on the 20 MP build each 25 µm line should span about 3 pixels.
- Place the target in the part plane at the 100 mm working distance, level within the depth of field you accepted.
- Set f/4, then set exposure so the brightest lines sit near 70-80% of full scale with no clipping.
- Focus once at the sensor center and lock the mechanism; the M12 lens focusing routine — adjust, check corners, lock — applies to any manual lens.
- Sample one pixel row across the 25 µm group: bright and dark lines must alternate around mid-gray with roughly 3 pixels per line.
- Repeat at the center and two corners; corners tolerate some contrast loss, but the line spacing must stay resolved.
- Keep the profiles and the target for an annual recheck; slow focus drift with temperature is the usual long-term failure — see camera focus drift with temperature: diagnose daytime blur.
The pass criterion is line modulation, (max − min) ÷ (max + min), at 0.3 or better with every sharpening control off. The decision, one line per case: 20 MP 1-inch with 22 mm at f/4 passes at 100 mm; 12 MP 1.1-inch with 16 mm detects only at the full field and passes at a 24 mm strip; any module-class optics at f/8 to f/11 fail at 25 µm regardless of focus. Order the camera and lens, run the target test at f/4, then lock the focus and the iris.
Questions
Why do the 250 µm target lines look sharp while the 25 µm lines stay soft?
That split is the signature of a resolution ceiling, not a focus error. A misfocused lens blurs every feature size together, while optics at their limit pass coarse structure and lose contrast on fine structure. If the 250 µm group is crisp at the same focus setting, focus is already right, and the remaining softness is the object-side resolution of the optics — which only aperture, magnification or a better-corrected lens can change.
Can extension rings bring a standard lens to a 100 mm working distance?
Approximately, yes: extension e past infinity focus gives magnification m ≈ e ÷ f, so a 7 mm ring on a 25 mm lens lands near 0.28×. The costs are real: working distance collapses, light on the sensor drops by (1 + m)² — about 0.7 stop at 0.28× — and ordinary lenses are corrected for their nominal range, so run the target test before trusting the corners.
How much depth of field does the f/4 setting leave for a curved filter?
Estimate object-side depth of field as 2 × N_w × pixel ÷ m². At 0.28×, f/4 (N_w = 5.1) and 2.4 µm pixels, allowing one pixel of blur: 2 × 5.1 × 2.4 µm ÷ 0.079 ≈ 0.31 mm total, or about ±0.16 mm around best focus. A membrane warped more than that drifts features out of the resolution the aperture table promises; flatten the part, level the stage, or stop toward f/5.6 at most.
Does a color sensor cost resolution compared with mono at the same pixel count?
A little. A Bayer sensor samples green with half the pixels in each direction and interpolates the rest, so fine colored detail carries slightly less contrast than mono. The 3-pixel plan absorbs most of that loss. If color is only needed to classify particles after detection, a mono camera at the same pixel count gives crisper geometry; if color drives the detection itself, stay with color and keep the 3-pixel margin.
What exposure change comes with moving from f/8 to f/4 at 0.28×?
Two stops faster, so the sensor needs about a quarter of the exposure time for the same brightness — plus the (1 + m)² = 1.6× loss from magnification itself, so call it 6× shorter overall. In practice that is the difference between a clean color exposure under diffuse white light and one that forces high gain, which adds noise exactly where you are counting on 3-pixel edges.


