1. A method of performing adaptive optics correction of an eye, the method comprising the steps of: a. causing light to enter the eye; b. receiving a first image of the light emitted or reflected from the eye; c. computing a first image quality metric value for at least a portion of the first received image; d. using an optimization algorithm that is based on an image quality metric to adjust a first correcting element to increase the computed image quality metric value for at least a portion of subsequently received images of the eye; e. receiving a second image of the light emitted or reflected from the eye; f. computing a second image quality metric value for at least a portion of the second received image; and g. repeating steps a through f until a computed image quality metric value reaches a predefined value.