in the name of allah, the most beneficent, the most merciful · we humbly thank allah (s.w.t)...

53
AUTOMATED SKIN DISEASE DETECTION PROJECT MEMBERS MUHAMMAD ADNAN EJAZ 2111-FBAS-BSSE-F13 WAQAR YOUNAS KHAN 2112-FBAS-BSSE-F13 SUPERVISOR MR. SYED MUHAMMAD SAQLAIN DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING FACULTY OF BASIC AND APPLIED SCIENCES INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

Upload: others

Post on 08-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

AUTOMATED SKIN DISEASE DETECTION

PROJECT MEMBERS

MUHAMMAD ADNAN EJAZ 2111-FBAS-BSSE-F13

WAQAR YOUNAS KHAN 2112-FBAS-BSSE-F13

SUPERVISOR

MR. SYED MUHAMMAD SAQLAIN

DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING

FACULTY OF BASIC AND APPLIED SCIENCES

INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

Page 2: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

FINAL APPROVAL

Dated: ________________

It is certified that we have read the project report titled “(Automated Skin Diseases Detection)”

submitted by Muhammad Adnan Ejaz (2111/FBAS/BSSE/F13) and Waqar Younas Khan

(2112/FBAS/BSSE/F13). It is our judgment that this project is of sufficient standard to warrant

its acceptance by the International Islamic University, Islamabad for Bachelor’s Degree in

Software Engineering.

COMMITTEE

External Examiner:

Dr. Imran Khan ________________

Assistant Professor

Department of Computer Sciences & Software Engineering

International Islamic University,

Islamabad

Internal Examiner:

Dr. Husnain Abbass Naqvi ________________

Assistant Professor

Department of Computer Sciences & Software Engineering

International Islamic University, Islamabad

Supervisor:

Mr. Syed Muhammad Saqlain ________________

Assistant Professor

Department of Computer Sciences & Software Engineering

International Islamic University, Islamabad

Page 3: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

"In the Name of ALLAH, the Most Beneficent, the Most Merciful"

Page 4: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Dissertation

IV

A dissertation submitted to

Department Of Computer Science & Software Engineering,

International Islamic University, Islamabad

As partial fulfillment of the requirements

For award of the degree of

Bachelors in Software Engineering.

Page 5: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Dedication

V

DEDICATION This project is dedicated to our parents, brothers, sisters, family members, teachers and

especially Mr. Syed Muhammad Saqlain who have been a great source of motivation,

inspiration and supported us all the way since the beginning of our studies and project.

Page 6: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Declaration

VI

DECLARATION

We hereby declare that we developed this software and this report entirely on the basis of our

personal efforts made under the sincere guidance of our project supervisor Mr. Syed

Muhammad Saqlain. No portion of this work presented in this report has been submitted in

support of our applications for any other degree or qualification of this or any other University

or institute of learning. We further declare that this software and all associated documents,

reports are submitted as partial requirements for the degree of Bachelor of Science in Software

Engineering.

Muhammad Adnan Ejaz

2111/FBAS/BSSE/F13

Waqar Younas Khan

2112/FBAS/BSSE/F13

Page 7: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Acknowledgement

VII

ACKNOWLEDGEMENT

We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us

health, thoughts and co-operative people to enable us achieve this goal.

We would like to record our gratitude to our supervisor, Mr. Syed Muhammad Saqlain for his

supervision, advice, and guidance to develop an understanding of the project. Above all and the

most needed, he provided us unflinching encouragement and support in various ways.

Finally, we would like to thank everybody who was important to the successful realization of

project including our Parents, brothers, sisters, family members, teachers and friends (Hamza

Javed, Jibran Ahmed Siddiqui, Awais Mushtaq and others).

Page 8: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Project in Brief

VIII

PROJECT IN BRIEF

Project Title Automated Skin Disease Detection

Version 1.0

Core Team Muhammad Adnan Ejaz

Waqar Younas Khan

Supervised by Mr. Syed Muhammad Saqlain

Date Started May 2017

Date Completed October 2017

