# Diabetic Retinopathy Detection Using MATLAB Solved

Sample Solution/Used Solution (UA515)

Note: For this assignment, All the Images and rest coding part will be provided along with the complete sample report once you pay the 6 USD charges.

Diabetic Retinopathy Detection Using MATLAB

Name of the Student

Name of the University

Table of Content

Introduction: 3

Methodology 3

Code 5

Conclusion 22

References: 23

# Introduction:

The major goal is to implement a method for Diabetic Retinopathy Detection using MATLAB. We are using the deep learning method using MATLAB. The project is capable of taking an image of the right and left eyes of the person through an external camera and the system is able to detect through GUI. Then, the image is processed considering various factors and the result is obtained finally whether the disease is detected or not.

There are some signs of diabetic retinopathy that can be detected using the digital images. The three functions selected for the image processing system depend on three major symptoms of the diabetic retinopathy (Gulshan et al 2016). They are abnormal disc to cup ratio, exudates and haemorrhages Exudate can be found as brighter clusters in the fundus Image. Haemorrhage can be found as darker clusters of blood vessels or dark spots. The average blood vessel width in retina is 125µm. So if there is some dark vessel having greater than 125µm width can be identified as as haemorrhage. The third factor which we use is the cup to disc ratio for the fundus image. In normal eye, this ratio must be in the range 0.3 to 0.4.

Nowadays, we have advanced digital pixel processing systems. Hence, the automated image processing system is becoming popular. But the systems that are able to execute a particular dispute detection function only (Gargeya and Leng 2017). Hence, if the patient does not show that one dispute, he is identified as disease free. However, an advanced digital image processing system must can scan and process every pixel to find multiple disputes at the same time.

##### Methodology

A method has been developed to perform the diabetic retinopathy detection by developing an algorithm to do the same thing. Then, we use some set of steps to analyse an image and then decide whether the eye is healthy or it is not healthy. This depends on certain parameters.  Finally, we provide a proper solution in case diabetic retinopathy is detected and this is developed using MATLAB GUI interfaced with Hardware. We analyse the image using pixel by pixel analysis algorithm available in MATLAB.

We use 5 steps to implement this : input, pre-processing, image processing, decision making, output result. The image processing section has image processing systems: Cup to Dist ratio detection, Exudates detection and Haemorrhage Detection.

Pre-processing phase:

The image is resized and compressed to minimize the pixel count to make the system fast. Median filter colour normalization is used to minimize any unwanted high saturation colour without changing the sharpness of the image. Next, edge enhancement is done to enhance the differences between different colour shades. The colour space conversion is used to generate the basic dimensional numeric of the retina from the back background.

Image processing phase:

We run three functions simultaneously.

The Cup to Dist detection function measures the area covered by the Disk and the cup to compare them. When the ratio is more than 5:2 then the dispute signal has to be sent to decision database.

In Exudates Detection function, the Segmentation and Local thresholding are used to extract the brighter pixels from the fundus image used. After extracting the brighter pixels from thresholding the cup and disk area will be removed. After removal the number of remaining pixels will be the parameter of measuring the Exudates.

In Haemorrhage Detection function the Segmentation and Local thresholding are used to extract the darker pixels from the fundus image. These darker pixels are the blood vessels and Haemorrhages. The pixels with greater than 125µm collective structure come in the category of Haemorrhage. After extracting the blood vessel structure from the frame, the number of remaining pixels act as the parameter to measure the Haemorrhage.

Decision making phase:

This is the last and the final stage. In the decision Database, the collected signals from image processing are to be analysed. If any disputed signal is found, then the final result will be generated that the diabetic retinopathy is detected. Otherwise, the output message will show that the eye is completely healthy.

Figure 1

Figure 2

In the program, we first preprocess the image function which is a ‘jpg’ image. This image is then resized and compressed. Then, median filter colour normalization is applied and then edge enhancement is done. After colour space conversion, the co-ordinates of the cup center and diameter are fetched. Then the center co-ordinates and the diameter values are stored in a 2D array.

Next, we start with image processing. The disc to cup detection function is designed. The ratio if greater than 5:2 gives rise to a dispute. The segmentation and local threshold function is then implemented. Firstly, the image is changed from RGB to monochrome. Then, we select pixels with the threshold value more than 16. Next we remove the pixels of the disk and cup section. If the number of bright pixels is more than the normal, then a dispute arises.

