Diabetic Retinopathy Detection Using Matlab
Diabetic Retinopathy Detection Using Matlab
Abstract: Diabetic Retinopathy (DR) has been considered to be the most menacing eye related disease which causes blindness or vision loss in
a long run. This disease, usually spread to people who are affected by diabetes. Thus detecting this disease at first place is mandatory.
Diagnosing to be done from medical images has been gaining importance in medical science. However, identifying abnormalities in retinal images
are difficult and challenging in medical field. Thus efficient computing methods has to be employed to facilitate the detection of DR from Retinal
images. Digital image processing is one such method where it has influence in medical field. In this paper, a DR detection technique, involving
digital image processing, has been developed by utilizing retinal image, where fundus image has been obtained from patient’s retina. Here, a
MATLAB based system has been utilized for analysing the fundus image that are captured via Peek retina attached on smartphone camera lens.
This proposed work aims at segmenting the fundus image into Exudates, Micro aneurysm, Optical Disk and haemorrhage and examine whether
the retinal condition is in Proliferative / Non-Proliferative DR stage. To achieve this, additionally, morphological methods such as erosion and
dilation have been utilized which enables the MATLAB base system to learn the pixel positioning pattern of the fundus images in order to detect
the factors associated with DR. Various performance measures has been utilized in validating the proposed technique. From those performance
analysis, we could observe 98% accuracy in detecting PDR and NPDR within 39 seconds (half minute). Though the attainment of accuracy is
relatively high, there are further possibilities in improving the detection rate of the system.
Index Terms: Diabetic Retinopathy (DR), Retinal Images, Fundus Image, Image Processing, MATLAB, PDR / NPDR stage, Deep Learning Based
AI method.
—————————— ——————————
2 RELATED WORKS
There are several methods that have been involved in
1230
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
detecting DR. However, in this research paper, few where ophthalmologists are not available. Sisodia, et al. [10]
methodologies like learning-based, feature-based, performed pre-processing of raw fundus images using green
classification-based, etc. approaches have been discussed. In channel extraction, image enhancement, histogram
recent days, deep learning has been gaining importance in equalization, and other resizing techniques. As processing of
various technical applications especially semantic based retinal images using machine learning algorithm were very
understanding and image recognition. Gargeya and Leng [4] tedious, this paper came up with robust pre-processing and
developed a robust automated identification approach based feature selection approach. Here, fourteen features were
on deep learning had been developed for detecting the DR. extracted for the purpose of quantitative based analysis. The
This methodology utilized the fundus image and further dataset utilized for performing experiments were Kaggle DR
classified them as healthy (no DR) and non-healthy. In this Dataset and the results were examined by means of mean
research work, the solutions were completely automated and and standard deviation. It had been observed that exudate
processed 1000s of diversified fundus images. This had been area is one of the primary features with best rank (mean
done in order to provide accurate DR detection and effectively difference 1029.7). Kim, et al. [11] developed a technique SD-
minimize the dependency for the resource based manual OCTA (Spectral-Domain - Optical Coherence Tomography
analysis over various clinical settings for further care. Morales, Angiography), in order to quantify the changes that are
et al. [5] developed a digital tool that is utilized for detecting happened in micro vascular density and morphology in DR. In
DR in retinal image using a technique called Gabor transform. addition to SD-OCTA, an intensity based optical micro-
As the symptoms of DR are asymptotic, it is very difficult in angiography algorithm had been utilized. The indices of the
detecting it in early stage. Though the retinography is morphology of the images and the micro-vascular density had
frequently taken, it has been in poor quality. Thus, a digital tool been calculated using a semi-automated software program.
had been implemented which in turn facilitate the The quantification used here are categorized as vessel density
ophthalmologist to provide better diagnosis from DR. This tool and skeleton density. On considering the vessel density, its
used an algorithm based on Gabor transform in MATLAB and morphology was in turn measured as Vessel Diameter Index
provided higher quality of retinography.[6] proposed a (VDI) and Fractal dimensions (FD). Deperlıoğlu and Köse
technique for segmenting retinal blood vessel using image [12] proposed a diagnosis mechanism using image processing
processing and data mining methodologies. It stated that, the and Convolutional Neural Network (CNN) to detect DR. For
retinal diseases could be identified in retinal vasculature of enhancing the fundus image, a method that had HSV,
those retinal images. As manual segmentation is a very histogram equalization and V transform algorithms had been
tedious process and time consuming, employing utilized. A Gaussian low-pass filter had been applied finally to
computational approaches provide better solution. In this the fundus image. In this paper, CNN had been utilized as a
research, image cropping, transformation, filtering, etc. had classification approach. 20 various experiments had been
been done in preprocessing. After feature extraction, k-means done to assess the performance of the proposed work at every
clustering approach had been executed in order to group the stage. Karami and Rabbani [13] presented a Dictionary based
vessel clusters from non-vessels. The final segmented image learning technique for automated detection of DR in retinal
is formed by joining the results from clustering and ensemble fundus images. This proposed method is completely based on
classification. [7] represented a novel automated detection best atomic based learned dictionaries by K-SVD algorithm.
system to detect DR and Diabetic Maculopathy in retinal But the K-SVD should possess the ability to discriminate the
fundus images by utilizing fuzzy based image processing diabetic form normal classes. Here, sparse representation is
techniques. This proposed system comprised of 4 parts utilized for classification approach, where the test image is
namely acquisition, preprocessing, feature extraction, and belonged to the class of minimum numbered best
classification. Additionally, a macular region localization atoms.Kumar and Kumar [14] presented a detection scheme
technique had been implemented for detecting Maculopathy. by extracting the area and the number of Micro-aneurysms
An online novel dataset collection had been represented which (MA) from retinal images. As detecting the MAs are tedious,
has expertise diagnosing process, and its collection. Also, a variety of methods had been proposed for detecting
comparative analysis had been presented where the proposed diagnosing it. Initially, green channel extraction, morphological
dataset had been compared with existing retinal fundi image process, histogram equalization had been used as pre-
databases for DR purposes.Canche, et al. [8] proposed an processing techniques. In order to detect Mas, PCA, Contrast
automation system for detecting hard exudates in DR images Limited Adaptive Histogram Equalization (CLAHE), average
with the standard confidence level which in turn could help the filtering had been utilized. DR has been classified by using
specialists in screening and diagnosing this disease. As these Linear SVM. Palavalasa and Sambaturu [15] suggested that
hard exudates are very common in occurrence, it is very screening of DR effectively must requires automation
essential to detect it in very early stage. This paper also methods. Thus a novel method had been proposed by this
provided an extensive analysis in feature based selection research where hard exudates are detected with maximum
methods. Ratanapakorn, et al. [9] proposed an image accuracy with respect to the level of lesion. Here, at initial
processing software for diagnosing the DR in fundus retinal stage, the possible candidate exudates had been detected
images. Here the feature extraction and severity classification using background subtraction technique. At the last stage, the
were performed by utilizing the MATLAB R2015a. Along with false exudate had been removed using de-correlation based
that, a GUI had been developed using MATLAB GUI toolbox. stretch methods. The algorithm is tested using DiaretDB
Here, a collection of 400 fundus images (where 379 – DR database, which has al ground truth images.There are certain
images, 21 – normal retinal images) had been used for therapies namely sutureless pars-plana vitrectomy and
interpretation. Thought the overall accuracy is 98%, the intravitreal medical therapy are employed in ophthalmic area.
accuracy of classifying PDR / NPDR is 66.58%. This paper Such treatments require capturing of fundus images using
concluded that, it might be a helpful tool in distant rural area fundus camera. Chorage and Khot [16] proposed a detection
1231
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
1232
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
intensity.
Image Preprocessing
Due to the wide scalable nature of the data sets and large
number of image sources, these images are often considered
Fig. 5. Vessel segmentation through green channel extraction
as the artifacts which are not diagnostically applicable. In
[21]
order to maintain the difficulties of these image variations and
to standardize the image, image preprocessing step has to be
The so called enhanced intensity features are developed by
followed. Initially, the images’ pixel values should be scaled to
using morphological operations. In order to extract the green
the value in the range of 0 to 1. Then these scaled images are
channel from the retinal image, several methods like erosion
downsized to a standardized resolution of 512 x 512 pixel
and dilation are utilized. Figure 5 represents the green channel
dimensions. This can be done by cropping the inner circle of
extraction of blood vessels. In morphological operations
the retina and placing it into a square. As scaling resizes the
dilation and erosion are used, where a collection of reference
digital image, it is considered to be the remarkable process in
retinal images have been provided to the detection system.
image processing technology. Upon considering the vector
When considering the training phase, the system usually
based graphical images, the basic image should be resized
detects the retinal image collections in order to learn a specific
using the geometrical alterations, without compromising the
image segment pattern. For example, the detection of
quality of the image. When considering Raster graphical
exudates requires a collection of reference images which
image, a robust fresh image should be generated with lower or
contains remarkable quantity of exudates. After the completion
higher quantity of pixels. If the number of pixels are scaled
of training, the detection system then compare the sample
down, then the image might lose its quality. Thus the scaling of
image with neural network algorithm from the training set and
image is important in maintaining the image quality. It will
it will detect the region of interest (ROI) of exudates in sample
enable the image segmentation by segmenting the retinal
retinal images. Finally, the segmented images are detected to
disorders of the given set of images. The screenshot of the
get whether they are MAs, Optic Discs, Exudates, and
software implementation of captured preprocessed image is
Hemorrhages. Figure 6 represents segmented retinal images.
depicted in fig. 4.
The morphological operations are explained below,
Dilation:
This process will add the pixels to the object’s boundaries in
an image. The output pixel value is considered to be the
highest value of all the given pixels in the neighborhood. This
operation makes the objects to be more visible and can fill in
small holes of the objects.
Erosion:
This operation will removes the pixels on the object
boundaries. Usually, the pixels that are added or eliminated
from the objects of an image depends in shape and size of the
structured element. In both the operations, the state of the
provided pixel of any output image is evaluated by
Fig. 4. Screenshot of captured preprocessed image applying the respective rule of the corresponding pixel along
with the neighbors in the input image.
1233
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
TABLE 2
APPROXIMATION OF DETECTION ACCURACY OF MAS
Accuracy = TP + TN / TP + TN + FP + FN (3)
TABLE 1
PERFORMANCE MEASURES AND ESTIMATED VALUES OF PROPOSED
SYSTEM
Performance Values ( % )
Measures From the table 3, the close approximation accuracy value of
Accuracy 98.25% detecting Exudates is 7.9, i.e. close to 80% accuracy. Here the
Sensitivity 98.2456% standard deviation is high (1.2), which in turn signifies that it
Specificity 99.9956% will have higher fluctuation between 70-80%.
Figure 7 depicts the final segmented detected region along Accuracy Detection of Hemorrhages:
with performance evaluation.
Figure 7: Performance evaluation of proposed method TABLE 4
APPROXIMATION OF DETECTION ACCURACY OF HEMORRHAGES
1234
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
TABLE 7
CORRELATION ANALYSIS OF DETECTION ACCURACY
MAs Exudates Haemorrhages Optical
Disc
From the table 5, the close approximation accuracy value of Exudates 0.50253 1 0.286269 0.63674
detecting Optical Disc is 7.8, i.e. close to 80% accuracy. Here 8
the standard deviation is low (1.3), which in turn signifies that it
will have fluctuation between 70 – 80%.IJSTR style is to not Haemorrha 0.39473 0.286269 1 0.446716
citations in individual brackets, followed by a comma, e.g. ―[1], ges 8
[5]‖ (as opposed to the more common ―[1, 5]‖ form.) Citation
Optical 0.59401 0.63674 0.446716 1
ranges should be formatted as follows: [1], [2], [3], [4] (as Disc 1
opposed to [1]-[4], which is not IJSTR style). When citing a
section in a book, please give the relevant page numbers [2]. In
sentences, refer simply to the reference number, as in [3]. Do not From the table 7, the correlation analysis has been estimated
use ―Ref. [3]‖ or ―reference [3]‖ At the beginning of a sentence use where the detection of exudates and optical disc has
the author names instead of ―Reference [3],‖ e.g., ―Smith and Smith remarkable association with MAs detection. When comparing
[3] show ... .‖ Please note that references will be formatted by the exudates with optical disc, the exudate is having higher
IJSTR production staff in the same order provided by the association with optical disc with the correlation coefficient
author. accuracy of 0.6. However, the optical disc and the hemorrhage
shares very low association with the optical disc.
6 COMPARATIVE ANALYSIS
The comparative analysis of the proposed system has been ANOVA:
evaluated using comparative measures such as accuracy ANOVA analysis is done for the proposed system, where the
between detected MAs, Exudates, Hemorrhage, and Optical p-value has been estimated. In order to have the low
Disc. The comparative analysis of those detected using mean probability error, the p-value should be low. The analyzed
and STD has been recorded in table 6. Figure 8 represents values have been recorded in table 8.
the comparative analysis of the detection accuracy.
TABLE 8
TABLE 6 ANOVA ANALYSIS
COMPARATIVE ANALYSIS OF DETECTION ACCURACY Co-eff STD T P- Lowe Uppe
error stat value r 95% r
95%
Intercept - 0.17 - 0. - 0.
0.24 5 1.3 1769 0.59 11
7
7 CONCLUSION
Fig. 8. Comparative analysis of the detection accuracy The Diabetic Retinopathy is regarded as the predominant optic
disease that leads to blindness. Diagnosis and detection at
From the graphical representation, it has been observed that early stage is vital for the patients. But the identification of
the detection of optical disc and exudates is way more retinal identification is really challenging for the
accurate than the hemorrhage and MAs. On the other hand, ophthalmologists. Several image processing based techniques
when comparing optical disc and exudates, the latter has the are employed for the DR detection. In this work, an
minimum STD which indicates the higher accuracy. identification technique was developed on the basis of digital
1235
IJSTR©2019
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 11, NOVEMBER 2019 ISSN 2277-8616
image processing to obtain the fundus image from the affected [10] D. S. Sisodia, S. Nair, and P. Khobragade, "Diabetic
retina. A MATLAB based analysis and classification of the retinal fundus images: preprocessing and feature
fundus into Exudates, Micro aneurysm, Optical Disk and extraction for early detection of diabetic retinopathy,"
hemorrhage was done. It also examine the proliferative and Biomedical and Pharmacology Journal, vol. 10, pp.
non-proliferative stage of DR. For the purpose, morphological 615-626, 2017.
operations such as erosion and dilation are implied for the [11] A. Y. Kim, Z. Chu, A. Shahidzadeh, R. K. Wang, C. A.
learning of fundus positioning pattern and detection of four eye Puliafito, and A. H. Kashani, "Quantifying
defects. Different performance analysis validates the proposed microvascular density and morphology in diabetic
mechanism and observed 98% accuracy in the detection of retinopathy using spectral-domain optical coherence
PDR and NPDR within a period of 39 seconds. In spite of the tomography angiography," Investigative
high accuracy achievement, further enhancement promotes ophthalmology & visual science, vol. 57, pp. OCT362-
the detection rate of the system. In addition to performance OCT370, 2016.
analysis, comparative analysis has been estimated where [12] Ö. Deperlıoğlu and U. Köse, "Diagnosis of Diabetic
detection accuracy of MAs, Exudates, Hemorrhages, Optical Retinopathy by Using Image Processing and
disc have been estimated. Moreover, ANOVA analysis has Convolutional Neural Network," in 2018 2nd
been done, where the p-value is 0.5 (lower probability error). International Symposium on Multidisciplinary Studies
and Innovative Technologies (ISMSIT), 2018, pp. 1-5.
REFERENCES [13] ] N. Karami and H. Rabbani, "A dictionary
[1] A. W. Stitt, T. M. Curtis, M. Chen, R. J. Medina, G. J. learning based method for detection of diabetic
McKay, A. Jenkins, et al., "The progress in retinopathy in color fundus images," in 2017 10th
understanding and treatment of diabetic retinopathy," Iranian Conference on Machine Vision and Image
Progress in retinal and eye research, vol. 51, pp. 156- Processing (MVIP), 2017, pp. 119-122.
186, 2016. [14] S. Kumar and B. Kumar, "Diabetic Retinopathy
[2] J. Campbell, M. Zhang, T. Hwang, S. Bailey, D. Detection by Extracting Area and Number of
Wilson, Y. Jia, et al., "Detailed vascular anatomy of Microaneurysm from Colour Fundus Image," in 2018
the human retina by projection-resolved optical 5th International Conference on Signal Processing
coherence tomography angiography," Scientific and Integrated Networks (SPIN), 2018, pp. 359-364.
reports, vol. 7, p. 42201, 2017. [15] K. K. Palavalasa and B. Sambaturu, "Automatic
[3] A. Stankiewicz, T. Marciniak, A. Dąbrowski, M. Stopa, Diabetic Retinopathy Detection Using Digital Image
P. Rakowicz, and E. Marciniak, "Denoising methods Processing," in 2018 International Conference on
for improving automatic segmentation in OCT images Communication and Signal Processing (ICCSP),
of human eye," Bulletin of the Polish Academy of 2018, pp. 0072-0076.
Sciences Technical Sciences, vol. 65, pp. 71-78, [16] S. Chorage and S. S. Khot, "Detection of diabetic
2017. retinopathy and cataract by vessel extraction from
[4] R. Gargeya and T. Leng, "Automated identification of fundus images," in 2017 International conference of
diabetic retinopathy using deep learning," Electronics, Communication and Aerospace
Ophthalmology, vol. 124, pp. 962-969, 2017. Technology (ICECA), 2017, pp. 638-641.
[5] Y. Morales, R. Nuñez, J. Suarez, and C. Torres, [17] T. Karim, M. S. Riad, and R. Kabir, "Symptom
"Digital tool for detecting diabetic retinopathy in Analysis of Diabetic Retinopathy by Micro-Aneurysm
retinography image using Gabor transform," in Detection Using NPRTOOL," in 2019 International
Journal of Physics: Conference Series, 2017, p. Conference on Robotics, Electrical and Signal
012083. Processing Techniques (ICREST), 2019, pp. 606-610.
[6] R. GeethaRamani and L. Balasubramanian, "Retinal [18] D. Sarwinda, A. Bustamam, and A. M. Arymurthy,
blood vessel segmentation employing image "Fundus image texture features analysis in diabetic
processing and data mining techniques for retinopathy diagnosis," in 2017 Eleventh International
computerized retinal image analysis," Biocybernetics Conference on Sensing Technology (ICST), 2017, pp.
and Biomedical Engineering, vol. 36, pp. 102-118, 1-5.
2016. [19] "http://cecas.clemson.edu/~ahoover/stare/."
[7] S. S. Rahim, V. Palade, J. Shuttleworth, and C. [20] "https://www.isi.uu.nl/Research/Databases/DRIVE/."
Jayne, "Automatic screening and classification of [21] S. Roychowdhury, D. D. Koozekanani, and K. K.
diabetic retinopathy and maculopathy using fuzzy Parhi, "Iterative vessel segmentation of fundus
image processing," Brain informatics, vol. 3, pp. 249- images," IEEE Transactions on Biomedical
267, 2016. Engineering, vol. 62, pp. 1738-1749, 2015.
[8] M. Canche, O. Dalmau, and M. García, "Automatic
Detection of Hard Exudates in Retinal Images with
Diabetic Retinopathy," in 2017 Sixteenth Mexican
International Conference on Artificial Intelligence
(MICAI), 2017, pp. 53-59.
[9] T. Ratanapakorn, A. Daengphoonphol, N. Eua-Anant,
and Y. Yospaiboon, "Digital image processing
software for diagnosing diabetic retinopathy from
fundus photograph," Clinical Ophthalmology
(Auckland, NZ), vol. 13, p. 641, 2019.
1236
IJSTR©2019
www.ijstr.org