project

90
Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure 2012 1 Department of Biomedical Engineering,KLECET,Belgaum

Upload: rajath-doddamani

Post on 24-Oct-2014

847 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

1 Department of Biomedical Engineering,KLECET,Belgaum

Page 2: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

ABSTRACT

Diabetic-related eye disease is a major cause of preventable blindness in the

world. It is a complication of diabetes which can also affect various parts of the body.

When the small blood vessels have a high level of glucose in the retina, the vision will

be blurred and can cause blindness eventually. This is known as diabetic retinopathy.

Regular screening is essential in order detect the early stages of diabetic retinopathy

for timely treatment to prevent or delay further deterioration. This project detects the

presences of abnormalities in the retina such as the structure of blood vessels,

microaneurysms, exudates and texture properties using image processing techniques.

These features are input into artificial neural network for automatic detection and can

quickly process a large number of fundus images obtained from mass screening to

help reduce the cost and increase productivity and efficiency for ophthalmologists.

2 Department of Biomedical Engineering,KLECET,Belgaum

Page 3: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

TABLE OF CONTENTS

ACKNOWLEDGEMENTS............................................................................................ I

CHAPTER 1. INTRODUCTION.................................................................................1

1.1 BACKGROUND OF PROJECT.........................................................................................................................................11.2 CLASSIFICATION OF DIABETIC RETINOPATHY..............................................................................................31.2.1 NON-PROLIFERATIVE DIABETIC RETINOPATHY...........................................................................................31.2.2 PROLIFERATIVE DIABETIC RETINOPATHY......................................................................................................5

CHAPTER 2. MATERIALS AND METHOD.................................................................6

2.1 PROJECT OBJECT...........................................................................................................................................................62.2 OVERALL OBJECT..........................................................................................................................................................62.3 PROJECT APPROACH.....................................................................................................................................................72.4 SKILLS REQUIRED..........................................................................................................................................................82.5 SOFTWARE SPECIFICATION.........................................................................................................................................8

CHAPTER 3. MATLAB FUNCTIONS..........................................................................9

3.1 IMAGE ANALYSIS AND ENHANCEMENT...................................................................................................................93.2 MORPHOLOGICAL OPERATIONS.............................................................................................................................11

CHAPTER 4. FEATURES EXTRACTION...................................................................12

4.1 OVERALL BLOCK DIAGRAM....................................................................................................................................124.2 BLOOD VESSELS DETECTION..................................................................................................................................134.2.1 INTRODUCTION.........................................................................................................................................................134.2.2 EXPERIMENTAL PROCEDURE - DETECTION OF BLOOD VESSELS...............................................................144.2.3 EXPERIMENTAL PROCEDURE - BORDER FORMATION...................................................................................174.2.3.1 BORDER FORMATION METHOD 1......................................................................................174.2.3.2 BORDER FORMATION METHOD 2......................................................................................184.2.4 EXPERIMENTAL PROCEDURE - MASK CREATION FOR OPTICAL DISK....................................................194.2.5 EXPERIMENTAL PROCEDURE - AND LOGIC....................................................................................................204.2.6 RESULTS................................................................................................................................................................214.2.7 ANOVA TEST RESULTS..................................................................................................................................214.2.8 DISCUSSION..........................................................................................................................................................224.3 EXUDATES DETECTION.............................................................................................................................................234.3.1 INTRODUCTION.........................................................................................................................................................234.3.2 EXPERIMENTAL PROCEDURE - DETECTION OF EXUDATES.........................................................................244.3.3 EXPERIMENTAL PROCEDURE - AND LOGIC....................................................................................................274.3.4 RESULTS.....................................................................................................................................................................284.3.5 ANOVA TEST RESULTS..................................................................................................................................284.3.6 DISCUSSION..........................................................................................................................................................294.4 MICROANEURYSMS DETECTION.............................................................................................................................304.4.1 INTRODUCTION.........................................................................................................................................................304.4.2 EXPERIMENTAL PROCEDURE - DETECTION OF MICROANEURYSMS........................................................314.4.3 RESULTS.....................................................................................................................................................................344.4.4 ANOVA TEST RESULTS..................................................................................................................................344.4.5 DISCUSSION..........................................................................................................................................................354.5 TEXTURE IDENTIFICATION.......................................................................................................................................364.5.1 INTRODUCTION.........................................................................................................................................................36

3 Department of Biomedical Engineering,KLECET,Belgaum

Page 4: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

4.5.2 EXPERIMENTAL PROCEDURE - ENTROPY FUNCTION.....................................................................................374.5.3 EXPERIMENTAL PROCEDURE - HOMOGENEITY..............................................................................................384.5.4 ANOVA TEST RESULTS..................................................................................................................................394.6 SUMMARY OF FEATURES EXTRACTION......................................................................................................404.7 OVERALL ANOVA TEST RESULTS..............................................................................................................41

CHAPTER 5. ARTIFICIAL NEURAL NETWORK.....................................................................................42

5.1 INTRODUCTION............................................................................................................................................................425.2 TRAINING OF ANN.......................................................................................................................435.3 FEATURES DATA FOR ANN..........................................................................................................455.4 TRAINING DATA FOR ANN............................................................................................................465.5 TEST DATA FOR ANN...................................................................................................................485.6 SENSITIVITY AND SPECIFICITY................................................................................................................................495.7 DISCUSSION...................................................................................................................................................................50

CHAPTER 6. GRAPHIC USER INTERFACE..............................................................51

6.1 INTRODUCTION............................................................................................................................................................516.2 DESIGN AND APPLICATION OF GUI...............................................................................................52

CHAPTER 7. CONCLUSIONS................................................................................53

CHAPTER 8. RECOMMENDATIONS.......................................................................54

REFERENCE LIST....................................................................................................55

APPENDICES..........................................................................................................56

A1. MATLAB CODE FOR DETECTING BLOOD VESSELS..........................................................................................57A2. MATLAB CODE FOR DETECTING EXUDATES.....................................................................................................60A3. MATLAB CODE FOR DETECTING MICROANEURYSMS.....................................................................................63A4. MATLAB CODE FOR TEXTURE ANALYSIS - ENTROPY....................................................................................66A5. MATLAB CODE FOR TEXTURE ANALYSIS - HOMOGENEITY.........................................................................67A6. MATLAB CODE FOR TRAINING ANN...........................................................................................68A7. MATLAB CODE FOR TESTING ANN.............................................................................................69A8. MATLAB CODE FOR GUI.............................................................................................................70

LIST OF FIGURES....................................................................................................73

