A method for capturing an image of an eye having an iris, including the steps of determining a plurality of measurement origins in the image; detecting an edge of the iris; determining a distance from each measurement origin to the edge of the iris; and, outputting a final image when each of the determined distances is equal to respective one of a plurality of predetermined lengths. A computer-readable medium containing computer-executable instructions for causing a computer to perform the above-described method is also described. An apparatus having an image sensor and a processor for performing the method is also described.