Performance of the image processing algorithms depends mostly on the quality of the image taken. An autofocus algorithm is developed to keep the images sharp, by searching for the maximum contrast position starting from Z home. This search is first done in coarse steps to find the best focus position, and then searches in finer steps in the vicinity of the position found from coarser steps to find the best focus position.
While doing prescan at 10X magnification, instead of going to Z home for focusing each image, an alternative focusadjust routine is used which searches for the best focus position in the vicinity of previous position. So, for the first image during pre scan, the best focus position is found using autofocus routine. The rest of the images are focused using focusadjust routine. User can select how frequently he wants to use the focusadjust routine. While doing metaphase capture scan at 100X magnification, autofocus routine is called for each image taken.
It takes around 2 to 3 seconds to focus on an image using autofocus routine, and 1 second to focus during prescan using focusadjust routine.