Language/Technology C#, Aforge Library, Image Processing

System Used Core-2duo, RAM-2GB, Microsoft windows

8.1

Page 9: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Abstract

IX

ABSTRACT

This project (Automated Skin Diseases Detection) is developed in C# technology using image

processing Techniques. In this project, an approach for automated segmentation and

classification of skin diseases is proposed. Initially, coloured skin images are filtered and

converted to grayscale images to remove unwanted hairs and noise. Then the segmentation

process is carried out to extract disease areas. For segmentation, K-means clustering method

is applied. From the disease image, we extracted color features such as; Mean, Standard

deviation, Skewness, Variance and Kurtosis with the help of RGB Histogram. SVM classifier

is used for the classification.

Page 10: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Table of Contents

X

Table of Contents

CHAPTER 1 ......................................................................................................................................................... 1

INTRODUCTION ................................................................................................................................................ 1

1. Introduction .................................................................................................................................................. 2

1.1. Existing Systems .................................................................................................................................. 2

1.2. Problem Statement .............................................................................................................................. 3

1.3. Proposed Solution ............................................................................................................................... 3

1.4. Features ................................................................................................................................................ 5

1.5. Tools & Technologies .......................................................................................................................... 5

CHAPTER 2 ......................................................................................................................................................... 6

SYSTEM ANALYSIS .......................................................................................................................................... 6

2. System Analysis ............................................................................................................................................ 7

2.1. Use Case Model ................................................................................................................................... 7

2.1.1. Use Case Diagram ........................................................................................................................... 8

2.1.2. Use Case Description ...................................................................................................................... 9

2.2. System Sequence Diagrams .............................................................................................................. 15

2.2.1. Browse Image .................................................................................................................................... 15

2.2.2. Gaussian Blur .................................................................................................................................... 16

2.2.3. Gray-scale Conversion ..................................................................................................................... 16

2.2.4. Segmentation ..................................................................................................................................... 17

2.2.5. Features Extraction .......................................................................................................................... 17

2.2.6. Classification ..................................................................................................................................... 18

2.3. Domain Model ................................................................................................................................... 19

2.4. Activity Diagram ............................................................................................................................... 20

CHAPTER 3 ....................................................................................................................................................... 21

SYSTEM DESIGN ............................................................................................................................................. 21

3. System Design ............................................................................................................................................. 22

3.1. Sequence Diagram ............................................................................................................................... 22

3.2. Class Diagram ...................................................................................................................................... 23

CHAPTER 4 ....................................................................................................................................................... 24

IMPLEMENTATION ........................................................................................................................................ 24

4. Implementation ........................................................................................................................................... 25

Page 11: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Automated Skin Disease Detection Table of Contents

XI

4.1 Gaussian Blur .................................................................................................................................... 25

4.2 K-means Clustering .......................................................................................................................... 25

4.3 RGB Color Features Extraction ...................................................................................................... 26

4.4 Classification ..................................................................................................................................... 26

4.4.1. SVM (Support Vector Machine) Algorithm ................................................................................... 27

4.4 Package Diagram .............................................................................................................................. 28

4.5 Deployment Diagram ........................................................................................................................ 28

CHAPTER 5 ....................................................................................................................................................... 29

TESTING ............................................................................................................................................................ 29

5. Test Cases .................................................................................................................................................... 30

5.1. Test Case TC-01: Browse Image ...................................................................................................... 30

5.2. Test Case TC-02: Image Pre-processing ......................................................................................... 31

5.3. Test Case TC-03: Segmentation ....................................................................................................... 32

5.4. Test Case TC-04: Features Extraction ............................................................................................ 33

5.5. Test Case TC-05: Classification ....................................................................................................... 34

CHAPTER 6 ....................................................................................................................................................... 35

CONCLUSION ................................................................................................................................................... 35

6. Conclusion ................................................................................................................................................... 36

CHAPTER 7 ....................................................................................................................................................... 37

USER MANUAL ................................................................................................................................................ 37

7. User Manual ................................................................................................................................................ 38

