Patent ID: 8000526

Claim:
A method for correcting a defect in a digital image containing an eye, the method comprising: converting the digital image into an intensity image, identifying a group of pixels containing an eye region within the intensity image; segmenting the group of pixels containing the eye region of the intensity image into segments each having a local intensity extremum, thresholding a corresponding portion of the digital image to identify at least two regions of relatively extreme intensity, including a pupil and one or both of an iris or an eyelid; selecting a region from the at least two regions identified in the thresholding step having the most extreme average intensity, and identifying segments from the segmenting step intersecting the region selected at selecting step according to a pre-determined criterion, and wherein the thresholding step uses a threshold obtained by identifying the most extreme intensity pixel inside the intensity image, computing the average intensity of the pixels inside a smaller rectangle centered on the most extreme intensity pixel, and assigning the threshold to the sum of the average intensity and a fixed quantity.