Figure 1.1 Normal Vision......................................................................................1Figure 1.2 Vision of a person with diabetic retinopathy.........................................1Figure 1.3 Example of a fundus camera................................................................2Figure 1.4 Cross sectional view of the human eye.................................................3Figure 1.5 Fundus Image.......................................................................................4Figure 1.6 Retinal fundus images of different stages of diabetic retinopathy.........5Figure 3.1 Original image......................................................................................9Figure 3.2 Contours of the image after edge detection...........................................9Figure 3.3 Image before (Left) and after applying image segmentation (Right)...10Figure 3.4 Results of morphological operations.....................................................11Figure 4.1 Block Diagram of Overall System........................................................12Figure 4.2.1 Block Diagram for Blood Vessels Detection.....................................13Figure 4.2.2 Original fundus image......................................................................14Figure 4.2.3 Inversed image after histogram equalization.....................................14Figure 4.2.4 Image after Morphological opening results.......................................14

4 Department of Biomedical Engineering,KLECET,Belgaum

Page 5: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

Figure 4.2.5 Image after optical disk removed......................................................14Figure 4.2.6 Binary image after Image segmentation............................................15Figure 4.2.7 Blood vessels after removal of “noise”.............................................15Figure 4.2.8 Image after histogram equalization...................................................15Figure 4.2.9 Blood vessels after image segmentation and removal of “noise”.......15Figure 4.2.10 Mask at the optical disk area..........................................................16Figure 4.2.11 Combined image after removing “noise”........................................16Figure 4.2.12 Image of Blood vessels..................................................................16Figure 4.2.13 Block Diagram for Border Formation - Method 1..........................17Figure 4.2.14 Block Diagram for Border Formation - Method 2..........................18Figure 4.2.15 Example of Circular border obtained using either method..............18Figure 4.2.16 Comparing blood vessels images obtained.....................................20Figure 4.2.17 Blood vessels image after apply AND logic...................................20Figure 4.2.18 Fundus image (Left) with its blood vessels image (Right)..............21Figure 4.3.1 Block Diagram for Exudates Detection.............................................23Figure 4.3.2 Original fundus image......................................................................24Figure 4.3.3 Intensity adjusted grayscale image....................................................24Figure 4.3.4 Image after Morphological closing...................................................24Figure 4.3.5 Image after column filter..................................................................24Figure 4.3.6 Mask for the Optical Disk.................................................................25Figure 4.3.7 Image with Optical Disk removed....................................................25Figure 4.3.8 Regions of exudates..........................................................................25Figure 4.3.9 Image after Morphological closing...................................................25Figure 4.3.10 Image with Dark features (represented as white)............................26Figure 4.3.11 Exudates after performing ‘AND’ logic.........................................26Figure 4.3.12 Expanded exudates regions after Morphological closing................27Figure 4.3.13 Dark features represented as white.................................................27Figure 4.3.14 Fundus image (Left) with its exudates image (Right).....................28Figure 4.4.1 Block Diagram for Microaneurysms Detection.................................30Figure 4.4.2 Original fundus image......................................................................31

Figure 4.4.3 Intensity adjusted grayscale image................................................................................31Figure 4.4.4 Image after histogram equalization........................................................31Figure 4.4.5 Image of edges......................................................................................31Figure 4.4.6 Image after function “imfill”.................................................................32Figure 4.4.7 Image after removing the larger area.....................................................32Figure 4.4.8 Image after applying histogram equalization twice................................32Figure 4.4.9 Image after image segmentation............................................................32Figure 4.4.10 Blood Vessels after removing small area of noise...............................33Figure 4.4.11 Microaneurysms.................................................................................33Figure 4.4.12 Fundus image (Left) with its microaneurysms image (Right).............34Figure 4.5.1 Block Diagram for Texture Identification..............................................36Figure 5.1 A neuron...................................................................................................42Figure 5.2 Four-layer feed-forward neural network classifier.....................................43Figure 5.3 Part of the training data.............................................................................46

5 Department of Biomedical Engineering,KLECET,Belgaum

Page 6: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

Figure 5.4 Convergence of the training performance status line with goal line..........47Figure 5.5 Part of the test data....................................................................................48Figure 5.6 Test results................................................................................................48Figure 6.1 GUIDE Interface.......................................................................................51Figure 6.2 Program Interface......................................................................................52

LIST OF TABLES..................................................................................................................................75

Table 2.1 Skills and methods to complete project.......................................................8Table 4.2.1 ANOVA test result for Blood Vessels.....................................................21Table 4.3.1 ANOVA test result for Exudates.............................................................28Table 4.4.1 ANOVA test result for Microaneurysms.................................................34Table 4.5.1 ANOVA test result for Entropy...............................................................39Table 4.5.2 ANOVA test result for Homogeneity......................................................39Table 4.6.1 Overall images of Features Extraction....................................................40Table 4.7.1 Overall ANOVA test results...................................................................41Table 5.3.1 Representation of different stages...........................................................45Table 5.3.2 Breakdown of data by Classes.................................................................49Table 5.3.3 Sensitivity, specificity, predictive accuracy of the Classifier..................49

6 Department of Biomedical Engineering,KLECET,Belgaum

Page 7: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

CHAPTER 1. INTRODUCTION

This chapter gives a background of diabetic retinopathy and the classification of

the images for different stages.

1.1 Background of project

Diabetic retinopathy is a complication of diabetes and is a major cause of

blindness in developed countries. It is estimated to account for 12% of all the new

cases of blindness in United States annually [1]. In Singapore, retinal disease accounts

for more than half of the newly registered blindness with diabetic retinopathy as one

of the main contributors [2]. It is estimated that about 10% of the population over the

age of 40 are affected with diabetes and about 20% of this group will develop some

form of diabetic complications in the eye. With the number rising every year,

Singapore is one of the countries with the highest rate of diabetes in the world [3].

Figure 1.1 Normal Vision Figure 1.2 Vision of a person with diabeticretinopathy

As a diabetic tends to have a lot of other health complications, going blind can

have his problems multiplied. He will have problems in moving around and even in

taking his medications. The patients might not notice a loss of vision until it became too

severe, hence early diagnosis and timely treatment is vital to delay or prevent visual

impair and even blindness.

7 Department of Biomedical Engineering,KLECET,Belgaum

Page 8: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

8 Department of Biomedical Engineering,KLECET,Belgaum

Page 9: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

Currently, regular screenings are conducted and retinal images are obtained using

fundus camera. However, a large amount of images are obtained from these

screenings and it requires trained ophthalmologists to spend a lot of time for manual

analysis and diagnosis [4]. Hence, automatic detection is desired as it can help to

improve productivity and be more cost effective.

Figure 1.3 Example of a fundus camera

9 Department of Biomedical Engineering,KLECET,Belgaum

Page 10: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