7.1. Browse Image .................................................................................................................................... 38

7.2. Pre-Processing ................................................................................................................................... 39

7.3. Segmentation & Features Extraction .............................................................................................. 39

7.4. Diagnosis (Classification) ................................................................................................................. 40

REFERENCES ................................................................................................................................................... 41

References ........................................................................................................................................................... 42

Page 12: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 1

INTRODUCTION

Page 13: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 01 Introduction

Automated Skin Disease Detection 02

1. Introduction

Skin being the largest organ/part of a human body, covers the all parts

of the body. Skin functionality in a human body is of more importance. A small disorder in its

functionality might affect the functionality of other parts of the human body. So, a proper care

is necessary for the skin as it is mostly exposed to the outer environment. Otherwise, in case

of any infection or disease it can also affect the other parts of the human body. In case of any

infection or disease, it should be dealt with proper care and treatment otherwise, these

infections and diseases can be worst. There are different types of skin diseases and infections

such as; chickenpox, melanoma, warts, shingles, leprosy and etc. That part of the skin that is

infected is called as skin lesion area. Inexperienced dermatologist might not be able to detect

and differentiate such kind of infections and diseases without any computer-aided diagnostic

system. So, that is the reason that computer aided systems are now an integral part of the

medical field.

In this project, we are working on the detection, segmentation and classification of the skin

diseases by applying C# and image processing techniques & algorithms. The proposed

methodology of the system is listed below as;

Browse Image

Pre-processing

Segmentation

Features Extraction

Classification

1.1. Existing Systems

There are some systems similar to it. But they cannot provide

such functionality in one application. Such as;

Melanoma Detection (Mobile application)

Page 14: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 01 Introduction

Automated Skin Disease Detection 03

1.2. Problem Statement

Dermatology is an important field of medical sciences that

deals with the skin, hair and nails diseases. But among of these, skin has a wide field of study

as there are many diseases that are associated with the skin. These diseases require a proper

treatment and care. Otherwise, these diseases can be turn into severe diseases that can cause

the death. Mole is found almost on the skin of every human being. Without proper care it can

be turn into melanoma that is considered as the skin cancer. There are many other skin diseases

that can turn into severe diseases without proper care. Some skin diseases evolve gradually and

some do not. There are some skin diseases that have no prior symptoms and signs. It is

necessary for a dermatologist to be aware of the different conditions and stages of the skin

diseases and that is difficult for those who are in-experienced. So, for this reason computer

aided systems were developed to help the dermatologist to diagnose different kind of skin

diseases using different techniques and algorithms of image processing. Each disease is

categorized and classified with different image processing techniques.

But majority of such systems are developed in Matlab, C++, Python and Java. While a little

bit of working has been done in other computer languages.

1.3. Proposed Solution

Automated Skin Disease Detection will assist the

dermatologist to diagnose the skin disease and the different stages of that disease. Primary

objective of this project is to develop a system that can detect an image of skin disease and

classify it by applying advance algorithms and techniques of C# and image processing.

Page 15: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 01 Introduction

Automated Skin Disease Detection 04

Figure 1.1 Overview of proposed System

Page 16: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 01 Introduction

Automated Skin Disease Detection 05

1.4. Features

Main features of the Automated Skin Disease Detection System are given

below.

Browsed image conversion into gray-scale image

Noise and hair removal from the gray-scale image

Segmentation by applying K-means clustering

RGB Histogram of the image

Color features extraction based on the RGB histogram

Classification of the skin disease

1.5. Tools & Technologies

Following tools and technologies are used to develop this

system.

Microsoft Visual Studio 2013

C# as a development language and Aforge C# Library

Image Processing algorithms and techniques

Page 17: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 2

SYSTEM ANALYSIS

Page 18: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 07

2. System Analysis

It is a Software Engineering task that is used to reduce the gap

between software design & system level software engineering.

2.1. Use Case Model

Use Case Model Includes:

Use Case Diagram

Use Case Descriptions

System Sequence Diagrams

Page 19: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 08

