Focus stacking is a multi-shot technique that creates single images with an extended range of focus from a collection of images with more shallow focus. The technique can be applied to any scene, but it finds greatest application with high magnification setups because the optical depth of focus in those applications is very narrow.
For large scenes, the source images can be acquired by focusing on just a few different points. With more flexible equipment, the Scheimpflug technique can be used to reduce the total number of required images.
Small objects will requre many source frames produced my moving the camera between exposures (13 for the micrometer).