Glaucoma is a group of eye conditions, which can seriously damage optic nerves because of an elevated intraocular pressure. Nowadays, glaucoma has become one of the principal causes of blindness that results in irreversible visual loss. Early screening and treatment of glaucoma can prevent further progression of optic nerve degeneration effectively. e vertical cup-to-disc ratio (CDR) is a commonly used measurement for the detection of glaucoma, and therefore accurate segmentation of optic disc (OD) and optic cup (OC) regions in retinal fundus images is of great significance. In this paper, we present a prior shape constraintbased two-layer level set method for OD and OC segmentation in fundus images. is method uses two different layers of one level set function to represent the OD and OC boundaries. In this method, the distance regularized term is designed to guarantee that the distance between the OD and OC varies smoothly. By introducing the prior shape constraint term energy, the final segmentation results of OD and OC are always in the shape of approximate ellipses. In addition, the proposed method has the property of dealing with the intensity inhomogeneity of fundus images through the local fitting energy embedded. Experiments on images from the Baidu Research database demonstrate that the proposed method has superior performance in terms of accuracy and effectiveness.