10 Department of Biomedical Engineering,KLECET,Belgaum

Page 11: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

1.2 Classification of diabetic retinopathy

Diabetic retinopathy occurs when the blood vessels of the retina in the

posterior part of the eye are damaged. Damages due to small vessels would be known

as microvascular disease while damages due to the arteries would be macrovascular

disease.

Figure 1.4 Cross sectional view of the human eye

Generally, diabetic retinopathy is classified into two main stages, namely non-

proliferative diabetes retinopathy (NPDR) and proliferative diabetes retinopathy

(PDR).

1.2.1 Non-proliferative diabetic retinopathy

In NPDR, depending on the presence and extent of the features such as hard

exudates, microaneurysms or cotton wools spots due to leakage of fluid and blood

from the blood vessels, can be classified to mild, moderate or severe stages as

followings:

11 Department of Biomedical Engineering,KLECET,Belgaum

Page 12: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

1. Mild NPDR: This is the earliest stage of retinopathy and vision is usually

normal except in some cases. However, deterioration of the blood vessels in

the retina has already started. Blood vessels erupt when there is not enough

oxygen in the blood because of high levels of glucose. Small swellings known

as Micro-aneurysms or flame-shaped hemorrhages start to develop in the

fundus quadrants.

2. Moderate NPDR: As the disease progresses, some of the blood vessels that

irrigate the retina become blocked. It is more than “mild” but less than

“severe” stage. There will be micro-aneurysms or hemorrhages of greater

severity in one to three quadrants and leakage might occur, resulting cotton wool

spots and exudates etc to be present in the retina.

3. Severe NPDR: As more blood vessels are blocked, those areas in the retina

will be deprived of blood supply. Signals will then be sent to the body for the

growth of new vessels in order to compensate for the lack of nourishment.

The disease would be considered severe NPDR stage when any of the

following criteria are met:

Severe (more than 20) hemorrhages and micro-aneurysms in all four

quadrants of the fundus

Definite venous beading in at least two quadrants

Severe damage to the small blood vessels in at least one quadrant but

no signs of any proliferative diabetic retinopathy.

ical Disk

12 Department of Biomedical Engineering,KLECET,Belgaum

Page 13: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

Capillaries

1.2.2 Proliferative diabetic retinopathy

PDR is the advanced stage whereby signals are sent by the retina to the body

for the lack of blood supply and this triggered the growth of new blood vessels. These

blood vessels can grow along the retina and the surface of the jelly-like substance

(vitreous gel) which fills the centre of the eye. Although they are fragile and abnormal,

they do not cause symptoms or vision loss. It is only when their thin and weak walls

leak blood, severe visual loss or even irreversible blindness would occur [5].

Normal Mild NPDR Moderate NPDR Severe NPDR PDRFigure 1.6 Retinal fundus images of different stages of diabetic retinopathy [6]

13 Department of Biomedical Engineering,KLECET,Belgaum

Page 14: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

14 Department of Biomedical Engineering,KLECET,Belgaum

Page 15: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

CHAPTER 2. MATERIALS AND METHOD

This chapter gives an overview of the project which outlines the objective and

approach of the project.

2.1 Project Object

The objective of this project is to develop a computer-based approach to detect

the different diabetic retinopathy stages using fundus images. A simple and user

friendly interface is also necessary as the user might not be proficient in programming

code.

2.2 Overall Object

The overall objective of this project is to create an automated program to

quickly process a large number of fundus images from mass screening of diabetic

retinopathy accurately. Diabetic retinopathy in non-proliferative diabetes retinopathy

or proliferative diabetes retinopathy stages can lead to visual impairment or even

blindness. Hence, this system could assist ophthalmologists to improve their

productivity, efficiency as well as cost effective, in detecting the different stages of

diabetic retinopathy and identify patients for early treatment to prevent or delay visual

loss.

15 Department of Biomedical Engineering,KLECET,Belgaum

Page 16: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

16 Department of Biomedical Engineering,KLECET,Belgaum

Page 17: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

2.3 Project Approach

This project uses the classification system of Normal, Mild and Higher stages to

classify the NPDR and PDR as mentioned in section 1.2.

The first approach to this project is a background study of fundus images to

determine the features to extract and use. The fundus images are also analyzed to

recognize their similarity and differences. Familiarizing with Matlab Image

Processing Toolbox is also important prior to the commencing of features extraction.

After getting the values of the features from the images, Artificial Neural

Network (ANN) would be studied and applied for automatic detection. The results

would be tested for accuracy and troubleshooting or fine-tuning of the codes might be

required.

Lastly, a Graphical User Interface (GUI) to access the automated program

would be developed and all the findings and results would be recorded and

documented.

17 Department of Biomedical Engineering,KLECET,Belgaum

Page 18: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

18 Department of Biomedical Engineering,KLECET,Belgaum

Page 19: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

2.4 Skills required

The table below shows the skills and methods essential for the completion of this

project.

Skills

Getting ideas and

information

Assessing and evaluating

project progress

Implementation of project

Presentation

Sources / Methods

Published journals

Related articles from internet

References and research papers from

libraries eg UniSim

Project Supervisor

Targets setting

Comparison of data

Project management

Understand Matlab software

Image Processing Toolbox

Artificial Neural Network

Graphics User Interface

Report writing skills

Oral presentation skills

Organizing and collate data and diagrams

for poster designing

Table 2.1 Skills and methods to complete project

2.5 Software Specification

The software required is MATLAB program equipped with Image Processing

Toolbox and Neural Network Toolbox as well as Microsoft Office for data storage and

word processing.

19 Department of Biomedical Engineering,KLECET,Belgaum

Page 20: Project

Automatic Exudates Detection From Diabetic Retinopathy, Retinal Image Using Fuzzy C-Means &Morphological structure

2012

20 Department of Biomedical Engineering,KLECET,Belgaum

Page 21: Project

CHAPTER 3. MATLAB FUNCTIONS

This chapter outlines the Matlab functions (namely Image analysis and

enhancement and Morphological operations) that are used intensively in this project for

image processing.

Matlab has many set of tools available for various operations. The main

toolbox used for this project is Image Processing Toolbox. It consists of a wide range of

image processing functions to analysis, enhance or perform morphological

operations on the images.

3.1 Image analysis and enhancement

Image analysis or enhancement is used with the intention of simplifying or

adjusting the representation of the image for ease of understanding. It is also known as

segmentation.

Image segmentation is used to locate the objects or boundaries in the image. In

edge detection function, the contours of the objects are extracted from the image.

Canny method is used for this project as it is better compared to the other similar

Matlab functions by having two different thresholds to detect the edges [7].

Figure 3.1 Original image Figure 3.2 Contours of the image after edgedetection

