As magnification increases, depth of field disappears. There is no magic solution. You either accept blur, reduce throughput, or use computational techniques.


The problem
High magnification creates an extremely small depth of field, while real parts have:
- Part warpage
- Height variation
- Focus drift over time
Approaches tried
- Closing the aperture (loses light and resolution).
- Increasing illumination (helps, but only so far).
- Accepting blur (sometimes acceptable, often not).
- Focus stacking - capture multiple images at different focus positions and combine the sharp regions into a single image.
Lessons learned
Focus stacking is never purely an imaging problem. Success depends on:
- Stable mechanics
- Precise, repeatable motion
- Good software
- Enough processing power and storage throughput
Most discussions focus only on optics. That is usually a mistake.