Focus variation is a method used to sharpen images and to measure surface irregularities by means of optics with limited depth of field.