Page 22: Project

Image segmentation is also the process of selecting of pixels that are similar in

certain characteristics such as intensity. The selection criterion is referred as the

threshold value and the function for example “im2bw” uses this value to convert the

image pixels.

Figure 3.3 Image before (Left) and after applying image segmentation (Right)

Page 23: Project

3.2 Morphological Operations

Morphological operations are a set of image processing operations that

analyzes the shapes within the image. It applies a structuring element to the image and

output the image of the same size. The output value of each pixel is determined by the

neighboring pixels with its corresponding pixel of input image. The size and shape of

the structuring element affects the number of pixels being added or removed from the

object in the image [7].

The most basic morphological operations used are dilation and erosion.

Erosion removes pixels on the object boundaries in the image by changing it to the

background pixel. This shrinks the object and breaks up a single object. Dilation, on

the other hand, adds pixels to the object boundaries by changing the background pixel

surrounding it. This enlarges the object and multiple objects could merge together as

one.

Opening or closing is a single function with the combination of dilation and

erosion. In opening, the image would undergo erosion followed by dilation. This

removes the small object pixels before enlarging the remaining while in closing, the

image would undergo dilation followed by erosion. This removes the small

background pixels before enlarging the remaining. In this way, the contours of the

object smoothen and small object gaps fused. These functions help to handle noise in the

image or adjust it to “enclose” a certain desired object [8].

Original

Image

Erosion Dilation Opening Closing

Figure 3.4 Results of morphological operations

Page 24: Project

CHAPTER 4. FEATURES EXTRACTION

This chapter outlines how different features of the fundus images namely

Blood vessels, Exudates, microaneurysms and texture properties are extracted using

image processing techniques. The values obtained are essential as they represent the

image and are necessary in order to classify the images accurately.

4.1 Overall Block Diagram

The Figure 4.1 below shows the overall block diagram of the whole program.

The fundus images are converted to either green component or grayscale for features

extraction of texture analysis. The normalized features’ values are then fed into

Artificial Neural Network for classification to Normal, Mild or Higher classes.

Figure 4.1 Block Diagram of Overall System

Page 25: Project

4.2 Blood Vessels Detection

4.2.1 Introduction

Blood vessels are extracted in this project for the identification of diabetic

retinopathy. The contrast of the fundus image tends to be bright in the centre and

diminish at the side, hence preprocessing is essential to minimize this effect and have

a more uniform image. After which, the green channel of the image is applied with

morphological image processing to remove the optical disk. Image segmentation is

then performed to adjust the contrast intensity and small pixels considered to be noise

are removed.

Another green channel image is processed with image segmentation and

combined with the mask layer. These two images are compared and the differences

are removed. The obtained image would represent the blood vessels of the original

image.

Figure 4.2.1 Block Diagram for Blood Vessels Detection

Page 26: Project

4.2.2 Experimental procedure - Detection of blood vessels

This section discusses in greater detail of the extraction of the blood vessels.

The fundus image is first preprocessed to standardize its size to 576x720. The

intensity of the green channel is then inversed before adaptive histogram equalization is

applied.

Figure 4.2.2 Original fundus image Figure 4.2.3 Inversed image afterhistogram equalization

The optical disk is a black patch in the image as shown at Figure 4.2.3.

Morphological opening which consisted of erode followed by dilate is applied. Erode

function protects the small blood vessels by reducing their sizes while dilate function

blows up the larger remaining details which are intended to be removed. The optical disk

is then removed by subtracting Figure 4.2.3 with Figure 4.2.4.

Figure 4.2.4 Image after Morphological Figure 4.2.5 Image after optical diskopening removed

Page 27: Project

The image (Figure 4.2.5) is then converted to a binary image using the

function “im2bw”. The pixels of the input image are converted to binary 1 (white) for

values greater than the selected threshold and to binary 0 (black) if otherwise. The

converted binary image (Figure 4.2.6) at this point is still noisy and function

“bwareaopen” is applied remove the small area of pixels considered to be noise.

Figure 4.2.6 Binary image after Image Figure 4.2.7 Blood vessels after removal ofsegmentation “noise”

The green component image (Figure 4.2.2) is also applied with adaptive

histogram equalization thrice and image segmentation to select the blood vessels area.

Small pixels which are considered as noise are also removed.

Figure 4.2.8 Image after histogram Figure 4.2.9 Blood vessels after imageequalization segmentation and removal of “noise”

Page 28: Project

Some blood vessels are lost at the optical disk region after applying image

segmentation. Hence, a mask is created to retain those blood vessels located when

AND logic is applied. The creation of the mask is further discussed at section 4.2.4.

The image (Figure 4.2.9) is combined with the mask and compared with the

earlier blood vessel image (Figure 4.2.7) using AND logic. The similar pixels are

output as binary 1(white) and represent the blood vessels. This is further discussed at

section 4.2.5.

Figure 4.2.10 Mask at the optical disk area Figure 4.2.11 Combined image afterremoving “noise”

The final blood vessels image (Figure 4.2.12) is obtained after the removal of

the circular border. The creation of the border is further discussed the following

section 4.2.3.

Figure 4.2.12 Image of Blood vessels

Page 29: Project

4.2.3 Experimental procedure - Border Formation

There are two methods in detecting the circular border of the image. Both

methods are essential as each method could not work for a few of the images due to their

intensity contrast. Deploying both methods allows the detection of all the images. Border

formation is to clean off the noisy edges and is also used during Exudates and

Microaneurysms detection.

4.2.3.1 Border Formation Method 1

Grayscale image instead of the green channel is used as it is more efficient in

border detection. The first method uses canny method to detect the edges before

enclosing the circular region with a top and bottom bar. Function “imfill” is then

applied to fill the region. The circular border is obtained after subtracting the dilated

image with the eroded image.

Figure 4.2.13 Block Diagram for Border Formation - Method 1

Page 30: Project

4.2.3.2 Border Formation Method 2

Method 2 is activated when a noisy image is obtained instead of a circular

border. This method inverses the intensity of the image first before image

segmentation is applied with the function “im2bw”. The circular region is filled as a

result and the circular border is obtained after subtracting the dilated image with the

eroded image.

Figure 4.2.14 Block Diagram for Border Formation - Method 2

Figure 4.2.15 Example of Circular border obtained using either method

Page 31: Project

4.2.4 Experimental procedure - Mask Creation for Optical Disk

As the optical disk is made up of a group of bright spots, it is not suitable to

use loops and locate the largest value. This would only point to one spot and most

likely to be on the side of the optical disk. The mask required to cover the optical disk

would be inefficient as it would be much larger and covers more details. Mask

