Optical coherence tomography (OCT) images can provide quantitative measurements of the eye’s entire anterior segment. A new technique founded on a newly proposed level set-based shape prior segmentation model has been developed for automatic segmentation of the cornea’s anterior and posterior boundaries. This technique comprises three major steps: removal of regions containing irrelevant structures and artifacts, estimation of the cornea’s location using a thresholding technique, and application of the new level set-based shape prior segmentation model to improve segmentation. The performance of our technique is compared to previously developed methods for analysis of the cornea in 33 OCT images of normal eyes, whereby manual annotations are used as a reference standard. The new technique achieves much improved concordance than previous methods, with a mean Dice’s similarity coefficient of . This demonstrates the technique’s potential to provide accurate and reliable measurements of the anterior segment geometry, which is important for many applications, including the construction of representative numerical simulations of the eye’s mechanical behavior.