This paper presents a novel automated system that denoises and segments seven sub-retinal layers in optical coherence tomography (OCT) images. First, the OCT images are subjected to Wiener deconvolution by varying the noise variance from 10-1 to 10-15. A new Fourier-domain structural error is introduced in this paper, and the deconvolved OCT image with the least structural error is selected as the denoised image. The properties of the structural error metric are studied, and it is shown that the error metric satisfies convexity property. For each image, the proposed denoising method increases the image SNR by 6.9 dB on average compared to 5 dB increase reported so far, and attains a mean peak SNR (PSNR) of 23.036 dB. Next, highpass filters are applied to the denoised images in an iterative manner to extract the seven sub-retinal layers. The proposed system requires on average 10.65 seconds for denoising an image and 22.07 seconds for segmenting seven sub-retinal layers. This is a significant improvement over manual segmentation that requires up to 12 minutes per image.