creation is used in the detection of blood vessels, exudates and microaneurysms.

Matlab Code: max_GB_column = max(Grayscale_brighten_9); %max value for each 720 columns max_GB_single = max(max_GB_column); %max value of the columns [row,column] = find(Grayscale_brighten_9 == max_GB_single); %get the row & column of the image that match the largest value

median_row = floor(median(row)); %find 50th percentile and round off median_column = floor(median(column));

Grayscale image instead of the green channel is used as it is more efficient in the

detection. The above lines would first find the max value for each of the 720

columns of the image before locating the largest value. The coordinates (row and

column) of all brightest point(s) are then determined and the median is taken if there is

more than one point.

Matlab Code:

radius = 90; %size of the mask [x,y]= meshgrid(1:720, 1:576); %row size 576, column size 720 (576x720) mask = sqrt((x-median_column).^2+(y-median_row).^2)<= radius; %drawing mask

After locating the optical disk, a mask needs to be created. A simple square mask

created using loops would be easy but this would result in error when the optical disk is

close to the border of the image. The above lines are used instead to generate the circular

mask. The function “meshgrid” is to generate X and Y matrices while the next line that

creates the mask is the equation for drawing circle. H and K are the coordinates (row

and column) and R as the Radius.

R 2 2 2(xh) (yk)

Page 32: Project

4.2.5 Experimental procedure - AND logic

Two methods of detecting the blood vessels are used. Both methods would

generally detect different locations of the images like exudates as blood vessels; hence by

computing their similarity, the non blood vessels area could be filtered.

Figure 4.2.16 Comparing blood vessels images obtained

AND logic is applied to mark out the similar pixels of the two images. The

output pixel is registered as binary 1 (white) when the both images’ pixels are binary

1 (white). The obtained image would be a clearer blood vessels image.

Figure 4.2.17 Blood vessels image after apply AND logic

Page 33: Project

4.2.6 Results

The area of the blood vessels is obtained by using two loops to count the

number of pixels with binary 1 (white) in the final blood vessel image.

Figure 4.2.18 Fundus image (Left) with its blood vessels image (Right)

4.2.7 ANOVA Test Results

The values of all the subjects are input into ANalysis Of VAriance to test the

hypotheses between the groups.

Feature Higher Mild Normal P-value

Mean Blood43412 39097 36161

Vessels Area 0.0081 11044 9374 6987

Std dev

Table 4.2.1 ANOVA test result for Blood Vessels

Total subjects - 98

Std dev - Standard deviation

P-value - The probability of the result.

Page 34: Project

4.2.8 Discussion

Masking at the optical disk is essential for AND logic as some of blood

vessels there are lost after applying adaptive histogram equalization and image

segmentation. It is noted that some of the images have noise within the mask area and

detect as blood vessels but it is still trivial to affect the overall value.

The higher stage of the diabetic retinopathy is known to have more blood

vessels due to damages and growth and the overall obtained result matched it.

However, the large standard deviation value might affect the output result of the ANN.

Page 35: Project

4.3 Exudates Detection

4.3.1 Introduction

Exudates appeared as bright yellow-white deposits on the retina due to the

leakage of blood from abnormal vessels. Their shape and size will vary with the

different retinopathy stages. The grayscale image is first preprocessed for uniformity

before the morphological image processing is applied to remove the blood vessels and

identify the exudates region. The exudates are detected after removing the border,

optical disk and non-exudates area.

Figure 4.3.1 Block Diagram for Exudates Detection

Page 36: Project

4.3.2 Experimental procedure - Detection of Exudates

This section discusses in greater detail of the extraction of the exudates. The

fundus image is first preprocessed to standardize its size to 576x720 and the intensity of

the grayscale image is then adjusted.

Figure 4.3.2 Original fundus image Figure 4.3.3 Intensity adjusted grayscaleimage

Morphological closing which consisted of dilate followed by erode is applied

to removed the blood vessels. The dilate function expands the exudates area while

erode function removes the blood vessels. The image (Figure 4.3.4) is then converted

to double-precision value for function “colfilt” to mark the exudates region before

converted back to uint8 as shown in (Figure 4.3.5). This image is converted back to

binary using the function “im2bw” with a threshold value to filter out the exudates.

Figure 4.3.4 Image after Morphological Figure 4.3.5 Image after column filter

Page 37: Project

The location of the optical disk is detected by the brightest point(s) on the grayscale

image. It is usually the maximum value and a circular mask is then created to cover it. The

creation of the mask is discussed in section 4.2.4.

Figure 4.3.6 Mask for the Optical Disk Figure 4.3.7 Image with Optical Diskremoved

The regions of the exudates are obtained after the removal of the circular border.

Morphological closing is then applied to the image. The dilate function is to fill the exudates

while erode function is to expand their sizes.

Figure 4.3.8 Regions of exudates Figure 4.3.9 Image after Morphologicalclosing

Page 38: Project

Non-exudates (dark features) are extracted from the grayscale image using

function “im2bw” and are represented as binary 1 (white) after intensity inversion. AND

logic (to be further discussed in the section 4.3.3) is then applied to the images

(Figure 4.3.9 and Figure 4.3.10) to detect the exudates (Figure 4.3.11).

Figure 4.3.10 Image with Dark features Figure 4.3.11 Exudates after performing(represented as white) ‘AND’ logic

Page 39: Project

4.3.3 Experimental procedure - AND logic

AND logic is used to remove noise for the detection of exudates. Regions with

exudates are marked out after applying column filter but this includes non-exudates

such as hemorrhages and has to be removed as noise.

Figure 4.3.12 Expanded exudates regions Figure 4.3.13 Dark features represented asafter Morphological closing white

By removing the non-exudates from the detected regions, the exudates can be

determined. Image segmentation is applied to the grayscale image to extract the bright

spots for comparison. These areas (bright features) are represented by binary 0 (black)

while the non-exudates (dark features) are represented as binary 1 (white) as shown in

Figure 4.3.13.

By applying AND logic to Figure 4.3.12 and Figure 4.3.13, the non-

exudates regions are set to set to binary 0 (black) and removed when the pixels for both

images are binary 1 (white). As a result, the exudates area is obtained.

Page 40: Project

4.3.4 Results

The area of the exudates is obtained by using two loops to count the number of

pixels with binary 1 (white) in the final exudates image.

Figure 4.3.14 Fundus image (Left) with its exudates image (Right)

4.3.5 ANOVA Test Results

The values of all the subjects are input into ANalysis Of VAriance to test the

hypotheses between the groups.

Feature Higher Mild Normal P-value

Mean

Exudates 919.68 58.25 6.09< 0.0001

Area 714.98 108.09 11.88

Std dev

