A sharp preview can confirm framing while saying nothing about focus tolerance. This matters when you are selecting a lens for parts with raised features, variable presentation height, or several inspection planes. A geometric scene renderer may place every surface sharply, even when the corresponding physical setup would produce substantial defocus. You need to establish what the software models before using its images to choose hardware. Start by separating coverage from sharpness, estimate the acceptable object-depth range, and then verify that range with captured images.
What a sharp preview actually proves
A depth of field simulation is useful only when its optical assumptions match the decision you need to make. Field-of-view calculations primarily answer which area reaches the sensor. Depth-of-field calculations ask how far an object can move from the focused plane before blur becomes unacceptable.
Those are different questions. A renderer can calculate perspective and image scale without calculating how an out-of-focus point spreads across neighboring pixels.
| Preview behavior | What it can support | What remains unproven |
|---|---|---|
| Object size changes with distance | Framing and perspective planning | Defocus at the new distance |
| Aperture changes brightness | Exposure-related behavior | Aperture-dependent sharpness |
| Focus distance changes edge blur | Some defocus modeling | Agreement with the physical lens |
| Blur increases away from a focused plane | Qualitative depth sensitivity | Inspection-specific usable depth |
| Distortion or dark corners appear | Those particular modeled effects | Accurate depth of field |
A visually attractive image is not an acceptance test. Even a physically based renderer needs an appropriate lens model, aperture, focus setting, and image sampling method.
For dimensional work, the separate limits described in telecentric depth-of-field validation also matter: an edge can look recognizable while its measured position is no longer acceptable.
Check which optical controls affect the output
Use a controlled test scene rather than judging a complex assembly. Include a slanted surface or several high-contrast targets at different distances. Keep lighting, display scaling, and image processing unchanged throughout the comparison.
- Find the model description. Look for explicit treatment of aperture, focus distance, defocus, sensor sampling, and lens aberrations. Missing documentation means uncertainty, not evidence of a particular default aperture.
- Change aperture while holding focus fixed. Compare, for example, f/2.8 and f/8 if the model permits them. Choose target depths where the predicted defocus difference should be visible.
- Change focus distance without moving the scene. A model that handles defocus should move the region of highest sharpness through the scene.
- Move a target while leaving focus unchanged. Inspect edge profiles at native image resolution, not just the preview window.
- Separate optical changes from display changes. Resizing, sharpening, and automatic contrast can disguise differences in the generated image.
Some tools automatically refocus when an object moves. Others may treat a focus-distance control as a framing input. Check the documented meaning of each control before interpreting its behavior.
Estimate depth of field from an explicit blur allowance
Depth of field is not a sharply bounded region where every detail is perfectly focused. It is the range accepted under a chosen sharpness criterion. A practical starting point is an allowable blur-circle diameter at the sensor.
For a thin-lens approximation with unity pupil magnification, small defocus, and approximately symmetric near and far limits:
Use the same length unit for pixel pitch, blur diameter, and the resulting depth range. Magnification and f-number are dimensionless.
This approximation explains several useful trends. Increasing the f-number increases geometric depth of field. Increasing magnification reduces it strongly. Accepting a larger blur circle also increases the calculated range, but sacrifices fine detail.
The formula is a planning estimate, not a universal lens specification. It becomes less suitable when near and far limits are strongly asymmetric or the actual lens differs substantially from the assumed pupil geometry.
Use the object-space sampling calculation to connect pixel pitch and magnification to the feature you need to inspect. A blur allowance that suits presence detection may be unsuitable for locating an edge precisely.
Worked example: a depth range that depends on the criterion
Consider a hypothetical sensor with a 3.5 µm pixel pitch, operating at 0.10× magnification and f/4. These are example inputs, not specifications assigned to a catalog product.
First choose a sensor-plane blur allowance of 2 pixels:
Under the symmetric approximation, that suggests roughly 3.1 mm on either side of the focused plane. It does not establish a guaranteed tolerance for an inspection algorithm.
Now tighten the allowance to 1 pixel. The permitted blur diameter halves, so the estimated total depth becomes approximately 3.1 mm. Nothing changed mechanically; only the acceptance criterion changed.
The sampling scale provides another useful check:
A 2-pixel blur diameter is significant relative to a feature spanning only 6 pixels. The feature may remain visible while its width, contrast, or measured position becomes unreliable.
For a sampling decision rather than an optical tolerance estimate, use camera resolution for dimensional inspection. Pixel coverage and focus tolerance must both support the measurement.
Why stopping down eventually stops helping
Changing the example from f/4 to f/8 doubles its estimated geometric depth of field to about 12.3 mm. That does not mean every inspected feature becomes sharper throughout that range.
A smaller aperture increases diffraction blur and reduces the light reaching the sensor. Depending on illumination and motion, the exposure adjustment may introduce another source of lost detail.
For a diffraction-limited circular aperture, the approximate Airy-disk diameter to the first dark ring is:
The effective-f-number expression again assumes unity pupil magnification. Using a wavelength of 0.55 µm and the example magnification gives:
- At f/4: effective f-number ≈ 4.4, so Airy diameter ≈ 5.9 µm.
- At f/8: effective f-number ≈ 8.8, so Airy diameter ≈ 11.8 µm.
These are diffraction estimates, not predictions of the complete image. The Airy diameter and a geometric blur-circle allowance describe different blur distributions. Do not simply add them or treat them as interchangeable acceptance limits.
Actual performance also depends on aberrations, wavelength, contrast, sampling, and processing. The discussion of small pixels and usable detail explains why more pixels alone cannot restore contrast lost optically.
Choose hardware around the missing information
Start with machine vision lenses and use the lens finder to narrow focal length, sensor coverage, and mount. Then check the information a preview cannot supply: working-distance range, aperture provision, optical performance, and focus stability.
The LS-FFL-0567 lists a 16 mm focal length and F2.8-22 aperture range. It is a candidate to investigate when aperture selection is part of the planning exercise, not proof that a particular depth range will pass inspection.
- Type
- Machine vision fixed
- Sensor format
- 1.1"
- Mount
- C-mount
- Resolution
- 16-25 MP
For area scan cameras, use the camera finder to identify candidates, then obtain the sensor dimensions and pixel pitch needed for your calculation.
The LS-CMR-0166 provides 4000 × 3000 resolution over USB3. Confirm its pixel pitch and mechanical compatibility before combining it with a lens or applying the example calculation.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
Do not substitute a sensor's nominal format designation for its measured active width or pixel pitch. The calculation needs physical dimensions, and the lens must cover the active sensor area you intend to use.
Use calibration-target coverage margins when planning framing. Leaving room for presentation variation is separate from allowing enough depth for focus variation.
Validate usable depth with physical images
Build a depth sweep around the intended focus plane. Use representative surface finishes and real inspection features, rather than a target that is easier to image than production parts.
For a predicted total range near 6 mm, an initial sweep might cover 10 mm in 1 mm increments. Follow with smaller increments around the first failing positions. These are test-planning values, not required settings for a particular product.
Keep aperture, exposure, gain, illumination, processing, and focus fixed during each sweep. Record the actual target displacement and retain the original images.
Evaluate three things at every position:
- Image contrast: does the relevant feature remain distinguishable from its surroundings?
- Measurement behavior: does edge position, reported width, or another measured value remain within the application tolerance?
- Decision behavior: do representative acceptable and defective parts still receive the correct classification?
A sharpness score can help organize the sweep, but it is not a substitute for inspection performance. Use a consistent region of interest and the guidance on selecting a reliable focus metric.
Repeat the sweep after the equipment reaches its normal operating condition. If the best-focus plane shifts during operation, investigate temperature-related focus drift rather than treating it as ordinary part-height variation.
When the usual depth-of-field estimate is wrong
A tilted or deep object does not have one representative distance. Measure the closest and farthest critical surfaces. A background surface may be irrelevant, while a small raised inspection feature determines the required range.
Telecentricity does not remove focus limits. Reduced perspective variation and sufficient sharpness are separate requirements. Use the actual lens data and measurement validation rather than assuming constant image scale means constant image quality.
Motion blur is not defocus. If an image becomes softer only during movement, changing aperture may not address the cause. Separate stationary and moving captures before changing the optical design.
Digital sharpening does not recover missing evidence. It may improve apparent edge contrast while changing edge location or amplifying noise. Validate using the production processing settings.
Multiple inspection planes may require another arrangement. Repositioning the camera, reducing magnification, changing the view, or using separate acquisitions can be more effective than stopping down further. Focus stacking requires suitable scene stability and should not be assumed to work on moving parts.
Checks before committing to a setup
Use this short checklist to turn the simulation into a documented planning tool:
- Record whether the preview models defocus or only framing.
- Record aperture and focus assumptions; leave neither as an unexplained default.
- Establish minimum feature size, required contrast, and measurement tolerance.
- Calculate magnification and object-space sampling from physical dimensions.
- State the blur allowance used in the depth estimate.
- Include part-height variation, tilt, and focus-position uncertainty in the required range.
- Check diffraction and exposure before selecting a smaller aperture.
- Validate the full depth range with representative physical images.
- Confirm mount, coverage, working distance, and access to adjustment controls before ordering.
Once these inputs are defined, start the lens configuration workflow. If a lens model or simulation leaves an assumption unresolved, send the required field of view, object-depth range, and acceptance criterion through application support before committing to hardware.
Questions
Does a sharp simulated image prove the object will be in focus?
Not necessarily. A preview may calculate framing and perspective without modeling defocus. Check its documentation and test whether changing aperture, focus distance, and target depth changes edge blur. Until that behavior is established, use the preview for coverage planning rather than as evidence of focus tolerance.
Which inputs are needed for a depth-of-field estimate?
Start with magnification, lens f-number, and an acceptable sensor-plane blur diameter. Pixel pitch helps express that allowance in pixels. The estimate also needs stated optical assumptions; actual lens pupil geometry, aberrations, diffraction, and the inspection criterion can change the usable range.
Should the acceptable blur diameter be one pixel or two?
There is no universal choice. A larger blur allowance may be adequate for coarse presence detection but unsuitable for precise edge measurement. Relate the allowance to feature size and sampling, then test representative acceptable and defective parts throughout the required depth range.
Why not use the smallest aperture available?
Stopping down increases geometric depth of field, but also increases diffraction and reduces available light. Longer exposure can introduce motion blur. Compare inspection performance across aperture settings rather than choosing the smallest opening solely because a geometric calculation predicts more depth.
How can a simulation be checked against a physical setup?
Compare representative captures across a measured depth sweep using the same aperture, focus, exposure, and processing settings assumed in the model. Judge feature contrast and inspection accuracy, not just visual similarity. Agreement at the focused plane alone does not validate the predicted depth range.

