Edge Detection and Color Mapping Based Diabetic Retinopathy From Fundus Images
Edge Detection and Color Mapping Based Diabetic Retinopathy From Fundus Images
Abstract—Diabetic retinopathy (DR) is a serious disease if system is not proficient then it is hard to obtain the correct
which affects vision of diabetic patients. This may cause partial recognition [2]. Image processing is a way through which DR
and complete blindness. There are so many works have been can be diagnosed with high precision. There has been a
carried in the field of Diabetic Retinopathy diagnosis but still remarkable rise in diabetic cases, facing problem of diabetic
lacking somewhere. Proposes system uses the hybrid technique retinopathy disease. DR disease is mostly constant infectious,
to build the system effectively and performance has been which is critical reason of vision loss in moderate age human
enhanced in all manners. The proposed system is based on Sobel beings. DR reflects during examination as blood spreading in
Edge Detection and Color mapping techniques; where fundus the retinal vessels. The key difference is seen as quite change
images are processed constructively and obtain better level of
in structure with blood diffusion, termed as microaneurysms.
accuracy. Fundus image contains exudates and the principal
The change in structure in microaneurysms is a reason of the
task of color mapping is to transfer the color to another pigment
that enhances the visibility of exudates. The objective of color intra-regional diffusion of the blood. This reflects as the
mapping is to calibrate the color and adjust it accordingly as per beginning state of DR which also in general medically termed
the visibility of background and foreground. There is a bit as gentle non-proliferative DR. As the retinopathy builds
difference between the color of exudates and normal cells or impeding in the veins taking place after certain time by the
blood vessels. Color mapping classifies the exudates and blood microinfarcts within retina. Basically, delicate exudates are
vessels; that definitely contribute to extract the features more little infarcts. Whenever irregularities is experienced, this sort
precisely. System uses Sobel Edge Detection for extracting the of retinopathy is then named extreme non-proliferative DR.
horizontal and vertical edges. It calculates the gradient of
fundus image intensities at each pixel. It can extract the shape
of exudates, and density can be computed; that later compare
with the threshold value. The proposed system uses Messidor
benchmark for testing the system and pertained higher
accuracy as compare to the previous model.
I. INTRODUCTION
Diabetic retinopathy is a disease that directly affected the Fig. 1. Basic Architecture of Diabetic Retinopathy Image [2]
blood vessels of sensitive retinal tissues and vessels get
swelled and started leaking the fluids. Due to diabetic Fig 1 shows the retinal structure of diabetic retinopathy where
retinopathy a person may loss his vision partially or soft and hard exudates present. Diabetic retinopathy can be
completely. A person who is suffering from diabetes from diagnosed through fundus image. Fundus is the retinal space
long time then he might have highest chances of diabetic of the eye that appears in black color. If any of disease related
retinopathy. This disease cannot be treated, it can only be to the eyes; can be diagnosed through fundus image. It plays
cured and stop affecting the cells anymore [1]. Routine an important role in the field of automatic detection of
examination is very much required for diabetic patients to diabetic retinopathy. In machine learning, models are trained
diagnose the disease at the early stage. A system must be with various fundus samples of DR patient and the healty one.
having better performance for the classification of the blood Machine requires thousand of images or data to train the
vessels or background of the exudates. Because blood vessels model that works effectively with input image but it is costlier
may also appear as impairments and it reflects as exudates and work and also takes quite more time to process these images
Authorized licensed use limited to: Istanbul Medipol Universitesi. Downloaded on October 02,2023 at 12:30:05 UTC from IEEE Xplore. Restrictions apply.
1st IEEE International conference on Innovations in High-Speed Communication and Signal Processing (IEEE-IHCSP) 4-5 March, 2023
[28], [29]. To replace the machine learning based model [21]- hard exudates sore level discovery with an affectability of
[25], an edge detection technique can be very useful because 0.87, a F7 score of 0.78 and a positive rating of 0.76.
it does not require any kind of machine learning approach or Presented a technique which is unification of the shading
any model, it can directly process with input image and pre- portrayal, this is actually combination of best Color space and
processing helps to enhance the image or exudates visibilty Fuse C-Medium (FCM) clustering [7]. FCM grouping gave
and then edge detection can extract the shape and size or an exactness of 85.6%, an affectability worth of 97.2 and an
structural appearance of the DR exudates through which a explicitness of 85.4. Utilized a back propagation mainstream
correct decision can be made that may save human lives. The [8]. Exudates region, vascular region, edema and
color correction method is a new approach through which microanurism region chosen for distinguishing the disease
funuds image can be enhanced for further proceedings. The stages. The sequential explicitness and affectability esteems
optical structure of the blood vessels or veins over the retinal are 88.4 and 83.5, separately. Meher Proposed an effective
image can reflect the impairments due the eye related and better extraction strategy that is presented to utilizing the
diseases. Most common changes that have been recognized image preprocessing and mass location approach on retina
as Vascular, optic circle and fova are utilized to analyze images for acquiring fundus features with Naïve Bayes
specific eye related diseases, like diabetic retinopathy (DR) Classifier which is most effective contrasted with different
and other eye sicknesses. Many screening equipments have classifiers with a precision of 83% [9]. Proposed an execution
been used to identify DR physically. Computerized fundus of Conv-Net based calculation for diabetic retinopathy
screening machines are utilized to take pictures of retinal diagnosis from fundus images [10]. Suggested a model based
vessels; in this manner, fundus image securing cycle can on deep learning method. System is dedicated to diagnose DR
debase the image quality fairly. So image upgrade is with classification of fundus image [11]. Proposed a
consistently important to further develop the ideal image framework that can detect diabetic retinopathy using Capsule
quality. Some image handling techniques utilized by analysts network. Network should be light in weight and uses small
to analyze eye sicknesses, including image improvement, filters for making it faster that requires less computation time
discontinuity, highlight extraction and grouping. Image [12]. Proposed a system that can detect diabetic retinopathy
recording is utilized to identify changes in clinical images. using Sobel Edge Detection [13]-[15].
Image combination is utilized to join various sorts of data
from various images into a solitary image [3].
Fig 2 showing the eye fundus image with DR exudates, where III. IMPLEMENTATION DETAILS
yellow highlighted parts are the diabetic retinopathy Proposed system is based on Color Mapping and Sobel Edge
impairments that shows the level of infection arose [4]. Detection approaches.
II. RELATED WORKS
There are various researches which have already proposed Download
Dataset Inference
and presented their work in the field of DR, where diverse
methodologies are used for extracting more precise
information from fundus images [16]. A strategy to examine
the optic circle, in which it has discriminated the significant
blood vessels first [5]. Obscured C-Means Clustering with
Color Mapping Segmentation
some classifiers, such as: Support vector machine (SVM),
Artificial neural network (ANN), principal component
analysis (PCA) and general Bayesian networks. It shows that
many elements, for example: blood exudating in vessels,
miniature aneurysms are precisely related to various Sobel Edge
structural changes [17]-[20]. Optical circle limitation has a Detection Dilation
triumph pace of 97.1%, affectability of 95.7% and 95.2% and
90.5% microforma 90.5% microforms separately. Efficiently
detection of hard exudates is done as per the degree of injury Fig. 4. Proposed System flow diagram
[6]. It has been accomplished superior execution results for
Authorized licensed use limited to: Istanbul Medipol Universitesi. Downloaded on October 02,2023 at 12:30:05 UTC from IEEE Xplore. Restrictions apply.
1st IEEE International conference on Innovations in High-Speed Communication and Signal Processing (IEEE-IHCSP) 4-5 March, 2023
Fig 4 shows the block diagram of the proposed system step 𝜕𝜕𝜕𝜕 𝑓𝑓(𝑥𝑥,𝑦𝑦+𝐷𝐷𝑦𝑦 )− 𝑓𝑓(𝑥𝑥,𝑦𝑦)
= (6)
by step. Color mapping is a technique through which an RGB 𝜕𝜕𝜕𝜕 −𝐷𝐷𝑦𝑦
image can be transformed by its pixel intensities that can
highlights the impairments present in the image. Color 𝜕𝜕𝜕𝜕
= 𝑓𝑓(𝑥𝑥, 𝑦𝑦) − 𝑓𝑓(𝑥𝑥, 𝑦𝑦 + 1) (7)
𝜕𝜕𝜕𝜕
correction is also knows as photometric camera calibration.
Color mapping is a significant task in the field of image (𝑦𝑦3 = 𝑦𝑦2 + 𝐷𝐷𝑦𝑦 , 𝑦𝑦2 = 𝑦𝑦, 𝑥𝑥3 = 𝑥𝑥, 𝐷𝐷𝑦𝑦 = 1)
processing that helps to classify objects. The basic idea of
color mapping is make statistical relationship between the 1 0 -1
color and the brightness of an image by using its mean and
2 0 -2
variance [26], [27].
1 0 -1
H = {(h(1), v(1)),...,(h(0), v(0))} (1)
Sensitive to horizontal edges and first order derivation is
Where H is the histogram, w is the width and O is the computed in given direction.
structure of an image I
max(𝐼𝐼)−min(𝐼𝐼)
b. Vertical Kernel
𝑂𝑂 = [ ] (2)
𝑤𝑤
1 2 1
𝑁𝑁
Where P is the probability distribution and i is the pixel 𝜕𝜕𝜕𝜕 𝑓𝑓(𝑥𝑥+𝐷𝐷𝑥𝑥 ,𝑦𝑦)− 𝑓𝑓(𝑥𝑥,𝑦𝑦)
= (8)
intensities. Statistical color mapping algorithm deals pixel 𝜕𝜕𝜕𝜕 −𝐷𝐷𝑥𝑥
intensities as 3D color space and color mapping reshaping the 𝜕𝜕𝜕𝜕
= 𝑓𝑓(𝑥𝑥 + 1, 𝑦𝑦) − 𝑓𝑓(𝑥𝑥, 𝑦𝑦) (9)
𝜕𝜕𝜕𝜕
data to match the statistical points. Various algorithms
separately mapping the color as one channel at a time as per (𝑥𝑥2 = 𝑥𝑥 + 𝐷𝐷𝑥𝑥 , 𝑥𝑥1 = 𝑥𝑥, 𝑦𝑦1 = 𝑦𝑦2 = 𝑦𝑦, 𝐷𝐷𝑥𝑥 = 1)
the choice of the color. Fig 5 shows the color mapping of
input fundus image of Messidor benchmark. Sensitive to vertical edges and first order derivation is
computed in given direction.
Authorized licensed use limited to: Istanbul Medipol Universitesi. Downloaded on October 02,2023 at 12:30:05 UTC from IEEE Xplore. Restrictions apply.
1st IEEE International conference on Innovations in High-Speed Communication and Signal Processing (IEEE-IHCSP) 4-5 March, 2023
B. Exudates Localization TN
Specificity =
Exudates are the impairments that show the presence of FP + TN
diabetic retinopathy in the image. Exudate is bit differ from TP
Precision =
the normal cells or blood vessels but it is hard to differentiate TP + FP
by normal eyes, it can be diagnosed either by medical
professionals or by deep analysis of the fundus image by
certain methodology.
TN
Negative Prediction Rate (NPR) =
FN + TN
Fig. 8. Exudates Extraction
FP
False Positive Rate (FPR) =
Fig 8 shows the segmentation of background noise or blood FP + TN
vessels and system highlighted the exudates in red color. FN
False Negative Rate (FNR) =
FN + TP
TABLE I. PROPOSED ALGORITHM TP + TN
Color Mapping & Sobel Operator Algorithm Accuracy =
TP + FP + TN + FN
Input: Set of Image X=(x1, x2, x3,……… xN) 2TP
Output: Exudates F1 − score =
Step 1: Input image 2TP + FP + FN
Step 2: Normalize image by color mapping TP
Sensitivity or Recall =
Step 3: Apply Sobel edge detection by multiplying with kernel FN + TP
operator K;
+1 0 −1 +1 +2 +1
TABLE II. EXPERIMENTAL RESULTS
Gx = [+2 0 −2] * I, Gy = [ 0 0 0 ]*I
+1 0 −1 −1 −2 −1 Performance Metrics Outcome / Value
Total Testing Class 1212
Step 4: Compute gradient magnitude
TP 642
𝐺𝐺 = √𝐺𝐺𝑥𝑥2 + 𝐺𝐺𝑦𝑦2 TN 550
Step 5: Inverse Matrix FP 7
G-1 FN 13
Step 6: Compute Entropy Specificity (%) 98.74
255
Precision (%) 98.92
𝐻𝐻 = − ∑ 𝑝𝑝𝑖𝑖 𝑙𝑙𝑙𝑙𝑙𝑙2 𝑝𝑝𝑖𝑖
NPV (%) 97.69
𝑖𝑖=0
pi is the ith gray level probability FPR (%) 1.26
Step 7: Compare the entropy with threshold (Tr) FNR (%) 1.98
Diabetic Retinopathy ← H > Tr; Accuracy (%) 98.35
Normal Fundus ← otherwise;
Step 8: End F1 Score (%) 98.47
Sensitivity or Recall (%) 98.02
IV. EXPERIMENTAL RESULT
V. CONCLUSION & FUTURE SCOPE
There are total 1212 testing images in Messidor benchmark
and 655 images contain soft and hard exudates and 557 Diagnose any disease from image is a combursome and quite
images contain no exudate. It means that 655 images belong tripical task using artificial intelligence. There are various
to the diabetic retinopathy class and 557 images belong to the models through which automatic diabetic retinopathy
healthy eyes. System perceived 642 images as it contains soft detection can be done with insuring the better performance
and hard exudate and 550 images contain healthy symptoms. and lesser processing time. Proposed work is based on Color
Fig 10 shows the MATLAB console result and Graphical Mapping and Sobel Edge Detection method. This overcomes
User Interface of proposed system. Table II represents the the flaws present in the previous work, reduces the
result obtained for all metrics. Performance of the system is computational time through which system can detect the
judged with some metrics, such as: True positive rate (TPR), disease within a second. System pertain 98.35 % of accuracy
F-score, Positive predict value (PPV), As per the confusion which is bit higher than previous system. In future
matrix, the calculations are as follows; performance of the proposed method can be verified on
Authorized licensed use limited to: Istanbul Medipol Universitesi. Downloaded on October 02,2023 at 12:30:05 UTC from IEEE Xplore. Restrictions apply.
1st IEEE International conference on Innovations in High-Speed Communication and Signal Processing (IEEE-IHCSP) 4-5 March, 2023
different datasets. System can be utilized bit more in future [15] P. Kokare, "Wavelet based automatic exudates detection in diabetic
retinopathy," 2017 International Conference on Wireless
and precision can be enhanced. Certain preprocessing Communications, Signal Processing and Networking (WiSPNET),
techniques can be added in future to enhance the visibility of 2017, pp. 1022-1025, doi: 10.1109/WiSPNET.2017.8299917.
exudates through which accuracy can be enhanced in future. [16] N. Karami and H. Rabbani, "A dictionary learning based method for
detection of diabetic retinopathy in color fundus images," 2017 10th
REFERENCES Iranian Conference on Machine Vision and Image Processing (MVIP),
2017, pp. 119-122, doi: 10.1109/IranianMVIP.2017.8342333.
[1] Wejdan L. Alyoubi, Wafaa M. Shalash, Maysoon F. Abulkhair, [17] Sisodia D. S, Nair S, Khobragade P. Diabetic Retinal Fundus Images:
Diabetic retinopathy detection through deep learning techniques: A Preprocessing and Feature Extraction for Early Detection of Diabetic
review, Informatics in Medicine Unlocked, Volume 20, 2020. Retinopathy. Biomed Pharmacol J 2017.
[2] Kaggle, APTOS : Eye Preprocessing in Diabetic Retinopathy, [18] Klein R, Klein BE, Moss SE, Davis MD and DeMets DL, “The
https://www.kaggle.com/code/ratthachat/aptos-eye-preprocessing-in- Wisconsin epidemiologic study of diabetic retinopathy. II Prevalence
diabetic-retinopathy/notebook. Accessed 07 April 2022. and risk of diabetic retinopathy when age at diagnosis is less than 30
[3] Towards Data Science, Blindness detection (Diabetic retinopathy) years,” Arch Ophthalmology 1984, vol. 102, pp. 527–532.
using Deep learning on Eye retina images, [19] B. Harangi, I. Lazar and A. Hajdu, “Automatic Exudate Detection
https://towardsdatascience.com/blindness-detection-diabetic- Using Active Contour Model and Region wise Classification,” IEEE
retinopathy-using-deep-learning-on-eye-retina-images-baf20fcf409e. EMBS 2012, pp.5951–5954.
Accessed 07 April 2022. [20] Balazs Harangi, Balint Antal and Andras Hajdu, “Automatic Exudate
[4] Prasanna Porwal, Samiksha Pachade, et al. IDRiD: Diabetic Detection with Improved Nave-Bayes Classifier, Computer-Based
Retinopathy – Segmentation and Grading Challenge, Medical Image Medical Systems,” CBMS 2012, pp. 1–4.
Analysis, Volume 59, 2020. [21] R. Mahadeva, M. Kumar, S. P. Patole and G. Manik “An optimized
[5] S. Ravishankar, A. Jain and A. Mittal, "Automated feature extraction PSO-ANN model for improved prediction of water treatment
for early detection of diabetic retinopathy in fundus images," 2009 desalination plant performance” Water Supply Vol 22 No 3, 2874 doi:
IEEE Conference on Computer Vision and Pattern Recognition, 10.2166/ws.2021.432
Miami, FL, 2009, pp. 210-217. [22] R. Mahadeva, M. Kumar, S. P. Patole and G. Manik “PID Control
[6] K. K. Palavalasa and B. Sambaturu, "Automatic Diabetic Retinopathy Design Using AGPSO Technique and Its Application in TITO Reverse
Detection Using Digital Image Processing," 2018 International Osmosis Desalination Plant” IEEE Access, Vol.10, 2022.
Conference on Communication and Signal Processing (ICCSP), 10.1109/ACCESS.2022.3224127.
Chennai, 2018, pp. 0072-0076, doi: 10.1109/ICCSP.2018.8524234. [23] R. Mahadeva, M. Kumar, S. P. Patole and G. Manik “Desalination
[7] A. Osareh, B. Shadgar, and R. Markham, “A computational- Plant Performance Prediction Model Using Grey Wolf Optimizer
intelligence-based approach for detection of exudates in diabetic Based ANN Approach” IEEE Access, Vol.10, 2022.
retinopathy images,” IEEE Trans. Inf. Technol. Biomed., vol. 13, no. 10.1109/ACCESS.2022.3162932.
4, pp. 535–545, 2009 [24] R. Mahadeva, M. Kumar, G. Manik and S. P. Patole “Modeling,
[8] Gardner, G & Keating, David & Williamson, Tom & Elliott, A. (1996). simulation, and optimization of the membrane performance of sea-
Automatic detection of diabetic retinopathy using an artificial neural water reverse osmosis desalination plant using neural network and
network: A screening tool. The British journal of ophthalmology. 80. fuzzy based soft computing techniques” Desalination and Water
940-4. 10.1136/bjo.80.11.940. Treatment, 229 (2021) 17–30, July, 10.5004/dwt.2021.27386
[9] M. M. Dharmana and A. M.S., "Pre-diagnosis of Diabetic Retinopathy [25] R. Kumar, R. Mahadeva “An Experimental Measurement and Control
using Blob Detection," 2020 Second International Conference on of Human Body Stomach Using Electrical Impedance Tomography”
Inventive Research in Computing Applications (ICIRCA), 2020, pp. Journal of Circuits, Systems, and Computers , Vol. 30, No. 6 (2021)
98-101, doi: 10.1109/ICIRCA48905.2020.9183241. 2150103 (17 pages).
[10] M. Arora and M. Pandey, "Deep Neural Network for Diabetic [26] V. Gupta, R. Mahle, U. Gour “Image Noise Removal with Detail
Retinopathy Detection," 2019 International Conference on Machine Preservation for Random Valued Impulse Noise” Nirma University
Learning, Big Data, Cloud and Parallel Computing (COMITCon), International Conference on Engineering, NuiCONE-2013, 28-30
2019, pp. 189-193, doi: 10.1109/COMITCon.2019.8862217. November, 2013.
[11] Y. S. Boral and S. S. Thorat, "Classification of Diabetic Retinopathy [27] V. Gupta, R. Mahle, A.B. Jayaswal “Design and Implementation of
based on Hybrid Neural Network," 2021 5th International Conference TDBLMS Adaptive Filter and Comparison of PSNR Values of Various
on Computing Methodologies and Communication (ICCMC), 2021, De-Noised Images” International conference on Communication and
pp. 1354-1358, doi: 10.1109/ICCMC51019.2021.9418224. Signal Processing, April 3-5, 2013, India
[12] Kalyani, G., Janakiramaiah, B., Karuna, A. et al. Diabetic retinopathy [28] Mahadeva, R., Kumar, M., Goel, A. et al. A Novel AGPSO3-based
detection and classification using capsule networks. Complex Intell. ANN Prediction Approach: Application to the RO Desalination Plant.
Syst. (2021). https://doi.org/10.1007/s40747-021-00318-9 Arab J Sci Eng (2023) pp: 1-12. https://doi.org/10.1007/s13369-023-
[13] Jyoti Patil , Dr. A. L. Chaudhari, Detection of Diabetic Retinopathy 07631-0
Using Sobel edge detection method in DIP, International Journal of [29] V. Patel, V. Chaurasia, R. Mahadeva, S. P Patole “GARL-Net: Graph
Scientific & Engineering Research Volume 3, Issue 7, July-2012. Based Adaptive Regularized Learning Deep Network for Breast
[14] Kanimozhi, J., Vasuki, P. & Roomi, S.M.M. Fundus image lesion Cancer Classification” IEEE Access, 2023.
detection algorithm for diabetic retinopathy screening. J Ambient Intell https://doi.org/10.1109/ACCESS.2023.3239671.
Human Comput 12, 7407–7416 (2021).
https://doi.org/10.1007/s12652-020-02417-w
Authorized licensed use limited to: Istanbul Medipol Universitesi. Downloaded on October 02,2023 at 12:30:05 UTC from IEEE Xplore. Restrictions apply.