Table 4.3.1 ANOVA test result for Exudates

Total subjects - 98

Std dev - Standard deviation

P-value - The probability of the result.

Page 41: Project

4.3.6 Discussion

The higher stage of the diabetic retinopathy would have more exudates due to

damages or leakages of the blood vessels and the overall obtained result matched it.

The mask detection of the optical disk could take the exudates coordinates

instead when they are much brighter or close together and forms a larger area than the

optical disk. Some of the images had exudates area masked as a result; however it is

trivial to affect the overall value as those images generally had a large area of

exudates.

Page 42: Project

4.4 Microaneurysms Detection

4.4.1 Introduction

Microaneurysms appeared as small dark round dots (~15 to 60microns in

diameter) on the fundus images. They are small bulges developed from the weak

blood vessels and are the earliest clinical sign of diabetic retinopathy [9]. Hence, it is

essential to detect them during the mild stage. The number of microaneurysms would

increase with the stage of the retinopathy.

The grayscale image is used to detect the circular border and optical disk mask. The

green channel of the image first finds the edges using canny method before removing

the circular border to fill the enclosed small area. The larger areas are then removed and

applied with AND logic to remove the exudates. The blood vessels and optical disk are

then removed to obtain the microaneurysms.

Figure 4.4.1 Block Diagram for Microaneurysms Detection

Page 43: Project

4.4.2 Experimental procedure - Detection of Microaneurysms

This section discusses in greater detail of the extraction of the microaneurysms.

The fundus image is first preprocessed to standardize its size to 576x720 and the

intensity of the grayscale image is then adjusted.

Figure 4.4.2 Original fundus image Figure 4.4.3 Intensity adjusted grayscaleimage

The image’s contrast is stretched by applying adaptive histogram equalization

before using edge detection (canny method) to detect the outlines of the image

(Figure 4.4.5).

Figure 4.4.4 Image after histogram Figure 4.4.5 Image of edgesequalization

Page 44: Project

The circular border is then removed before applying the function “imfill” to fill

up the enclosed area (Figure 4.4.6). The holes (microaneurysms and noise) image is

obtained by subtracting away the edges image and removing the larger area using

function “bwareaopen”. However, the image would still contain noise like blood

vessels and exudates.

Figure 4.4.6 Image after function “imfill” Figure 4.4.7 Image after removing thelarger area

As the exudates are bright spots on the image, the image (Figure 4.4.3) is

applied with adaptive histogram equalization twice and image segmentation to

“bring” out the exudates (Figure 4.4.9). These bright features are compared with

(Figure 4.47) using AND logic to remove the exudates.

Figure 4.4.8 Image after applying Figure 4.4.9 Image after imagehistogram equalization twice segmentation

Page 45: Project

Blood vessels are extracted after the image (Figure 4.4.3) is applied with

adaptive histogram equalization twice and image segmentation of another threshold

value. A clearer image of blood vessels (Figure 4.4.10) is acquired after removing the

small area of noise. This image is compared using AND logic with the result from the

previous AND logic to remove the blood vessels. The final microaneurysms image is

obtained after removing the small noise and optical disk area.

Figure 4.4.10 Blood Vessels after removing Figure 4.4.11 Microaneurysmssmall area of noise

Page 46: Project

4.4.3 Results

The area of the microaneurysms is obtained by using two loops to count the

number of pixels with binary 1 (white) in the final microaneurysms image.

Figure 4.4.12 Fundus image (Left) with its microaneurysms image (Right)

4.4.4 ANOVA Test Results

The values of all the subjects are input into ANalysis Of VAriance to test the

hypotheses between the groups.

Feature Higher Mild Normal P-value

Mean

Microaneurysms 314.56 72.31 15.03< 0.0001

Area 174.40 70.52 20.69

Std dev

Table 4.4.1 ANOVA test result for Microaneurysms

Total subjects - 98

Std dev - Standard deviation

P-value - The probability of the result.

Page 47: Project

4.4.5 Discussion

Blood vessels and exudates would sometimes occur from edge detection using

canny method. As they are considered noise, they need to be removed at the output.

Exudates can be easily removed as they are bright spots on the original image.

However, it would be harder to differentiate tiny blood vessels and microaneurysms as

they are of the same color intensity in the image.

Page 48: Project

4.5 Texture Identification

4.5.1 Introduction

Texture analysis is the description of regions of an image by their variations in

the pixel intensities or gray level such as its context of coarseness, smoothness or

regularity. The basic types of computation are structural, statistical and spectral.

Structural is the arrangement of texture elements while spectral is the analysis based

in spatial frequency domain. Statistical is based on the intensity relationship of the

pixels in statistical features like co-occurrence matrix. Co-occurrence matrix captures

the spatial distribution of gray level and obtains features such energy, contrast,

homogeneity and correlation. [7]

Two texture properties of the image are being measured. Entropy is measured

after applying histogram equalization to the green component of the image while

homogeneity is by using Gray-Level Co-occurrence Matrix on the grayscale image.

Figure 4.5.1 Block Diagram for Texture Identification

Page 49: Project

4.5.2 Experimental procedure - Entropy function

Entropy is the statistical measure of the randomness of the grayscale image’s

texture. It is a texture analysis function in the MATLAB Image Processing Toolbox.

Matlab Code:

Green_his_X1 = adapthisteq(GreenC); Green_his_X2 = adapthisteq(Green_his_X1); E_GreenC_X2 = entropy(Green_his_X2);

The green component of the image is applied with adaptive histogram

equalization twice to enhance its contrast and texture. The function “entropy” is then used

on the image which returns a scalar value. This represents the entropy of intensity

for the image.

Page 50: Project

4.5.3 Experimental procedure - Homogeneity

Grey Level Co-occurrence Matrix (GLCM) is the computation of the

frequency of each pixel pair occurring for different combinations of pixel brightness

values in an image.

Matlab Code:

glcm = graycomatrix (Grayscale); homo_struct = graycoprops (glcm, {'homogeneity'});

The function “graycomatrix” is used to create the GLCM of the grayscale

image. It calculates how often the pixel with value i of the gray level occurs

horizontally adjacent to another pixel with value j. Each element (i,j) in the GLCM

represents frequent of occurrence.

The function “graycoprops” normalizes the GLCM so that the sum of its

elements is equal to 1. It calculates the statistics as specified in the property

(homogeneity in this case). Homogeneity is the measurement of the closeness of the

distribution of elements in the GLCM to the GLCM diagonal and returns a value

between 0 and 1. The homogeneity formula is as follows:

∑i, j

p(i, j)1i j

Page 51: Project

4.5.4 ANOVA Test Results

The values of all the subjects are input into ANalysis Of VAriance to test the