The Haemorrhage detection function is designed. We select the pixels with the value less than 4. Then, we select the pixel clusters greater than 125 micro meter width. If the pixel count is more than the normal value, we get a dispute.

The image considered here is a jpg image and it can be linked when the program is run. We can select the image when prompted to do so.

We have completed all the 5 steps to implement this : input, pre-processing, image processing, decision making, output result. The image processing section has image processing systems: Cup to Dist ratio detection, Exudates detection and Haemorrhage Detection.

Pre-processing phase:

The image is resized and compressed to minimize the pixel count to make the system fast. Median filter colour normalization is used to minimize any unwanted high saturation colour without changing the sharpness of the image. Next, edge enhancement is done to enhance the differences between different colour shades. The colour space conversion is used to generate the basic dimensional numeric of the retina from the back background.

Image processing phase:

We run three functions simultaneously.

The Cup to Dist detection function measures the area covered by the Disk and the cup to compare them. When the ratio is more than 5:2 then the dispute signal has to be sent to decision database.

In Exudates Detection function, the Segmentation and Local thresholding are used to extract the brighter pixels from the fundus image used. After extracting the brighter pixels from thresholding the cup and disk area will be removed. After removal the number of remaining pixels will be the parameter of measuring the Exudates.

In Haemorrhage Detection function the Segmentation and Local thresholding are used to extract the darker pixels from the fundus image. These darker pixels are the blood vessels and Haemorrhages. The pixels with greater than 125µm collective structure come in the category of Haemorrhage. After extracting the blood vessel structure from the frame, the number of remaining pixels act as the parameter to measure the Haemorrhage.

Decision making phase:

This is the last and the final stage. In the decision Database, the collected signals from image processing are to be analysed. If any disputed signal is found, then the final result will be generated that the diabetic retinopathy is detected. Otherwise, the output message will show that the eye is completely healthy.

##### Conclusion

Hence, we have implemented a method for Diabetic Retinopathy Detection using MATLAB. We have used the deep learning method using MATLAB. The project is capable of taking an image of the right and left eyes of the person through an external camera and the system is able to detect through GUI. Then, the image is processed considering various factors and the result is obtained finally whether the disease is detected or not.

##### References:

Gargeya, R. and Leng, T., 2017. Automated identification of diabetic retinopathy using deep learning. Ophthalmology124(7), pp.962-969.

Gulshan, V., Peng, L., Coram, M., Stumpe, M.C., Wu, D., Narayanaswamy, A., Venugopalan, S., Widner, K., Madams, T., Cuadros, J. and Kim, R., 2016. Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. Jama316(22), pp.2402-2410.

Appendix :

##### Code

Image Preparation:

%% Image Preparation

[fname path] = uigetfile (‘*.jpg’, ‘enter an image’);

fname = strcat(path,fname);

subplot(2,2,1);

imshow(im);

title (‘retina image’);

im1 = imresize(im,[100 150]);

subplot(2,2,2);

imshow(im1);

title(‘resized’);

R = im1(:,:,1);

G = im1(:,:,2);

B = im1(:,:,3);

M (:,:,1) = medfilt2(R);

m (:,:,2) = medfilt2(G);

m (:,:,3) = medfilt2(B);

subplot(2,2,3);

imshow(m);

title(‘median’)

kernel = -1*ones(3);

kernel(2,2) = 17;

im2 = imfilter(m, kernel);

subplot (2,2,4);

imshow (im2);

title (‘edge’);

Disc to Cup detection function:

%% Disc to Cup detection function

[fname path] = uigetfile (‘*.jpg’, ‘enter an image’);

fname = strcat(path,fname);

subplot(2,3,1);

imshow(im);

title (‘retina image’);

im1 = imresize(im,[100 150]);

subplot(2,3,2);

imshow(im1);

title(‘resized’);

R = im1(:,:,1);

G = im1(:,:,2);

B = im1(:,:,3);

im2(:,:,1) = medfilt2(R);

im2(:,:,2) = medfilt2(G);

im2(:,:,3) = medfilt2(B);

subplot(2,3,3);

imshow(im2);

title(‘median’);

im3 = imsharpen(im2);

subplot(2,3,4);

imshow(im3);

title(‘Sharpened Image’);

im4 = rgb2gray(im3);

subplot(2,3,5);

imshow(im4);

title(‘gray’);

