Purpose: Fluorescence imaging is a valuable tool for studying tear film dynamics and corneal staining. Automating the quantification of fluorescence images is a challenging necessary step for making connections to mathematical models. A significant part of the challenge is identifying the region of interest, specifically the cornea, for collected data with widely varying characteristics. Methods: The gradient of pixel intensity at the cornea– sclera limbus is used as the objective of standard optimization to find a circle that best represents the cornea. Results of the optimization in one image are used as initial conditions in the next image of a sequence. Additional initial conditions are chosen heuristically. The algorithm is coded in open-source software. Results: The algorithm was first applied to 514 videos of 26 normal subjects, for a total of over 87,000 images. Only in 12 of the videos does the standard deviation in the detected corneal radius exceed 1% of the image height, and only 3 exceeded 2%. The algorithm was applied to a sample of images from a second study with 142 dry-eye subjects. Significant staining was present in a substantial number of these images. Visual inspection and statistical analysis show good results for both normal and dry-eye images. Conclusion: The new algorithm is highly effective over a wide range of tear film and corneal staining images collected at different times and locations.