Fundus images have been extensively used to detect abnormal eye conditions such as diabetic retinopathy. For example, in , Kar et al. provided an approach to detect neovascularization and in , Tan et al. presented an approach for detecting lesions that lead to diabetic retinopathy. Other examples include the work described in  which addressed the Age-related Macular Degeneration (AMD) condition by examining the anatomy of fundus images and the work in  by Prakash et al. extracting the macula in order to detect diabetes. Also, the work in  discussed an approach for detecting glaucoma. Such works, which are aimed at detecting eye diseases from fundus images, are performed by using retinography-captured fundus images where the retina location and size are more or less the same and the contrast is uniform. As a result, the detection process is rather straightforward.
The use of mobile devices in ophthalmology has been growing and several works have been reported in the literature for capturing fundus images using mobile devices. Optical lenses have been introduced to capture the retina via smartphones. Examples of these lenses are the condenser lens , the Welch Allyn Panoptic Ophthalmo-Scope , and the DEC200 portable fundus camera . D-EYE is another optical lens that is designed to be snapped onto a smartphone in order to capture fundus images , see Fig. 1(a). In this work, this lens is used to capture fundus images.
There are several differences between retinography-captured and smartphone-captured fundus images. First, there exists a non-uniformity of fundus distances when using a smartphone, thus leading to different sizes and locations of the retina, two such images are shown in Fig. 1. Second, the projection angle does not remain stationary which causes a lack of brightness and a non-balanced contrast. Third, any motion between the D-EYE lens and a subject’s eye causes a blur in fundus images. Finally, the spacing between the D-EYE lens and the pupil generates a light leakage which produces noise in fundus images. Hence, in general, the image quality is lower when using smartphones as compared to retinography.
This paper presents a computationally efficient image processing pipeline in order to: (i) detect the retina area in smartphone-captured fundus images, and (ii) and enhance the retina area for eye examination purposes. The rest of the paper is organized as follows. In Section II, we describe the developed image processing pipeline for detecting and enhancing the retina area in smartphone-captured fundus images. The experimental results are presented in Section III, followed by the conclusion in Section IV.
II. RETINA DETECTION AND ENHANCEMENT IN SMARTPHONE-CAPTURED FUNDUS IMAGES
The initial component of the pipeline consists of enhancing the retina by deblurring of a smartphone-captured fundus image. We have used the image deblurring approach in   based on the denoising equation
where O(x, y) denotes the observed image made up of the convolution of the original image I(x, y) with the degradation function H(x, y) and N(x, y) denotes noise. The function H(x, y), called the Point Spread Function (PSF), is given by  
where L represents the blur length and θ the blur angle. Restoring the image from its blurred version is achieved by deconvolution. Once L and θ are estimated, a deblurred image is generated by using either Richardson–Lucy (RL) deconvolution or by Wiener filtering.
The next component of the pipeline involves contrast balancing. Several works have previously addressed this problem. In this work, we have used the approach discussed in  for contrast balancing which is found here to be an effective way to achieve contrast balancing of smartphone-captured fundus images.
The next component consists of extracting the retina area irrespective of its size and location. Since the retina has a circular shape, the circular Hough transform is employed here in order to detect circular patterns. A radius range is imposed to avoid other round objects such as the optic disk from getting detected. The entire image processing pipeline is illustrated in Fig. 2.
There are two kinds of deconvolution: non-blind and blind. The first kind of deconvolution uses a known PSF to provide a restored image by reversing the convolution operation. The second kind involves not knowing the PSF. This requires estimating the length and angle parameters of the blurring process. The parameter estimation can be achieved either by using an image set or from a single image.
Due to the handheld aspect of smartphone-captured fundus images, we have considered the estimation from a single image as outlined in  by Dobes et al., where the PSF parameters are estimated in the frequency domain. This is done by considering the fact that edges would appear blurred and as a result the frequency domain of the image gradient exhibit a sinusoidal wave and the power spectrum appears as parallel stripes where the wave width corresponds to the length of the motion blur, and the direction of the blur is perpendicular to the wave direction. The steps involved in the deblurring and the denoising process are shown in Fig. 3. The power spectrum is computed via taking Fast Fourier Transform (FFT). The Butterworth filtering shown in this figure is applied in order to remove the high frequency noise.
Next, Radon Transform (RT) is applied along different angles and the mean vector of each RT projection is obtained. Thereafter, the mean vector having the highest difference between the largest and the smallest values is identified. Noting that the corresponding angle is perpendicular to the blur angle θ, the width of its centered valley D is identified. For a fundus image with a resolution of M×M, the blur length L becomes equal to 2×M/D. Once the blur parameters are obtained, a Wiener deconvolution filter is applied to provide the deblurred fundus image.
The retina and its background have similar contrasts in smartphone-captured fundus images and the pixels appear with high and low contrast. Thus, a regular histogram equalization is not adequate to rectify this contrast problem. Since retina texture is not uniform and changes as moving away from the optic nerve head, the contrast is rectified by using sub-images. We have used the Contrast Limited Adaptive Histogram Equalization (CLAHE) described in  that operate on sub-images. This equalization is applied to the green component to match the contrast in a fundus image. Using an average size of retina in a smartphone-captured fundus image, the CLAHE equalization divides the image into M×N blocks or sub-images, and enhances the contrast in each block separately. Our experiments have shown that the block size of M=N=12 provides an effective contrast correction in smartphone-captured fundus images.
Furthermore, when the retina is not centered, some background structure may get leaked into the blocks or sub-images. Therefore, a clip limit parameter of 0.2 is imposed to avoid this in such blocks or sub-images. As a result, the CLAHE equalization allows distinguishing the retina area from the background area.
III. EXPERIMENTAL RESULTS
The developed pipeline was evaluated using the publicly available online database in . This database consists of 14 smartphone-captured fundus images captured via the D-EYE lens. The resolution of the images is 1200×1200. The image processing pipeline was applied to these smartphone-captured images on a desktop with the programming done in MATLAB. The desktop had an i5 processor running at 3.3GHz with 8GB of RAM.
Fig. 4(a) shows an example of a smartphone-captured fundus image via the D-EYE lens while Fig. 4(b) shows its enhanced version after deconvolution. As shown in this figure, the blood vessels can be clearly seen and the improvement in the image quality allows the detection of the lesions. The equalized image done by CLAHE is shown in Fig. 4(c). Fig. 4(d) shows the circle generated by the circular Hough transform. Finally, Fig. 4(e) displays the final image where the retina is displayed by separating it from the background.
The first experiment consisted of measuring the Euclidean distance D between the detected retina center position Pauto and the ground truth retina center Preal, and formulating this distance in terms of the fundus radius R, as proposed in . The ground truth retina centers were identified by an ophthalmologist specialist. The performance for the location ratio with D less than 1R, 1/2 R and 1/4 R were found to be 92.8%, 85.7% and 78.5%, respectively.
The second experiment involved evaluating the processing time of the pipeline running for different smartphone-captured images through the D-EYE lens. The results of this experiment are displayed in Fig.5. The average processing time per image was found to be 0.85s, which makes the processing pipeline practical to use in eye examination.
In this paper, a computationally efficient image processing pipeline has been developed in order to detect and enhance the retina area in fundus images that are captured by smartphones through a D-EYE lens. It is shown that it takes 1 second to process a typical fundus image captured in this manner. This work enables the retina examination of the eye to be performed easily by merely using a smartphone and a lens which is snapped onto the smartphone in front of its camera. This solution provides a cost-effective way to examine retina abnormalities such as diabetic retinopathy.