display(centers);

Segmentation and local thresholding function:

%% Segmentation and local thresholding function

[fname path] = uigetfile (‘*.jpg’, ‘enter an image’);

fname = strcat(path,fname);

subplot(2,3,1);

imshow(im);

title (‘retina image’);

im1 = imresize(im,[100 150]);

subplot(2,3,2);

imshow(im1);

title(‘resized’);

R = im1(:,:,1);

G = im1(:,:,2);

B = im1(:,:,3);

m(:,:,1) = medfilt2(R);

m(:,:,2) = medfilt2(G);

m(:,:,3) = medfilt2(B);

subplot(2,3,3);

imshow(m);

title(‘median’);

im3 = rgb2gray(m);

subplot(2,3,4);

imshow(im3);

title(‘monochrome’);

im4 = im2bw(im3,0.6);

subplot(2,3,5);

imshow(im4);

title(‘threshold’);

im5 = im4 – bwareaopen(im4,80);

[im6, n] = bwlabel(im5);

subplot(2,3,6);

imshow(im6);

title(‘removed’);

disp(n);

if (n>1)

display(‘Problem is detected’);

else

display(‘No problem’);

end

Haemorrhage Detection Function:

%% Haemorrhage Detection Function

[fname path] = uigetfile (‘*.jpg’, ‘enter an image’);

fname = strcat(path,fname);

subplot(2,4,1);

imshow(im);

title (‘retina image’);

im1 = imresize(im,[100 150]);

subplot(2,4,2);

imshow(im1);

title(‘resized’);

R = im1(:,:,1);

G = im1(:,:,2);

B = im1(:,:,3);

m(:,:,1) = medfilt2(R);

m(:,:,2) = medfilt2(G);

m(:,:,3) = medfilt2(B);

subplot(2,4,3);

………………………………

……………………………….

…………………………….

Another 200+ lines

Download the complete sample solution for the above mentioned assignment (Diabetic Retinopathy Detection Using MATLAB) or order an fresh assignment. We are ready to do it for you.

Client on the below button and mention assignment ID UA515 to download the task after paying 6 USD only.

Diabetic Retinopathy Detection Using MATLAB

Universal Assignment (October 2, 2023) Diabetic Retinopathy Detection Using MATLAB Solved. Retrieved from https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/.
"Diabetic Retinopathy Detection Using MATLAB Solved." Universal Assignment - October 2, 2023, https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/
Universal Assignment April 3, 2022 Diabetic Retinopathy Detection Using MATLAB Solved., viewed October 2, 2023,<https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/>
Universal Assignment - Diabetic Retinopathy Detection Using MATLAB Solved. [Internet]. [Accessed October 2, 2023]. Available from: https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/
"Diabetic Retinopathy Detection Using MATLAB Solved." Universal Assignment - Accessed October 2, 2023. https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/
"Diabetic Retinopathy Detection Using MATLAB Solved." Universal Assignment [Online]. Available: https://universalassignment.com/diabetic-retinopathy-detection-using-matlab-solved/. [Accessed: October 2, 2023]

## Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

# Get 90%* Discount on Assignment Help

### Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as \$10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

### Foundations of Communication Assessment 2 Instructions

Discussion task (Total grade – 10%)   Process Work (Steps to complete the task) Answer on the Assessment 2 Submission Document – Do not upload this instruction document. Requirements (important elements to include) lastname_firstname_studentID_COMS_Assess 2_semester_year. Process for Assessment discussion tasks NOTE: If you do not participate in the class discussions then

### Assessment Two Dos and Don’ts (Internal)

Do: Read the assessment instructions carefully Read the marking rubric carefully Understand the question – break it down Conduct research – record the reference details Read the topic materials about communication theories, forms and factors and refer to them Contribute to the discussions in class or no marks for the

### Unpacking the Question: Assessment Two

Studying at university requires you to become familiar with strategies to un-pack or breakdown a variety of assessment questions/tasks throughout your studies.  Task Example of integrating the discussion, research and theories. In the group discussion my group members (name them) stated that an advertisement for a beauty product would most

### MGMT0001 Introduction to Commerce Assessment

MGMT0001 Introduction to Commerce Assessment 2 (worth 30%) Due date:                  2:00pm (AWST) Friday 15th September 2023 Submission:              Via Turnitin assessment submission link (see ‘Assessment 2’ folder in ‘Assessments’ section of Blackboard). Additional Instructions: Part A (42 marks) Nathan is a well-known chef with years of experience cooking various cuisines. After