2.1.1. Use Case Diagram

Figure 2.1 Use Case Diagram

Page 20: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 09

2.1.2. Use Case Description

In software and systems engineering, a use case is a list of

actions or event steps typically defining the interactions between a role (known in the Unified

Modeling Language as an actor) and a system to achieve a goal. The actor can be a human or

other external system.

2.1.2.1. Use Case UC 01: Browse Image

Use Case ID UC-01

Scope Automated Skin Disease Detection

Name Browse Image

Primary Actor User

Goal Browse & Select an Image

Pre-Condition There Should be an image in the target folder.

Post-Condition Image converted to specific size required by the app.

Image Browsed Successfully.

User can see the image uploaded in the application window.

Main Success Scenario 1: User click on the Browse Image Button.

2: User Will select image from the target folder.

3: System will load the image.

4: User can see the image uploaded in the application window.

Alternate If image can’t be uploaded, an error message will be prompted

Table 2.1 Browse Image

Page 21: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 10

2.1.2.2. Use Case UC 02: Gaussian Blur

Use Case ID UC-02

Scope Automated Skin Disease Detection

Name Gaussian Blur

Primary Actor User

Goal To remove noise and un-wanted things from the image such

as hair.

To smooth the image for better result.

To enhance the image quality.

Pre-Condition Use-Case UC-01 is completed successfully.

Image is uploaded in the application window.

Post-Condition Noise & unwanted things removed successfully from the

image.

Image is smoothed, enhanced and clear.

Main Success Scenario There is an uploaded image in the application window.

Uploaded image enhanced and smoothed by applying

Gaussian blur filter.

Alternate If image can’t be smoothed and enhanced, an error message

will be prompted.

Table 2.2 Gaussian Blur

Page 22: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 11

2.1.2.3. Use Case UC 03: Gray-Scale Conversion

Use Case ID UC-03

Scope Automated Skin Disease Detection

Name Gray-Scale Conversion

Primary Actor User

Goal To convert the smoothed color image into Grayscale.

Pre-Condition Use-Case UC-02 is completed successfully.

Post-Condition Smoothed image successfully converted into grayscale image.

User can see the grayscale image in the application window.

Main Success Scenario There is a smoothed image in the application window.

User click the “Convert to grayscale” button.

Application converted the image into grayscale.

User can see the converted grayscale image in the application

window.

Alternate If image can’t be converted to grayscale, then error message

will be prompted by the application.

Table 2.3 Gray Scale Conversion

Page 23: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 12

2.1.2.4. Use Case UC 04: Segmentation

Use Case ID UC-04

Scope Automated skin Disease Detection

Name Segmentation

Primary Actor User

Goal To sub-divide an image into two colors region by applying 2

clusters.

Pre-Condition Use-Case UC-03 is completed successfully.

Pre-processing (Gaussian blur & Grayscale conversion) of the

image is completed successfully.

Post-Condition Segmentation of the grayscale image is completed

successfully.

Sub-division of the grayscale image into two colors is

completed successfully.

User can see the clustered image in the application window.

Main Success Scenario There is clustered (sub-divided) image in the application

window.

Image is sub-divided into two different colors.

User can see the segmented/clustered image in the application

window.

Alternate If image can’t be sub-divided/segmented/clustered, an error

message will prompt.

Table 2.4 Segmentation

Page 24: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 13

2.1.2.5. Use Case UC 05: Features Extraction

Use Case ID UC-05

Scope Automated Skin Disease Detection

Name Features Extraction

Primary Actor User

Goal To find the color features (Mean, standard deviation,

variance, skewness and kurtosis) through RGB histogram.

Pre-Condition Use-Case UC-04 is completed successfully.

Segmented/clustered Grayscale image should be converted

to color image.

Post-Condition Color features extracted successfully and shown on the

application window.

A separated RGB histogram based on the extracted features

and color (RED, Blue & Green) is shown on the application

window.

Main Success Scenario There is an image with extracted color features.

Separate histogram of each color Red, Blue and Green can

be seen on the application window.

