Spectral domain optical coherence tomography (SD-OCT) is used for cross-section imaging, in ophthalmology for retinal tissue. Extracting structural information about the retinal layers is becoming increasingly important, as this has the potential to expand retinal disease research and improve diagnosis. The purpose of our study was to facilitate a robust and efficient algorithm for segmentation of peripapillary retinal Spectralis SD-OCT images. The approach utilized median filtering for pre-processing and curve fitting-based regularisation for layer segmentation. For evaluating the methodology 40 SD-OCT images were used. To quantify the algorithmic performance, the resulting segmentation was compared against manual segmentation. Comparing the error in automatic segmentation with inter-rater variability showed no significant difference. This shows that segmentation for retinal images can achieve high precision. However, there is no doubt that existing algorithms do not work well on all pathologies and automatic segmentation will likely never replace the ophthalmologist.