A system and method for determining an optimal position of an eye relative to an ophthalmic device are disclosed. One embodiment of the method includes receiving data comprising an image of a surface of an eye with the eye at a first position relative to an ophthalmic device. An edge feature in the image is located, and a sharpness calculation on the edge feature is performed using a predetermined algorithm to yield a sharpness value. The eye surface is then adjusted to a second position relative to the ophthalmic device, and the previous steps are repeated until the sharpness value is maximized, which is an indication that an optimal eye position has been achieved. An embodiment of the system includes a processor and a software package executable by the processor, the software package adapted to perform the calculations as above. Means are also provided for adjusting the eye surface to a second position relative to the ophthalmic device.