hypotheses between the groups.

Feature Higher Mild Normal P-value

Mean7.6768 7.5917 7.6254

Entropy 0.026 0.1135 0.1151 0.1487

Std dev

Table 4.5.1 ANOVA test result for Entropy

Feature Higher Mild Normal P-value

Mean0.97144 0.97490 0.97760

Homogeneity 0.0002 0.00570 0.00587 0.00607

Std dev

Table 4.5.2 ANOVA test result for Homogeneity

Total subjects - 98

Std dev - Standard deviation

P-value - The probability of the result.

Page 52: Project

4.6Summary of Features Extraction

Feature Higher Stage Mild Stage Normal

Image

Blood

Vessels

Exudates

Micro-

aneurysms

Table 4.6.1 Overall images of Features Extraction

Page 53: Project

4.7Overall ANOVA Test Results

Feature Higher Mild Normal P-value

Mean Blood43412 39097 36161

Vessels Area 0.0081 11044 9374 6987

Std dev

Mean Exudates919.68 58.25 6.09

Area < 0.0001 714.98 108.09 11.88

Std dev

Mean

Microaneurysms 314.56 72.31 15.03< 0.0001

Area 174.40 70.52 20.69

Std dev

Mean Entropy 7.6768 7.5917 7.62540.026

Std dev 0.1135 0.1151 0.1487

Mean0.97144 0.97490 0.97760

Homogeneity 0.0002 0.00570 0.00587 0.00607

Std dev

Table 4.7.1 Overall ANOVA test results

Total subjects - 98

Std dev - Standard deviation

P-value - The probability of the result.

Page 54: Project

CHAPTER 5. ARTIFICIAL NEURAL NETWORK

This chapter outlines about how the data from the features extractions are

being fed into the Artificial Neural Network (ANN) for training and how the test is

conducted. The result of the test data and the accuracy of the classifier are also being

discussed.

5.1 Introduction

ANN is a system based on the biological neural system. The biological

neurons receive signals through synapses located on the dendrites or membrane of the

neuron and the neuron is activated when the received signals surpass a threshold. The

neuron then emits a signal through the axon to another synapse or activates other

neurons.

Dendrites

Soma Nucleus Axon

Synapses

Figure 5.1 A neuron

ANN, in engineering can be used for pattern classifiers or nonlinear adaptive

filters. Through training, ANN is able learn from experience and be used for fairly

accurate classification of data into different classes. The classification is based on the

knowledge gained from training and is stored in the form of interconnecting weights

which are in its hidden layers. It is always desired to have a large set of uniformly

spread training data. [10,11]

Page 55: Project

5.2 Training of ANN

The ANN used for this project is a feed-forward back propagation network

and uses supervised learning to train the neural network. Supervised learning is by

providing the ANN with input data and matches them with output results. Its weights

would adjust according to its learning rules as it undergoes training before being

tested for accuracy. The ANN used for classification in this project as shown in the

figure below.

Figure 5.2 Four-layer feed-forward neural network classifier

The input layer is made up of nodes to accept the 5 data values while the

subsequent layers process the values using activation function. There are 10 neurons for

each “hidden layer” and the trained network would output binary numbers which

represent the 3 different stages.

10

The outputs of the hidden layer are assessed by hs j

10

f (∑w ji

i 1

o h

h hsi j ) while

o h

the outputs of the output layer are assessed by bk

Page 56: Project

of (∑ wkj s j k ), where wji,

j1

w kj are the connection weights between layers and jh , ko are the bias terms

respectively.

The error vectors for hidden layer are calculated by

h

e b 1b dk k bk k k 10

hwhile the error vectors for output layer are by e j s j

the desired output [12].

1 s j ∑ wkj ke , where dkisk 1

The weight updating for output and hidden layers are given as

h o owkj(new) wkj sj ek (new) e

k k

w (new) w s e kand h h

j (new)j e k ji ji i j

Page 57: Project

5.3 Features Data for ANN

The data obtained from the images are divided into two portions. 70% of the

data is used for training purposes while the remaining 30% is used for testing. All the

data are normalized to the range between 0 and 1 to have a uniformly spread and also to

balance each weight of the neuron in the ANN.

The different classes for output or training data are represented as binary

numbers as shown in the table below.

Classes Binary Representation

Normal 00

Mild Stage 01

Higher Stage 10

Table 5.3.1 Representation of different stages

Page 58: Project

5.4 Training data for ANN

The data as shown below is a portion of the 70% data being fed into the ANN

for training. The goal of the training is 0.001 which means the allowed error is

targeted to be less than 0.1%.

Figure 5.3 Part of the training data

Page 59: Project

The successful training of the ANN is as shown in the figure below.

101

100

10-1

10-2

10-3

10-4

0 20

Performance is 0.000999659, Goal is 0.001

40 60 80 100 120 140 160 180181 Epochs

Figure 5.4 Convergence of the training performance status line with goal line

Page 60: Project

5.5 Test data for ANN

The data as shown below is a portion of the 30% data being used to test the

accuracy of the ANN. The testing data would only contain input data values as the

output stages are to be determined by ANN.

Figure 5.5 Part of the test data

The figure as shown below is the output result of the test data.

y =

Columns 1 through 10

0.9987 0.9984 0.9990 0.9941 0.9932 0.8937 0.9931 0.9974 0.9134 0.99900.0163 -0.0174 -0.0062 -0.0041 -0.0149 1.0000 -0.0099 0.0035 1.0000 -0.0312

Columns 11 through 20

-0.0496 0.0030 0.0028 0.0029 0.2676 0.9883 -0.0054 0.9774 0.0013 0.00291.0000 -0.9992 -0.9999 0.9347 1.0000 0.8227 -0.9998 1.0000 1.0000 0.9347

Columns 21 through 30

0.0013 0.0023 0.0007 -0.0183 0.0036 0.0016 0.0013 -0.0219 -0.0031 0.00160.9771 1.0000 0.9970 0.0554 -1.0000 -0.0057 1.0000 1.0000 0.9953 1.0000

Figure 5.6 Test results

Page 61: Project

5.6 Sensitivity and specificity

The table as shown below is the breakdown of the classes used for training,

testing and their accuracy.

No of data No of data AccuracyClass

for training for testing (%)

Normal 22 10 20

Mild 22 10 80

Higher 24 10 80

Total 98 30

Average 60

Table 5.3.2 Breakdown of data by Classes

The table as shown below is the breakdown of the accuracy of the classifier. Sensitivity

refers to the probability of a positive test among the subjects with the condition while

Specificity refers to the probability of a negative test among the subjects without the

condition. The equations are as follows

Sensitivity TP

TPFNTP

and Specificity TPFN