### ACCT5011: Accounting Systems in the Digital Age

Practical Assignment Guide, Semester 2, 2023 Due Date for Submission: Monday 11th September 2023 at 5.00 PM Please note that the Folio Assignment for ACCT5011 Accounting Systems in the Digital Age is an individual assessment task worth 30% of your total marks in the unit. Please refer to the online

### EC229- Review session

Assume two cities, A and B, that can’t trade between them. Each city produces its own coconuts for its local market. If suddenly trade is possible then: D) As we saw in class, the new price will be somewhere between the original price 𝑃_𝐴,𝑃_𝐵. Hence it is impossible for consumers

### Computing Theory COSC

Computing Theory COSC 1107/1105 Assignment 1: Fundamentals Assessment Type Individual assignment. Submit online via Canvas → As- signments → Assignment 1. Marks awarded for meeting re- quirements as closely as possible. Clarifications/updates may be made via announcements/relevant discussion forums. Due Date Week 6, Sunday 27th August 2023, 11:59pm Marks 125

### BE279 Applied Statistics and Forecasting

Strategy, Operations, & Entrepreneurship Group Essex Business School Module Code BE279 Module Title Applied Statistics and Forecasting Assessment Type Individual Report (2,000 word) Academic Year 2022/23, Spring Term Submission Deadline Refer to FASER Task Specific Guidance Please note that: Module Learning Outcomes On successful completion of the module, students will

### Learning Design Tool: Little Learners Level 1 sounds

Learning Design Tool: Little Learners Level 1 sounds. Prepared by Sara Hart Date 30th August, 2023 (feel free to leave this date as it is the AT2 due date) Brief description of Learning Design   Chooseit Maker: Create, edit and play personalised learning activities that can be used in your

### HUMN1041 PEOPLE, PLACE AND SOCIAL DIFFERENCE ASSIGNMENT

HUMN1041 PEOPLE, PLACE AND SOCIAL DIFFERENCE ASSIGNMENT 1 TEMPLATE This assignment is made up of three (3) parts, plus a reference list and appendix. Marks are allocated for each section, as follows: – 1 mark Please ensure that you provide your answers in this template, and provide a Reference list

### Model 3 Launch in Australia

Client Information Company Name Tesla Contact Name   Email   Phone Number   Address Level 14, 15 Blue St. North Sydney, NSW 2060 Australia Ad link & image Project Information Project Title Model 3 Launch in Australia Project Description (100 words) Highlight the uniqueness of the car. Show the superior

### MKT10009 Marketing and the Consumer Experience

School of Business, Law and Entrepreneurship Assessment Task – Assignment 2  MKT10009 Marketing and the Consumer Experience Semester 2, 2023. Assessment Type Analytical Report Associated Unit Learning Outcomes (ULO’s) 2, 3, 4 Group or Individual task Individual Value (%) 25% Due Date Monday 20th September at 10:00 AET – Enterthis

### ASSIGNMENT – 1st Evaluation

ASSIGNMENT – 1st Evaluation Date of Submission- 4TH SEP 2023 25 MARKS COMPARATIVE PUBLIC LAW Q. You are the new Central Minister for Urban Development who is keen to make major Indian cities as smart cities. You visit different countries like USA, UK, European Countries, Japan and other developed countries

### Corporate & Financial Due Diligence Report

[Name of the company] Note: Students should keep in mind that application of legal provisions (including Securities Regulations) and analysis of the same is important. Merely putting the facts and figures won’t fetch even a decent mark. Note: Students should only mention the broad area of business. This part should

### ECON1000 S2 2023 – Marking Guidance and FAQs on GTP

Students will be marked on the extent to which they specifically answer the question and provide clear, logical, well-reasoned and sufficient explanations. Here is a summary breakdown of how marks are allocated in this GTP: Part 1 [15 marks] §  Providing relevant observations from the information provided in the articles

### ECON1000 S2 2023 – GTP Brief

ECON1000 S2 2023 – GTP Brief A.  Context and Overview The Game Theory Presentation (GTP) is worth 30% of the final mark. GTP is a ‘take-home’ exercise with a set of tasks to do. The GTP is based on Lecture Topics: L1 and L2. You will have twenty (21) days