Alternate If image desired features can’t be extracted, an error message

will be prompted.

If there is grayscale image instead of color image, an error

message will be prompted.

Table 2.5 Features Extraction

Page 25: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 14

2.1.2.6. Use Case UC 06: Classification

Use Case ID UC-06

Scope Automated Skin Disease Detection

Name Classification

Primary Actor User

Goal To classify the image based on the extracted color features of

the image.

Pre-Condition Use-Case UC-05 is completed successfully.

Image color features has been extracted successfully.

Post-Condition Predicted image based on the extracted features data

matching.

Image classified successfully.

Main Success Scenario There is an image with extracted color features.

Image matched and classified successfully based on the

features.

Alternate If Image can’t be classified due to mismatch of the features,

an error message will be prompted.

Table 2.6 Classification

Page 26: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 15

2.2. System Sequence Diagrams

In software engineering, a system sequence

diagram (SSD) is a sequence diagram that shows, for a particular scenario of a use case, the

events that external actors generate, their order, and possible inter-system events. System

sequence diagrams are visual summaries of the individual use cases. All systems are treated as

a black box; the diagram places emphasis on events that cross the system boundary from actors

to systems. A system sequence diagram should be done for the main success scenario of the use

case, and frequent or complex alternative scenarios.

2.2.1. Browse Image

Figure 2.2 Browse Image

Page 27: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 16

2.2.2. Gaussian Blur

Figure 2.3 Gaussian Blur

2.2.3. Gray-scale Conversion

Figure 2.4 Gray-scale Conversion

Page 28: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 17

2.2.4. Segmentation

Figure 2.5 Segmentation

2.2.5. Features Extraction

Figure 2.6 Features Extraction

Page 29: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 18

2.2.6. Classification

Figure 2.7 Classification

Page 30: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 19

2.3. Domain Model

Figure 2.8 Domain Model

Page 31: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 02 System Analysis

Automated Skin Disease Detection 20

2.4. Activity Diagram

Figure 2.9 Activity Diagram

Page 32: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 3

SYSTEM DESIGN

Page 33: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 03 System Design

Automated Skin Disease Detection 22

3. System Design

System design is the process of defining the components, modules,

interfaces, and data for a system to satisfy specified requirements. System development is the

process of creating or altering systems, along with the processes, practices, models, and

methodologies used to develop them.

3.1. Sequence Diagram

Figure 3.1 Sequence Diagram

Page 34: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 03 System Design

Automated Skin Disease Detection 23

3.2. Class Diagram

Figure 3.2 Class Diagram

Page 35: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 4

IMPLEMENTATION

Page 36: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 04 Implementation

Automated Skin Disease Detection 25

4. Implementation

This chapter will elaborate the interface along with the basic

principles that are kept in view while designing the interface. An idea can become worthless

when it is not conveyed properly. This chapter introduces how this application is implemented.

4.1 Gaussian Blur

The main purpose of the image Pre-processing is to enhance and

restore the image. To remove the noise from the image, we used 3x3 Gaussian blur. It smooth

the image because the Gaussian smoothing in 2D convolution operation is used ‘blur’ images

and remove hair and noise.

Figure 4.1 Implementation of Gaussian blur

4.2 K-means Clustering

Here K-means Clustering is being used in Segmentation

process. As we know that Segmentation is used to subdivide the image into its constituent

objects or regions. K-means clustering work as per given number of clusters. If we want an

image to be in two cluster regions, then we will allocate two clusters before process. K-means

algorithm will act upon allocated number of clusters and will divide the image into two clusters

that will be different from each other on the basis of colour present in that image. K-means

algorithm will run until it completely subdivide the image into two clusters based on the colour

present in the image.

Page 37: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 04 Implementation

Automated Skin Disease Detection 26

Figure 4.2 Clustered colours after implementation of K-means Clustering

4.3 RGB Color Features Extraction

In RGB Color Features Extraction, we

extracted the five different statistics from the disease image based on the Red, Green and Blue

color of the image. These five statistics are “Mean, Standard Deviation, Skewness, Variance