TN TP FP FN Sensitivity

Specificity(%) (%)

Positive Predictive

Accuracy (%)

2 16 8 4 80 20 66.7

Table 5.3.3 Sensitivity, specificity, predictive accuracy of the Classifier

TN - True Negatives, TP - True Positives

FN - False Negatives, FP - False Positives

Page 62: Project

5.7 Discussion

The classifier has a fairly accurate classification for mild and higher class but

not for the normal. This would lead to high false alarm for the normal class. The low

accurate might be due to the values of the test data being too close to the other classes.

More training data would be ideal to improve the classifier.

Page 63: Project

CHAPTER 6. GRAPHIC USER INTERFACE

This chapter gives an account of Graphic User Interface (GUI), how is it being

designed and how is it being applied in this project.

6.1 Introduction

GUI is a graphical interface to allow simple and user friendly access to the

program. There is a set of tools provided for in Matlab to simplify designing and

building of GUIs. The typical stages of creating a GUI are namely designing, layout,

programming the M-file and saving/ running. Through the GUIDE Layout Editor, the

layout can be quickly designed by dragging components like for example push button,

toggle button, sliders and radio buttons into the layout area. It can also be used to

display images or plots.

The GUIDE would then automatically generate an M-file which initializes and

manage its operations. Programming codes can be added to the function events to carry

out the intended functions [13].

Figure 6.1 GUIDE Interface

Page 64: Project

6.2 Design and application of GUI

The GUI used for automated identification of diabetic retinopathy stages

comprises of the followings:

1) Image data input

2) Analyze image button

3) Image display

4) Feature extraction values and classification result.

The original fundus image will be displayed when the image number is

selected. After the analyze button is clicked, the GUI would perform features

extraction for blood vessels, microaneurysms, exudates and texture. The feature

images would then be displayed at the image output and its values at the various

textbox. The values would also be normalized before being fed into the ANN for

classification. One of the 3 classes, namely Normal, Mild or Higher would be

displayed at the textbox to indicate the stage of the subject is at.

The intention of using GUI as an automated detection program is to allow simple

and easy access for doctors or nurses to perform quick analysis and observation

without the need of programming skills.

Figure 6.2 Program Interface

Page 65: Project

CHAPTER 7. CONCLUSIONS

Biomedical image processing requires an integrated knowledge in

mathematics, statistics, programming and biology.

Based on the results of the classifier, this project has a sensitivity of 80% and a

specificity of 20%. It is able to achieve a fairly accurate classification for mild and

higher stages but not for normal class resulting in a possible high false alarm. This

might be improved by fine tuning the threshold values used on the images and more

images could be used to improve the overall system.

For this project, I had learnt various techniques of image processing and was

able to extract the features, namely blood vessels, exudates, microaneurysms and

texture properties (homogeneity and entropy) from the fundus images. I was able to

train an ANN by back propagation to perform classification and was also able to

design a GUI to perform classification on the images automatically.

Page 66: Project

CHAPTER 8. RECOMMENDATIONS

From this project, there are areas that can be improved to raise the overall

accuracy or enhance the system. The followings are some of the recommendations to

achieve this:

Further fine-tune the threshold values used for image processing

Explore other features that could be added for classification

Integrate into fundus camera as an add-on features

Page 67: Project

REFERENCE LIST

1. Vision problems in the U.S: a report on blindness and vision impairment in adults age 40 and older,Schaumberg, IL: Prevent Blindness America, 1994;12-3http://www.preventblindness.org/vpus/2008_update/VPUS_vision_impairment_blindness_2008.pdf

2. Registration of New Blindness in Singapore for 1985-1995, Lim K. H., Singapore Medical Journal, Vol.40, No.2, Feb. 1999 http://www.sma.org.sg/smj/3903/articles/3903a3.html

3. Diabetes & the Eye: Don’t go blind, Prof Arthur Lim NEW LIFE, March-May 2006 Issue, Society for MEN’s HEALTH Singapore Article

4. An Effective Approach to Detect Lesions in Color Retinal Images Huan Wang, Wynne Hsu, Kheng Guan Goh, Mong Li Lee School of Computing, National University of Singapore

5. International Clinical Diabetic Retinopathy Disease Severity Scale International Council of Ophthalmology, October 2002

6. Automated Identification of Different Stages of Diabetic Retinopathy using digital fundus images, Jagadish Nayak, P Subbanna Bhat, Rajendra Acharya U, Lim Choo Min, Manjunath Gupta Journal of Medical Systems, USA (accepted on 12th October 2007)

7. Image Processing Toolbox™, Function Reference http://www.mathworks.com/products/image/functionlist.html

8. Special Imaging Techniques: Morphological Image Processing, chapter 25California Technical Publishinghttp://www.dspguide.com/ch25/4.htm

9. RETINOPATHY, Chapter 33, Jay M. Stewart, MD and Daniel M. Schwartz, MD, March 3, 2003 http://www.endotext.org/diabetes/diabetes26/diabetesframe26.htm

10. Neural Networks, Artificial Neural Networks http://www.learnartificialneuralnetworks.com

11. Artificial Neural Networks for Beginners, Carlos Gershenson (Submitted on 20 Aug 2003) http://homepages.vub.ac.be/~cgershen/cogs/doc/FCS-ANN-tutorial.htm

12. Classification of heart rate data using artificial neural network and fuzzy equivalence relation U. Rajendra Acharya, P. Subbanna Bhat, S. S. Iyengar, Ashok Rao and Sumeet Dua Pattern Recognition, Volume 36, Issue 1, January 2003, Pages 61-68

13. Graphical User Interfaces (GUIs) Matlab, http://www.mathworks.com

Others Introduction to Digital Image Processing with MATLAB, Alasdair McAndrew ISBN-10: 0534400116, Course Technology

Image Classification Based on Textural Features using Artificial Neural Network (ANN) Prof S K Shah, V Gandhi www.ieindia.org/publish/et/0104/jan04et5.pdf

Texture Analysis, Leow Wee Kheng http://www.comp.nus.edu.sg/~cs4243/lecture/texture.pdf

Page 68: Project

APPENDICES

No. Description FilesA1. Matlab Code for detecting Blood Vessels

function_BV.m

A2. Matlab Code for detecting Exudates

function_EX.m

A3. Matlab Code for detecting Microaneurysms

function_MIC.m

A4. Matlab Code for Texture Analysis - Entropy

function_TEXTURE.m

A5. Matlab Code for Texture Analysis - Homogeneity

function_HOMO.m

A6. Matlab Code for Training ANN

Training.m

A7. Matlab Code for Testing ANN

Testann.m

A8. Matlab Code for GUI

Gui_fm.m