### Order #35042 Human Rights Research Essay

Draft due 26th Aug 2,500 words (excluding references and bibliography) Instructions: Structure: Title – The Tigray War: A Critical Analysis of What the Future Holds for Human Rights in the Region What can be done to ensure human rights violations will cease and be prosecuted? Expand on different actors and

### PMC1000: Applied Pathology

Assessment Task Sheet: Poster Presentation Date: Thursday 31st August 2023 | Weighting: 30% Assessment Task 2 You are required to develop a handout style resource (pamphlet or brochure) on a selected pathological condition which is aimed at first year student paramedics. You will need to use high quality peer reviewed

### Identify a current and topical public health ethical issue

Task Details You are required to identify a current and topical public health ethical issue in the workplace (if you work within a public health setting) or in a selected community and a plan of action to address the issue and submit it in Moodle as a Power Point presentation. The

### Detailed Information: Reflective Assignment

Indigenous Peoples, Law and Justice Detailed Information: Reflective Assignment Due Date:                   Tuesday 5th September 2023 at 4:00 pm (AWST). Marks:                       30% of the total marks for this unit. Assignment:              The assignment will comprise two questions. Students must answer all parts of both questions. Examinable topics: The cultural immersion exercise and/or

### Indigenous Peoples, Law and Justice

Indigenous Peoples, Law and Justice Reflective Assignment Questions Instructions: The assignment comprises two questions. Students must answer all parts of both questions. Question 1: The proposed Referendum Question is asking Australians whether the Voice should be established. What is meant by the Voice? In May 2019, Professor Anne Twomey, an

### Cultural immersion activity

Context of Carrolup To support fellow Australian and truth telling. Third space = a spiritual an mental place, meeting point of many cultures all over the world to communicate and feel safe to merge thought and aspects of everyone’s individual culture to create a sense of what they want the

### High-Fidelity Mockup Design for a Employer / Company  Review Platform

Demo Task: High-Fidelity Mockup Design for a Employer / Company  Review Platform Project Overview: You are tasked with designing high-fidelity mockups for a  Employer / Company  review platform that serves both employers and employees/users. The platform’s goal is to provide a space where employees can share their experiences and opinions

### IMPLEMENT AND MONITOR ENVIRONMENTALLY SUSTAINABLE WORK PRACTICES

ASSESSMENT COVER SHEET (Please ensure this cover sheet is completed and attached on top of each assessment) QUALIFICATION CODE AND TITLE:  Certificate IV in Commercial Cookery UNIT CODE: BSBSUS401               TITLE: IMPLEMENT AND MONITOR ENVIRONMENTALLY SUSTAINABLE WORK PRACTICES               Student Number   Student Name   Assessor Name   Assessment Name and

### Data Analysis and Findings

Qualitative data analysis technique called thematic analysis includes reading the data collection and looking for patterns in the meaning of the data to determine the theme. Making sense of the data is an active reflexive process in which the researcher’s personal experience is important. On Instagram, though, any company can

### PHE5STL: Systems Thinking and Leadership

Assessment 2: Complex problem briefing paper instructions and submission link PHE5STL: Systems Thinking and Leadership Assessment 2: Complex, or messy, problem briefing paper Assignment type Briefing paper/policy advising paper Weighting 20% Word count / length 1,500 words Note: The word count does not included references however does include in-text citations

### Assessment 1 Week-6: UML Modelling for a shopping mall

Assessment 1(    ) Information and Rubric Subject Code  ICT505 Subject Name  Software Development Assessment Number and Title  Assessment 1 Week-6: UML Modelling for a shopping mall Assessment Type Lab Activity Length / Duration  45 Minutes Weighting %  10% Total Marks  100 Submission Online Submission Due Date Week-6 (Sunday 23:59) Mode

### The Geopolitical, Economic and Legal Environment

Faculty of Business and Law Assignment Brief Mode E and R Regulations Module Title: The Geopolitical, Economic and Legal Environment     Assignment Number 2 Module Code: 7010SSL   Assignment Title Macro Analysis Report Module Leader: Dr. Bentil Oduro   Assignment Credits 10           Release Date:

### Paragraph Template: TEEL Structure

With this example from the discussion board, you can see Courtney answered the question with all four elements very clearly. This gives a coherent answer using different kinds of information and academic integrity. Bias is a natural behaviour of tendency to be in favour or against something in particular. From