and Kurtosis”. After extraction, these features are also shown in the application along with

their calculations.

4.4 Classification

Here in classification, we divide the datasets into training and testing

data. Then using this data in SVM (Support Vector Machine) Algorithm, we classify the

diseases whether it is a Melanoma, Naevus or just a Normal Mole.

Page 38: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 04 Implementation

Automated Skin Disease Detection 27

4.4.1. SVM (Support Vector Machine) Algorithm

SVM (Support Vector Machine)

algorithm is a machine learning algorithm that is mainly used for classification and regression

analysis. SVM build a model based on training and testing data. In SVM, classification is

performed by finding the hyper-plane that is further used to differentiate the two classes. Then

it calculates the maximize margin between the nearest data. SVM finally select that data in the

hyper plane in the process of classification that has no error.

Figure 4.3 SVM Process Overview

Figure 4.4 Working Illustration of the SVM

Page 39: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 04 Implementation

Automated Skin Disease Detection 28

4.4 Package Diagram

Figure 4.5 Package Diagram

4.5 Deployment Diagram

Figure 4.6 Deployment Diagram

Page 40: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 5

TESTING

Page 41: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 05 Testing

Automated Skin Disease Detection 30

5. Test Cases

A test case is a set of conditions or variables under which a tester will

determine whether a system under test satisfies requirements or works correctly.

5.1. Test Case TC-01: Browse Image

Test Case ID TC -01

Functional Area/Module Browsing Image

Purpose To check the Browsing/loading of an image to the

application.

Action to Perform 1. User click on Browse image button

2. Browsing window opens

3. User selects image

4. Application load selected image

Prerequisites Application is running

Test Case Engineer Waqar Younas Khan

Environment Windows 8.1

Expected Result(s) Image Browsed/loaded successfully

Comments: Test passed successfully

Table 5.1 TC-01- Browse Image

Page 42: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 05 Testing

Automated Skin Disease Detection 31

5.2. Test Case TC-02: Image Pre-processing

Test Case ID Test -02

Functional Area/Module Image Pre-processing

Purpose To smooth the image.

To remove noise from the image to enhance it.

Action to Perform 1. User click on Pre-processing button

2. Gaussian blur is applied

3. Gray-scale conversion

4. Resulted image is shown

Prerequisites Application is running

Test Case Engineer Muhammad Adnan Ejaz

Environment Windows 8.1

Expected Result(s) Pre-processing done successfully

Comments: Test passed successfully

Table 5.2 TC-02- Image Pre-processing

Page 43: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 05 Testing

Automated Skin Disease Detection 32

5.3. Test Case TC-03: Segmentation

Test Case ID Test -03

Functional Area/Module Segmentation

Purpose To subdivide the image into its constituent regions or

objects.

Action to Perform 1. User click on Segmentation button

2. Selected clusters are applied

3. Segmentation should stop when the objects of interest in

an application have been isolated.

Prerequisites Application is running

Test Case Engineer Waqar Younas Khan

Environment Windows 8.1

Expected Result(s) Segmentation done successfully

Comments: Test passed successfully

Table 5.3 TC-03- Segmentation

Page 44: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 05 Testing

Automated Skin Disease Detection 33

5.4. Test Case TC-04: Features Extraction

Test Case ID Test -04

Functional Area/Module Features Extraction

Purpose To check & extract features of the image in application.

Action to Perform 1. Start features extraction

2. Re-convert the gray-scale segmented image to colour

image

3. Extract RGB color features of the image

4. Map the color features histogram based on each colour

Red, Green and Blue of the image

Prerequisites Application is running

Test Case Engineer Muhammad Adnan Ejaz

Environment Windows 8.1

Expected Result(s) Features extracted successfully

Comments: Test passed successfully

Table 5.4 TC-04- Features Extraction

Page 45: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 05 Testing

Automated Skin Disease Detection 34

5.5. Test Case TC-05: Classification

Test Case ID Test -05

Functional Area/Module Classification

Purpose To check the application for classification.

