One way around this issue is to take several slices at different focus points ... You can move the camera or move the subject. Either way, you really only need one axis of motion, which makes ...
To focus stack effectively, it’s desirable to move the camera in very small increments of sub-mm precision, in order to get different parts of the subject in focus. For this, a CNC machine ...