Action to Perform 1. Start Classification

2. System train the classifier on training data.

3. System test the classifier over test data.

5. System calculate accuracy based on results obtained

through test data.

Prerequisites Application is running

Test Case Engineer Muhammad Adnan Ejaz

Waqar Younas Khan

Environment Windows 8.1

Expected Result(s) Classification done successfully

Comments: Test passed successfully

Table 5.5 TC-05- Classification

Page 46: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 6

CONCLUSION

Page 47: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 06 Conclusion

Automated Skin Disease Detection 36

6. Conclusion

We feel very proud after development of “Automated Skin Disease

Detection” application successfully. Before starting of this project we have the theoretical

knowledge of software engineering, but it is far away from theory to develop a real life system

that completely fulfill user requirements.

During the development of the project we learn about many things that are listed below:

Different kind of skin diseases with their types.

How a simple skin disease can be severe without proper care.

How a simple mole can turn into a cancer.

Different types of skin cancers and their causes.

Image processing and its role in medical sciences.

Project management

Latest tools and technologies

Testing strategies

Page 48: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

CHAPTER 7

USER MANUAL

Page 49: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 07 User Manual

Automated Skin Disease Detection 38

7. User Manual

User Manual of any application help the user how to operate the

application. It provides the overview of the application.

7.1. Browse Image

Figure 7.1: Browse Image

Page 50: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 07 User Manual

Automated Skin Disease Detection 39

7.2. Pre-Processing

Figure 7.2: Pre-processing

7.3. Segmentation & Features Extraction

Figure 7.3: Segmentation & Features Extraction

Page 51: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

Chapter 07 User Manual

Automated Skin Disease Detection 40

7.4. Diagnosis (Classification)

Figure 7.4: Diagnosis (Classification)

Page 52: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

REFERENCES

Page 53: In the Name of ALLAH, the Most Beneficent, the Most Merciful · We humbly thank ALLAH (S.W.T) Almighty, the Merciful and the Beneficent, Who gave us health, thoughts and co-operative

References

Automated Skin Disease Detection 42

References

1. https://www.sciencedirect.com/science/article/pii/S1877050915003269

2. http://haishibai.blogspot.com/2009/09/image-processing-c-tutorial-4-gaussian.html

3. https://www.codeproject.com/Articles/33838/Image-Processing-using-C

4. https://code.msdn.microsoft.com/windowsapps/How-to-convert-color-image-7b16899d

5. https://github.com/accord-

net/framework/blob/master/Sources/Accord.MachineLearning/Clustering/KMeans/KMeans.cs#L293

6. https://www.codeproject.com/Questions/216582/Help-about-Image-Segmentation-with-K-means

7. https://www.daniweb.com/programming/software-development/threads/244974/k-means-clustering-

algorithm

8. http://www.codeding.com/articles/k-means-algorithm

9. https://www.codeproject.com/Articles/35895/Computer-Vision-Applications-with-C-Part-II

10. http://www.aforgenet.com/framework/features/image_statistics.html

11. https://github.com/ccerhan/LibSVMsharp

12. https://www.daniweb.com/programming/software-development/threads/373771/divide-dataset-into-

training-and-test-data-set-using-random-sampling

13. https://www.ranorex.com/forum/test-data-from-csv-file-t2395.html

14. https://www.deepdetect.com/tutorials/csv-training/

15. https://blog.testproject.io/2017/02/09/read-data-csv-file-in-c/

16. https://www.skincancer.org/skin-cancer-information/melanoma/the-stages-of-melanoma

17. http://www.dermnet.com/contacts.php

18. https://www.dermnetnz.org/image-catalogue/

19. https://www.mayoclinic.org/diseases-conditions/skin-cancer/multimedia/melanoma/sls-20076095?s=3

20. http://www.fc.up.pt/addi/ph2%20database.html

21. https://www.flickr.com/groups/2733406@N25/pool/

22. http://biogps.org/dataset/tag/melanoma/

23. https://www.melanoma.org/understand-melanoma/resource-library/pictures-of-melanoma