“malarial parasite detection using image processing “

49
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING A PROJECT REPORT ON “MALARIAL PARASITE DETECTION USING IMAGE PROCESSING Submitted in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING IN COMPUTER SCIENCE AND ENGINEERING BY ANUSHA V 1NH15CS704 Under the guidance of Ms. S. SHANMUGA PRIYA Senior Assistant Professor, Dept. of CSE, NHCE

Upload: khangminh22

Post on 01-May-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

A

PROJECT REPORT

ON

“MALARIAL PARASITE DETECTION USING IMAGE PROCESSING “

Submitted in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

BY

ANUSHA V

1NH15CS704

Under the guidance of

Ms. S. SHANMUGA PRIYA

Senior Assistant Professor,

Dept. of CSE, NHCE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

It is hereby certified that the project work entitled “MALARIAL PARASITE DETECTION

USING IMAGE PROCESSING” is a bonafide work carried out by ANUSHA V(1NH15CS704)

in partial fulfilment for the award of Bachelor of Engineering in COMPUTER SCIENCE

AND ENGINEERING of the New Horizon College of Engineering during the year 2018-

2019. It is certified that all corrections/suggestions indicated for Internal Assessment

have been incorporated in the Report deposited in the departmental library. The project

report has been approved as it satisfies the academic requirements in respect of project

work prescribed for the said Degree.

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

Signature of Guide Signature of HOD Signature of Principal

(Ms. S. Shanmuga Priya) (Dr. B. Rajalakshmi) (Dr. Manjunatha)

External Viva

Name of Examiner Signature with date

1. ………………………………………….. ………………………………….

2. …………………………………………… …………………………………..

I

ABSTRACT

Malaria is one of the deadliest diseases ever exists in this planet. Automated evaluation

process can notably decrease the time needed for diagnosis of the disease. This will

result in early onset of treatment saving many lives. As it poses a serious global health

problem, we approached to develop a model to detect malaria parasite accurately from

blood sample with the hope of reducing death rate because of malaria. In this work, we

developed a model by using colour-based pixel discrimination technique and

Segmentation operation to identify malaria parasites from thin smear blood images.

Various segmentation has been used in this method to decrease the false result in the

area of malaria detection. This malaria parasite detection method will be helpful

wherever it is difficult to find the expert in microscopic analysis of blood report and also

limits the human error while detecting the presence of parasites in the blood sample.

One of the disadvantages of diagnosis using manual microscopy methods is that it

requires extensive human intervention during the diagnostic process which can often

lead to late and sometimes erroneous diagnosis. The microscopes requires extensive

training to gain expertise in the diagnosis, and because of the sheer volume of the

samples that need to be analysed, the method is not consistent and is dependent upon

blood smear and stain quality, microscope quality and the expertise of the microscopist.

This project will be overcoming these disadvantages

II

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task

would be impossible without the mention of the people who made it possible, whose

constant guidance and encouragement crowned our efforts with success.

I have great pleasure in expressing my deep sense of gratitude to Dr.Mohan Manghnani,

Chairman of New Horizon Educational Institutions for providing necessary infrastructure

and creating good environment.

I take this opportunity to express my profound gratitude to Dr. Manjunatha , Principal

NHCE, for his constant support and encouragement.

I am grateful to Dr.Prashanth C.S.R, Dean Academics, for his unfailing encouragement

and suggestions, given to me in the course of my project work.

I would also like to thank Dr. B. Rajalakshmi , Professor and Head, Department of

Computer Science and Engineering, for her constant support.

I express my gratitude to Ms. S. Shanmuga Priya, Senior Assistant Professor, my project

guide, for constantly monitoring the development of the project and setting up precise

deadlines. Her valuable suggestions were the motivating factors in completing the work.

Finally a note of thanks to the teaching and non-teaching staff of Dept of Computer

Science and Engineering, for their cooperation extended to me, and my friends, who

helped me directly or indirectly in the course of the project work.

ANUSHA V (1NH15CS704)

III

CONTENTS

ABSTRACT I

ACKNOWLEDGEMENT II

LIST OF FIGURES V

LIST OF TABLES VI

1. INTRODUCTION

1.1. MALARIAL PARASITE DETECTION USING IMAGE PROCESSING 1

1.2. OBJECTIVES OF THE PROPOSED PROJECT WORK 2

1.3. PROJECT DEFINITION 3

1.4. PROJECT FEATURES 3

1.4.1. MODULE DESCRIPTION 4

2. LITERATURE SURVEY

2.1. MACHINE LEARNING 6

2.2. EXISTING SYSTEM 10

2.3. PROPOSED SYSTEM 11

3. REQUIREMENT ANALYSIS

3.1. METHODOLOGY FOLLOWED 16

3.2. FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTS 17

3.3. HARDWARE REQUIREMENTS 19

3.4. SOFTWARE REQUIREMENTS 19

4. DESIGN

4.1. DESIGN GOALS 20

4.2. SYSTEM ARCHITECTURE 21

4.3. DATA FLOW DIAGRAM 22

5. IMPLEMENTATION

5.1. K-NEAREST NEIGHBOR ALGORITHM 23

5.2. IMPLEMENTATION OF MODULES 25

IV

6. TESTING

6.1. UNIT TESTING 31

6.2. INTEGRATION TESTING 31

6.3. VALIDATION TESTING 32

6.4. SYSTEM TESTING 33

6.5. TESTING OF EACH PHASE OF PROJECT 34

7. SNAPSHOT 36

8. CONCLUSION

8.1. FUTURE ENHANCEMENT 38

REFERENCES 40

V

LIST OF FIGURES

Fig no. Figure Name Page no.

1.1 Countries mostly affected by malaria 2

1.4.1 Module Description 5

2.1.1 Neural Network 10

2.1.2 Deep Learning 12

2.3 Flow Chart for Proposed system 14

4.2 System Architecture 21

4.3 Dataflow Diagram 22

5.2.1 Input image 25

5.2.2 Image conversion from gray scale image 26

5.2.3 Linear contrasting of image 26

5.2.4 Histogram Equalization 27

5.2.5 Brighten details except nucleus 28

5.2.6 Highlight all border including nucleus 28

5.2.7 Remove unnecessary blood component 29

7.2.8 Thresholding in Otsu’s method 29

7.2.9 Morphological Operations 30

6.1 Testing processes 32

7.1 Image comparison 36

7.2 Data Set 36

7.3 Output in command prompt 37

VI

LIST OF TABLES

Table no. Table Name Page no.

3.1 Hardware Requirements 19

3.2 Software Requirements 19

6.1 Test case for image file upload 34

6.2 Test case for image containing blood components 34

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 1

CHAPTER 1

INTRODUCTION

1.1 MALARIAL PARASITE DETECTION USING IMAGE PROCESSING

Malaria is one of the severe diseases caused by the protozoan parasites of the genus

Plasmodium, transmitted via female Anopheles mosquito. During the process of complex

life cycle of parasites in growing and reproducing inside the human body, the red blood cell

(RBCs) are used as hosts and destroyed afterwards. World Health Organization estimates

that in 2015 mentioning in their website[8] , 212 million clinical cases of malaria occurred,

and 429,000 people died of malaria, most of them children in Africa. Also, as malaria causes

so much illness and death, the disease hampers on many national economies and WHO also

discovers that many countries with malaria are already among the poorer nations it is

difficult for them to break a vicious cycle of disease and poverty. Normally malaria happened

because of four types of plasmodium species called Plasmodium falciparum, Plasmodium

vivax, Plasmodium ovule, Plasmodium malariae. Among all of this Plasmodium falciparum

is responsible for malaria fever in most of the cases.

Malaria is a mosquito borne disease caused by parasites of genus plasmodium. The

person gets affected by malaria when malaria parasites are introduced into circulatory

system by infected female anopheles mosquito bites. Diagnosis of malaria parasitaemia

from blood smears is a subjective and time-consuming task for pathologists. The automatic

diagnostic process will reduce the diagnostic time, also it can be worked as a second opinion

for pathologists and may be useful in malaria screening. This project presents an automatic

method for malaria diagnosis from thin blood smears. Loading the image is the first phase,

later the image is being pre-processed to remove unwanted noise and brightness. Feature

extraction and successive segmentation techniques are then applied on the image to focus

on important parts of the image. Finally, Morphological operations are carried out to

differentiate parasite cells from the RBC cells and their respective count is determined.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 2

Fig 1.1 countries mostly affected by malaria[2]

1.2 OBJECTIVE OF THE PROPOSED PROJECT

The aim at “malaria parasite detection based on image processing”[1], to introduce

fast and accurate method for malaria parasite detection. A single blood smear image can

be processed multiple times for various detection of blood components unlike or original

blood sample using both thick and thin films, The objective are to differentiate RBC and

the infected cells which are present in blood smear side, mitigate problems posed by

different conditions such as noisy and degrading to set on efficient and awareness result.

Better image enhancement algorithm and Morphological operation are proposed to get

the count of RBC and parasite in order to speed up the diagnosis process.

Input: Digitalized malaria blood smear image

Output: Differentiate normal and infected cell and give if parasites infected cells or not.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 3

1.3 PROBLEM DEFINITION

The method made use of the intensity features of Plasmodium parasites and

Erythrocytes. Images of infected and non-infected erythrocytes were acquired, pre-

processed, relevant features extracted from them and eventually diagnosis was made

based on the features extracted from the images. A set of features based on intensity have

been proposed, and the performance of these features on the red blood cell samples from

the created database have been evaluated using an artificial neural network (ANN)

classifier. The results have shown that these features could be successfully used for

malaria detection.

1.4 PROJECT FEATURES

The strategy made utilization of the power highlights of Plasmodium parasites and

erythrocytes. Pictures of tainted and non-contaminated erythrocytes were obtained, pre-

handled, pertinent highlights separated from them and inevitably analysis was made

dependent on the highlights separated from the pictures. An arrangement of highlights

dependent on force have been proposed, and the execution of these highlights on the red

blood cell tests from the made database have been assessed utilizing a fake neural system

(ANN) classifier. The outcomes have demonstrated that these highlights could be

effectively utilized for intestinal sickness discovery.

1.4.1 MODULE DESCRIPTION

This will describe various phases of the project that is what are the steps to be

followed to get the accurate output. There are mainly 5 phases in malarial parasite

detection using image processing they are image acquisition, pre-processing of image,

segmentation morphological operations and cell counting.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 4

Image Acquisition

In any image processing project, data collection plays an important role. Finding the

required datasets is a prime task. The data preparation typically consumes about 90% of the

time of the project. Once available data sources are identified, they need to be selected,

cleaned, constructed and formatted into the desired form. One of the forms of image

acquisition in image processing is known as real-time image acquisition[4]. This usually

involves capturing real images obtained from blood samples of malaria patients preparing

slides of the smear and digitalizing it. This digital image is used as a source.

Pre-processing

The segment of input image of (250 × 250) pixels is selected for further processing. The input

image may have low brightness and contrast. Real-world images are highly susceptible to

noisy, missing, and inconsistent data. Low-quality data will lead to low-quality mining

results. Hence it is essential to pre-process the data. There are a number of pre-processing

techniques[5]. In this work, we mainly aim at median filter and histogram equalization.

Segmentation

Segmentation divides the image into its constituent regions or objects. The goal of

segmentation is to simplify and/or change the representation of an image into something

that is more meaningful and easier to analyse.[6]Image segmentation is typically used to

locate objects and boundaries in images. In our study we first remove noise[7], adjust

intensity of the image, perform grey threshold and convert the image to binary form[9].

Morphology Operation

Morphological operations are image processing operations which processes images based

on shapes. It applies a structuring element of specific shape and size on input image. The

output image is created by comparing the value of each pixel with its neighbours. These

operations are sensitive to the shape of the structuring. Further operations such as holes

filling, overlaying is carried out which helps in detection of infected cells[11].

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 5

Cell Counting

By comparing the overlay of original image and masked image and based on the intensity

profile, differentiation between the normal and infected cells is carried out. Finally using

mathematical operations, the count of number of such cells is determined and is displayed.

Fig 1.4.1 module description

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 6

CHAPTER 2

LITERATURE SURVEY

2.1 MACHINE LEARNING

Literature survey is the most essential phase in software improvement process.

Before building up the software it is important to decide the time factor, economy and the

complexity. When these things are fulfilled, at that point following stages is to figure out

which working framework and operating system can be utilized for building up the

software. When the programmer begins fabricating the device the developers require

parcel of outer help. This help can be acquired from book or from sites. Before building

the software, the above thought are considered for building up the proposed software.

The developer has to go through the existing software and should realize the advantages

and disadvantages of the software and should apply this knowledge in implementing

proposed system.

Machine Learning

Machine learning (ML) is the investigation of algorithm and numerical models that

a computer framework use to logically enhance their execution performance on a

particular undertaking task. Machine learning algorithms manufacture a numerical model

of test sample data which is also called as "training dataset", with the end goal to settle

on predictions or decisions without being externally modified to execute the undertaking

task.

Machine learning calculations and algorithms are applied in the utilizations of email

separating, recognition of network attackers, and personal compute vision, where it is

very difficult to develop algorithms for such purposes.

Machine learning is firmly identified with computational measurements, which

circles around making predictions and decisions utilizing PCs. The investigation of

numerical streamlining conveys techniques, hypothesis and application spaces to the field

of machine learning. data mining is a field of concentrate inside machine learning, and

spotlights on exploratory information or data investigation through unsupervised

learning.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 7

There are various learning methodologies in machine learning such as supervised,

unsupervised machine learning etc.

Benefits of Machine Learning:

• Machine learning has very huge applications in financial sector and in banking.

• We can also find its application in other fields such as publishing, healthcare etc.

• Various social medias such as Instagram, Facebook and google uses machine

learning techniques to identify the user and understand their behaviour and send

the appropriate advertisements based on their interests.

• It efficiently utilizes all resources and data uses various concepts such as deep

learning, neural networks to understand the user and their behaviour.

• This can also be used to predict the human behaviour based on his social data,

weather notifications etc.

Disadvantage of Machine Learning:

• Machine learning uses vast amount of data to get the accurate result, hence the

process may be time consuming.

• Selecting the appropriate algorithm from the vast set of algorithms is also a

difficult and time-consuming task.

• Lack of variability, machine learning algorithms need huge amount of data, if they

don’t receive it, they may find it difficult to come to a proper decision.

The k-Nearest Neighbours algorithm:

In pattern recognition, the k-Nearest Neighbours algorithm[10] (or k-NN for short) is a non-

parametric method used for classification and regression. An object is classified by the

“distance” from its neighbours, with the object being assigned to the class most common

among its k distance-nearest neighbours.

If k = 1, the algorithm becomes nearest neighbour algorithm and the object is

classified to the class of its nearest neighbour. Distance is a key word in this algorithm, each

object in the space is represented by position vectors in a multidimensional feature space.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 8

It is usual to use the Euclidean distance to calculate distance between two vector

positions in the multidimensional space. Classification of the segmented objects Distance

between two scenarios is computed using Euclidean distance function d(x,y) where are

scenarios composed of N features, such that x={x1,….,xN} + y={y1,….,yN}

Euclidean Distance Measuring: dE(x,y ) = ∑√(x2i-yi

2) The classification rules are

generated by the training samples themselves without any additional data. The KNN

classification algorithm predicts the test sample’s category according to the K training

samples which are the nearest neighbours to the test sample, and judge it to that category

which has the largest category probability.

During the training process, we use only the true class ω of each training sample to

train the classifier, while during testing we predict the class ω^ of each test sample. It

warrants noting that kNN is a "supervised" classification method in that it uses the class

labels of the training data. Unsupervised classification methods, or "clustering" methods, on

the other hand, do not employ the class labels of the training data.

• Supervised Technique

• Used for Classification or Regression

• Used for classification and regression of known data where usually the target

attribute/variable is known beforehand.

• KNN needs labelled points

Supervised learning uses a set of example pairs and the aim is to find a function in the

allowed class of functions that matches the examples. In other words, we wish to infer the

mapping implied by the data; the cost function is related to the mismatch between our

mapping and the data and it implicitly contains prior knowledge about the problem domain.

A commonly used cost is the mean-squared error, which tries to minimize the average

squared error between the network's output and the target value over all the example pairs.

Minimizing this cost using gradient descent for the class of neural networks

called multilayer perceptron’s (MLP), produces the backpropagation algorithm for training

neural networks.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 9

Tasks that fall within the paradigm of supervised learning are pattern recognition (also

known as classification) and regression (also known as function approximation). The

supervised learning paradigm is also applicable to sequential data (e.g., for hand writing,

speech and gesture recognition). This can be thought of as learning with a "teacher", in the

form of a function that provides continuous feedback on the quality of solutions obtained

thus far.

Neural networks

Artificial neural networks (ANN) are registering frameworks ambiguously

enlivened by the natural neural networks that comprise creature brains. The neural

network itself isn't a calculation, yet rather a structure for some, extraordinary machine

learning calculations and algorithm to cooperate and process complex information inputs.

Such frameworks "learn" to perform assignments by thinking about precedents, for the

most part without being modified with any undertaking explicit tenets. For instance, in

picture acknowledgment or recognition they may figure out how to recognize pictures

that contain dogs by examining precedent pictures that have been physically named as

"dogs" or "no dogs" and utilizing the outcomes to distinguish felines in different pictures.

They do this with no earlier information about dog, for instance, that they have hide, tails,

bristles and dog like appearances. Rather, they consequently produce distinguishing

attributes from the learning material that they need to process.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 10

Fig 2.1.1 Neural Networks

Numerous predominant progresses have been helped by the utilization of cheap

Computer imitations. Following an underlying time of eagerness, the field endure a time

of dissatisfaction and offensiveness or frustration. Amid this period when financing and

expert help was negligible, vital advances were made by generally few researchers. These

pioneers could create persuading innovation which outperformed the constraints

recognized by Minsky and Papert. they wrote a book in which they summed up a general

sentiment of disappointment (against neural networks) among analysts, and was

subsequently acknowledged by most without further examination. At present, the neural

network field appreciates a resurgence of intrigue and a comparing increment in

financing.

The primary counterfeit neuron was delivered in 1943 by the neurophysiologist

Warren McCulloch and the scholar Walter Pits. However, the innovation accessible around

then did not enable them to do excessively.

Some of the important use of neural networks are they learn by themselves that

is they follow adaptive learning techniques they receive vast amount of data as input and

based on the inputs given they learn by themselves and helps in gathering the required

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 11

output these networks can organize and synchronize the data that they gather as the input

they organize the data by themselves by learning by themselves these network can carry

any number of processes parallelly there is no limit for number of operations happening

in given interval of time any number of instructions can be executed simultaneously and

these are very accurate possibilities of error or failures are very less because they learn by

mistakes made by themselves they are very efficient.

Deep learning

Deep learning is a piece of a more extensive group of machine learning techniques

dependent on learning information portrayals, instead of assignment explicit calculations.

Learning can be managed, semi-regulated or unsupervised.

Deep learning models, for example, deep neural systems, deep conviction systems

and repetitive neural systems have been connected to fields including PC vision, discourse

acknowledgment, characteristic dialect handling, sound acknowledgment, interpersonal

organization separating, machine interpretation, bioinformatics, medicate structure,

restorative picture investigation, and pre-packaged game projects, where they have

created results practically identical to and now and again better than human specialists.

Deep learning models are dubiously motivated by deep conviction systems and

repetitive neural systems have been connected to fields including PC vision data preparing

and correspondence designs in natural sensory systems yet have different contrasts from

the auxiliary and useful properties of organic cerebrums (particularly human minds),

which make them incongruent with neuroscience confirmations. This deep learning

methodology is similar to neural networks but is quite distinguishable simple neural

networks contain one hidden layer between input and output layers but the deep learning

networks contain multiple hidden layers between input layer and the output layer.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 12

Fig 2.1.2 Deep learning

Deep learning accomplishes acknowledgment exactness at more elevated amounts

than any time in recent memory. This enables purchaser hardware to meet client desires,

and it is important for security basic applications like driver less vehicles. Late advances in

deep learning have enhanced to the point where deep learning beats people in a few

assignments like characterizing objects in pictures. Deep learning requires a vast volume

of data to work upon the input and give the accurate output for example if you consider

driverless car it needs very vast volume of instructions and inputs which may be coded or

in the form of video to drive the car accurately in various difficult situations.

Deep learning is the trending technology in the present world and is used in various

fields for example it is used to run driverless car so that in the near future the cars can be

run without the help of driver , for this the deep learning technologies are used vast

volume of videos and the instructions are fed to the system so that the system takes

accurate decision in various difficult situations the deep learning is also used in the

defence sector to situate the unknown aircrafts entering the friendly territory to get view

upon what kind of enemy battleship or aircraft it is what all the weaponries it contains

from the pretty far distance itself. Deep learning is also used in medical field in detecting

the cancer cells present in the human body there has been development of the

microscope which accurately tells the amount of cancer cells present in the human body

and the stage of cancer. It is also used in electronic fields various personal assistance

systems has been developed such as google home, Alexa, google mini, which accurately

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 13

understand their user’s behaviour and acts according to it with the help of existing dataset

of their users and with the help of deep learning.

2.2 EXISTING SYSTEM

It includes a number of technologies, including improvements to existing technologies

(e.g. RDTs; nucleic acid tests) and novel platforms (e.g. hemozoin). The degree of progress

among pipeline technologies varies. While there has been relatively rapid progress in a

few areas (e.g. development of point of care/ POC G6DP tests and highly sensitive RDTs;

the aforementioned recently launched products) additional work (e.g. evidence; policy

endorsements; regulatory approvals) will be needed to support widespread adoption. In

contrast, many technologies that have been in the pipeline for several years are not

advancing rapidly through the later stages of development (e.g. evaluation;

regulatory/policy; introduction stages). The most commonly used methods for laboratory

diagnosis of malaria are microscopic examination of stained blood films and detection of

parasite antigen or nucleic acid (2, 9). Of these, microscopic examination of thick and thin

blood films remains the gold standard for malaria diagnosis. Rapid antigen detection

methods and molecular amplification tests are also increasingly employed for malaria

diagnosis and are useful adjunctive tests. Tests for detection of antiplasmodial antibodies

are commercially available but are not recommended for diagnosis of acute disease. The

Clinical and Laboratory Standards Institute (CLSI) recommends that repeat blood films be

obtained and examined every 6 to 8 h for up to 3 days (if clinically indicated) until malaria

is definitively excluded from the differential diagnosis

Disadvantages:

• One of the drawbacks of the existing system is be expensive.

• Human error in detection.

• Time consuming.

• No digital evidence of the diagnosis.

• Displaying the wrong output.

• Unable to recognize all the contents given as input.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 14

2.3 PROPOSED SYSTEM

The main aim is to develop a software that read the blood sample image content,

recognize it, use machine learning algorithms and say if cell is infected by malaria or not.

In the proposed system the software takes the blood sample image data in the form of

pictures as an input and applies various concept of machine learning and artificial

intelligence such as deep learning, neural networks to identify and recognize the data from

the user input and output is in text format.

Fig 2.3 Flow chart for proposed system.

In image gathering step the image of blood sample image content will be taken with

the help of image folder and given as the input to the blood sample image recognition so.

This image can be any format such as jpg, jpeg or png the software takes image of any

format and passes the image for pre-processing process.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 15

In the next step prepossessing of image takes place and some operation such as

binarization, noise reduction and edge detection take place. In segmentation process[12]

the entire image will be divided into sub images of each characters. In the next step that

is classification and recognition which can also be considered as the main , decision making

step of the entire process, which uses many logarithmic and mathematical functions such

as log ang sigmoid activation function to train the data and to recognize the

characters[13].in the post processing step it involves in displaying the converted blood

sample image data in digital text format on the user screen text can be stored in internal

storage of the device or in any external storage devices.

Advantages:

• Avoids storage required for storing large amount of blood sample image data by

converting them into digital format.

• Avoids loss of data information by storing it in local device or in cloud.

• Accurate conversion of blood sample image data into digital format.

• If you are unable to recognize the blood sample image manually you can put the

blood sample image data input and get the proper output.

• Faster conversion of blood sample image data to digital format

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 16

CHAPTER 3

REQUIREMENT ANALYSIS

3.1 METHODOLOGY FOLLOWED

This project uses concepts of machine learning such as deep learning, neural

networks, image processing and uses this methodology to meet the objective of the

project which can be implemented with the help of the MATLAB. It is used to store the

large volume of dataset which contains various possibilities of the blood sample image

texts and also to apply various mathematical functions such as logarithmic function,

sigmoid function on the dataset to obtain the correct form of blood sample image input

by using deep learning concepts, the code for the operation is written in MATLAB.

Fig 3.1.1 Matlab

MATLAB is a tool for mathematical (technical) calculations. It allows you to plot or visualize

data in many different ways, perform matrix algebra, work with polynomials or integrate

functions. Like in a programmable calculator, you can create, execute and save a sequence

of commands in order to make your computational process automatic. It can be used to

store or retrieve data. In the end, MATLAB can also be treated as a user-friendly

programming language, which gives the possibility to handle mathematical calculations in

an easy way. In summary, as a computing/programming environment, MATLAB is

especially designed to work with data sets as a whole such as vectors, matrices and

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 17

images. MATLAB is an interactive system; commands followed by Enter are executed

immediately. The results are, if desired, displayed on screen. However, execution of a

command will be possible if the command is typed according to the rules.

3.2 FUNCTIONAL REQUIREMENTS AND NONFUNCTIONAL

REQUIREMENTS

FUNCTIONAL REQUIREMENTS

In software engineering, the functional requirements characterize an element or a

function of a software framework or its part. A function is portrayed as an arrangement

of sources of info, inputs and outputs the conduct, and yields. These functional

requirements might be counts, specialized points of interest, data and information control

and handling and other explicit usefulness that characterize what a system should achieve.

Behavioural requirements portraying every one of the situations where the framework

utilizes the functional requirements are caught being used cases.

Here, in this project the system has to execute these tasks:

• Must be able to take the blood smear inputs in the form of the images.

• Must be able to pre-process the image and should reduce the noise of the image

• Must be able to perform classification and identification algorithms and should

recognize the blood smear input.

• Must be able to display the accurate output in text format.

NON-FUNCTIONAL REQUIREMENTS

In system engineering a non-useful or non-functional requirement is a necessity

that indicates criteria that can be utilized to pass judgment on the activity of a system. This

should be diverged from functional necessities that characterize explicit conduct or

functions. The arrangement for executing functional necessities or requirement is point

by point explained in the system structure or the system design and architecture. In order

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 18

to achieve goal of the project developer should give equal importance to both functional

and non-functional requirements. Some of the non-functional requirements are

accessibility portability, security, scalability etc.

Some of the quality attributes are as follows:

ACCESSIBILITY:

Accessibility is the general term which specifies how the developed service or the

software is accessible for the end user.

In this project any end user who has the blood sample image input data and who wants it

to be in the text format can have access of the project.

MAINTAINABILITY:

Maintainability is nothing but how the system which is developed can update itself

with respect to time how the system corrects the defects and bugs which occurred after

deployment and how it will meet users’ new requirements.

Since the program is developed using MATLAB it is easy to detect and correct the

errors which occur during the execution. New functionalities can be added to the project

based on the user requirement just by adding required files or APIs for the existing

software.

SCALABILITY:

This will give the idea about how the system acts or how the system gives its

throughput when the load of the input data is changed.

System can work normally under any amount of inputted blood sample data.

PORTABILITY:

Portability is one of the important features of non-functional requirements, it will

give the idea about whether the software need to be rewritten when software moves

from one device to another.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 19

Project uses MATLAB so the project can be easily installed and can be used in any

other platforms.

3.3 HARDWARE REQUIREMENTS

Processor : Any Processor above 500 MHz

RAM :512 Mb

Hard Disk :10 GB

Input Device : Standard Keyboard and Mouse

Output Device : VGA and High-Resolution Monitor

3.4 SOFTWARE REQUIREMENTS

Operating system : Windows 7

Software for coding : MATLAB

IDE : MATLAB

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 20

CHAPTER 4

DESIGN

4.1 DESIGN GOALS

To enable a secured and efficient data transmission between input and output the

developer need to follow set of guidelines as listed below.

INPUT/OUTPUT PRIVACY

No sensitive information of the user should be stored by the developer and developer

should warn the user not to upload their private details so as to protect the loss of user’s

personal data because of cyber theft. The user should be given clear cut idea about not to

post their personal information and they should be made aware of malware attacks,

hacking and cyberthefts. The user input must be secured from all kind of thefts.

EFFICIENCY AND CONSISTENCY

The software developed should efficiently take the blood sample image input from

the user in the form of the image and it should systematically perform the pre-processing

task which involves binarization[16], noise reduction. System should also segment the input

into individual images and perform machine learning algorithms and neural network

concepts on the input and should recognize the input correctly all the steps should go as

planned there should not be any jump from one step to another or between the steps by

leaving the intermediate steps .all the steps should execute as organized in order to get

the expected output.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 21

4.2 SYSTEM ARCHITECTURE

The system should be developed in such a format that it should be able to get the

blood sample input in the form of picture, this picture input can be in any format

irrespective of jpg, jpeg or png. After this pre-processing[22] of the image takes place in

which the entire picture is divided into small pixels where each pixel handles individual

characters and reduces the noise of the picture and converts it into its different image

segmentation format.

Next step involves in reorganization and classification[15] of blood sample images with

the help of various machine learning techniques such as deep learning neural networks

etc so that accurate identification of the blood sample input is done and the last step

involves in displaying if the cell is infected or not in text format.

Fig 4.2 System architecture.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 22

4.3 DATA FLOW DIAGRAM

Fig 4.3 Dataflow diagram of the process.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 23

CHAPTER 5

IMPLEMENTATION

5.1 K - NEAREST NEIGHBOR algorithm implemented

function [idx, D] =knnsearch(varargin)

[Q, R, K, fident] = parseinputs (varargin {:});

error (nargoutchk (0,2, nargout));

% C2 = sum (C.*C,2)';

[N, M] = size(Q);

L=size(R,1);

idx = zeros (N, K);

D = idx;

if K==1

for k=1: N

d=zeros(L,1);

for t=1:M

d= d+abs(R(:,t)-Q(k,t));

end

if fident

d(k)=inf;

end

[D(k),idx(k)]=min(d);

end

else

for k=1:N

d=zeros(L,1);

for t=1:M

d= d+abs(R(:,t)-Q(k,t));%Distance

end

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 24

if fident

d(k)=inf;

end

[s,t]=sort(d);

idx(k,:)=t(1:K);

D(k,:)=s(1:K);

end

end

if nargout>1

D=sqrt(D);

end

function [Q,R,K,fident] = parseinputs(varargin)

error(nargchk(1,3,nargin));

Q=varargin{1};

if nargin<2

R=Q;

fident = true;

else

fident = false;

R=varargin{2};

end

if isempty(R)

fident = true;

R=Q;

end

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 25

if nargin<3

K=1;

else

K=varargin{3};

end

5.2 Implementation of the modules

First step is the input image is taken in the form of jpeg / png image. The pixel must be

clear. It must be of a pre stained blood sample in order to help with the classification

faster.

Fig.5.2.1 Input image

a=rgb2gray(a1); is used to convert to grey scale image.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 26

Fig.5.2.2 Image converted to grey scale image

Input image with intensity values adjusted by a linear contrasting stretching[16]. The

Contrast Adjustment[17] block adjusts the contrast of an image by linearly scaling the pixel

values between upper and lower limits. Pixel values that are above or below this range

are saturated to the upper or lower limit value, respectively.

Fig.5.2.3 linear contrasting of image

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 27

Histogram equalization[23] involves transforming the intensity values so that the histogram

of the output image approximately matches a specified histogram. By default, the

histogram equalization function, histeq, tries to match a flat histogram with 64 bins, but

you can specify a different histogram instead. The original image has low contrast, with

most pixel values in the middle of the intensity range. histeq produces an output image

with pixel values evenly distributed throughout the range.

Fig.5.2.4 Histogram Equalization

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 28

Fig.5.2.5 Brighten all details except the nucleus[20]

Fig.5.2.6 Highlight all border including the nucleus

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 29

Fig.5.2.7 Remove unnecessary blood components[18]

Otsu thresholding[9] : Calculates optimum threshold assuming that image contains black

and white histogram

Fig.5.2.8 Thresholding using Otsu’s method

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 30

Morphological image[24] processing is a collection of non-linear operations related to

the shape or morphology of features in an image morphological operation rely only on

the relative ordering of pixel values, not on their numerical values, and therefore are

especially suited to the processing of binary images[21].

Fig.5.2.9 Morphological Opening

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 31

CHAPTER 6

TESTING

The motivation behind testing is to find mistakes. Testing is the way toward

attempting to find each possible deficiency or shortcoming in a work item. It gives an

approach to check the usefulness of parts, sub congregations, gatherings and additionally

a completed item it is the way toward practicing programming with the goal of

guaranteeing that the Software framework lives up to its prerequisites and user desires

and does not bomb in an unsuitable way. There are different kinds of test. Each test type

tends to a particular testing necessity.

TYPES OF TESTS

6.1 UNIT TESTING

Unit testing includes the structure of experiments that approve that the inside

program rationale is working appropriately, and that program inputs produce legitimate

yields. All choice branches and inner code stream ought to be approved. It is the trying of

individual programming units of the application .it is done after the fruition of an

individual unit before joining. This is an auxiliary testing, that depends on information of

its development and is obtrusive. Unit tests perform essential tests at segment level and

test a particular business procedure, application, and additionally framework design. Unit

tests guarantee that every one of a kind way of a business procedure performs precisely

to the archived details and contains plainly characterized sources of info and anticipated

outcomes.

6.2 INTEGRATION TESTING

Integration tests are intended to test incorporated programming segments to

decide whether they really keep running as one program. Testing is occasion driven and is

progressively worried about the fundamental result of screens or fields. Reconciliation

tests exhibit that despite the fact that the segments were separately fulfillment, as

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 32

appeared by effectively unit testing, the blend of segments is right and reliable. Mix testing

is explicitly gone for uncovering the issues that emerge from the mix of parts.

6.3 VALIDATION TESTING

A validation test (EVT) is performed on first designing models, to guarantee that

the fundamental unit performs to plan objectives and details. It is imperative in

distinguishing plan issues, and comprehending them as right off the bat in the structure

cycle as would be prudent, is the way to keeping ventures on schedule and inside spending

plan. Over and over again, item plan and execution issues are not identified until late in

the item advancement cycle — when the item is prepared to be delivered. The familiar

aphorism remains constant: It costs a penny to roll out an improvement in building, a dime

underway and a dollar after an item is in the field.

Confirmation is a Quality control process that is used to assess whether an item,

administration, or framework follows guidelines, details, or conditions forced toward the

beginning of an improvement stage. Check can be being developed, scale-up, or

generation. This is frequently an inner procedure.

Validation is a Quality confirmation procedure of setting up proof that gives a high

level of affirmation that an item, administration, or framework achieves its expected

necessities. This regularly includes acknowledgment of readiness for reason with end

users and other item partners. The testing procedure diagram is as per the following:

Figure 6.1: The testing process

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 33

6.4 SYSTEM TESTING

System testing of programming or equipment is trying led on a total, coordinated

framework to assess the framework's consistence with its predetermined necessities. This

testing falls inside the extent of discovery testing, and thusly, ought to require no learning

of the inward plan of the code or rationale.

When in doubt, system testing takes, as its information, the majority of the

"integrated" programming parts that have effectively passed reconciliation testing and

furthermore the product framework itself coordinated with any pertinent equipment

system(s).

System testing is a progressively constrained kind of testing; it looks to distinguish

abandons both inside the "between arrays" and furthermore inside the framework all in

all. System testing is performed on the whole framework with regards to a Functional

Requirement Specification(s) (FRS) or potentially a System Requirement Specification

(SRS).

system testing tests the plan, yet in addition the conduct and even the trusted

desires for the client. It is likewise proposed to test up to and past the limits characterized

in the product/equipment necessities specification(s).

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 34

6.5 TESTING OF EACH PHASE OF THE PROJECT.

Serial Number of Test Case TC 01

Module Under Test IMAGE file upload.

Description

When the user enters the image file

which is needed to be converted, it

should accept the file

Output If the file is in jpeg/png format, then it

should be accepted or else it should say

wrong format.

Remarks Test Successful.

Table 6.1: Test case for image file upload

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 35

Serial Number of Test Case TC 02

Module Under Test Checking for blood components

Description To check for various blood components

and verify that it is not a blank image.

Input Image containing nucleus, WBC, RBC etc

Output The blood sample image undergoes all

the procedure if the blood components

are present. if it is blank it will display as

image is blank.

Remarks Test Successful.

Table 6.2: Test case for image containing blood cell components

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 36

CHAPTER 7

SNAPSHOT

Fig.7.1 images comparison

Fig.7.2 Data Set

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 37

Fig.7.3 Output in command prompt

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 38

CHAPTER 8

CONCLUSION AND FUTURE ENHANCEMENT

8.1 CONCLUSION

The proposed system provides a robust automated system for detection of malaria

parasites in thin and thick blood films. The detection of Malaria parasites is done by

pathologists manually using microscopes. So, the chances of false detection due to human

error are high, which in turn can result into fatal condition. This system curbs the human

error while detecting the presence of malaria parasites in the blood sample by using image

processing techniques. This is achieved this goal by using Image Segmentation,

Morphological operations, edge detection technique to detect malaria parasites in images

acquired from digitalized blood samples. The system acts in a robust manner so that it is

unaffected by the exceptional conditions and achieved high percentages of sensitivity,

specificity and prediction values.

This also can be made as a digital record with proof for every individual patient so

that it could help them in any future further treatments or this can be referred by research

scholars for research of a specific type of medicine / prevention etc.

In the method used, we carry out morphological operations that have a good

efficiency because they consider the cells at the limit of the image and the superposition

of the cells. In comparison with previous work in this field, people were required to learn

the system, but in this work, we have introduced a new method that eliminates this need.

The blood cell count is only limited to red blood cells, but white blood cells and platelets

are equally important.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 39

8.2 FUTURE ENHANCEMENT

• Facility of cloud storage for each user. Each patient gets a login.

• Access of data through Mobile devices.

• Store the blood sample image data through encryption to provide better security.

• Interactive user interface.

• Facilities for Backup creation.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 40

REFERENCES

[1] Detection of Malaria Parasites Using Digital Image Processing Ahmedelmubarak

Bashir1, Zeinab A.Mustafa2, Islah Abdelhameid1, Rimaz Ibrahem1Sudan University of

Sciences and Technology, College of Engineering School of Electronics Engineering1,

Biomedical Engineering Department

[2] W. World Health Organization, “Who Report 2015,” 2015.

[3] N. R. Shet and N. Sampathila, “An Image Processing Approach for Screening of Malaria,”

Canar. Eng. Coll. Mangalore, pp. 395–399, 2015.

[4] D. A. Ghate and P. C. Jadhav, “Automatic Detection of Malaria Parasite from Blood

Images,” Int. J. Adv. Comput. Technol., vol. 1, no. 3, pp. 66–71, 2012.

[5] M. S. Suryawanshi and P. V. V Dixit, “Comparative Study of Malaria Parasite Detection

using Euclidean Distance Classifier & SVM,” vol. 2, no. 11, pp. 2994–2997, 2013.

[6] A. Anand, V. K. Chhaniwal, N. R. Patel, and B. Javidi, “Automatic identification of

malaria-infected RBC with digital holographic microscopy using correlation algorithms,”

IEEE Photonics J., vol. 4, no. 5, pp. 1456–1464, 2012.

[7] V. Špringl, “Automatic Malaria Diagnosis through Microscopy Imaging,” Czech Tech.

Univ. Prague Fac. Electr. Engeneering, 2009.

[8] CDC, “CDC - Malaria - About Malaria - Biology - Malaria Parasites,” USA Government,

2012. [Online]. Available:http://www.cdc.gov/malaria/about/biology/parasites.html.

[9] N. Bhargava and R. Bhargava, “Threshold and binarization for document image analysis

using otsu ’ s Algorithm,” Int. J. Comput. Trends Technol., vol. 17, no. 5, pp. 272–275, 2014.

[10] Aimi Salihah Abdul-Nasir, Mohd Yusoff Mashor, and Zeehaida Mohamed, “Colour

Image Segmentation Approach for Detection of Malaria Parasites Using Various Colour

Models and k -Means Clustering,” WSEAS Trans. Biol. Biomed., vol. 10, no. 1, pp. 41-55,

2013.

[11] W. Khan, “Image Segmentation Techniques: A Survey,” J. Image Graph., vol. 2, no.1,

pp. 6–9, 2013.

Malarial Parasite Detection Using Image Processing

Dept of CSE, NHCE 41

[12] A. Verm, M. T. Scholar, C. Lal, and S. Kumar, “Image segmentation:Review paper,” Int.

J. Educ. Sci. Res. Rev., vol. 3, no. 2, 2016.

[13] K. Rodenacker and E. Bengtsson, “A feature set for cytometry on digitized microscopic

images.,” Anal. Cell. Pathol., vol. 25, pp. 1–36, 2003.

[14] D. P. Doane and L. E. Seward, “Measuring Skewness : A Forgotten Statistic?,” J. Stat.

Educ., vol. 19, no. 2, pp. 1–18, 2011.

[15] G. Brys, M. Hubert, and A. Struyf, “Goodness-of-fit tests based on a robust measure

of skewness,” Comput. Stat., vol. 23, no. 3, pp. 429–442,2008.

[16] Y. Wang and S. K. Mitra, “Image representation using block pattern models and its

image processing applications,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 15, no. 4, pp.

321–336, Apr. 1993.

[17] K. Rank, M. Lendl, and R. Unbehauen, “Estimation of image noise variance,”Proc. Inst.

Elect. Eng., vol. 146, no. 2, pp. 80–84, Apr. 1999.

[18]P. Sturgeon, "Automation: its introduction to tbe field of blood group serology,"

Immunohematology Journal of Blood Group Serology and Education, vol. 17, no. 4,2001.

[19] J. van deWeijer, L. J. van Vliet, P.W. Verbeek, and M. van Ginkel, “Curvature

estimation in oriented patterns using curvilinear models applied to gradient vector fields,”

IEEE Trans. Pattern Anal. Mach. Intell., vol. 23, no. 9, pp. 1035–1042, Sep. 2001.

[20] B. Rieger and L. J. van Vliet, “Curvature of n-dimensional space curves in grey-value

images,” IEEE Trans. Image Process., vol.11, no. 7, pp.738–745, Jul. 2002.

[21] R. Bracho and A. C. Sanderson, “Segmentation of images based on intensity gradient

information,” in Proc. IEEE Comput. Soc. Conf. Computer Vision and Pattern Recognition,

San Francisco, CA, 1985, pp.341–347.

[22] W. Khan, “Image Segmentation Techniques: A Survey,” J. Image Graph., vol. 2, no. 1,

pp. 6–9, 2013.

[23] A. Verm, M. T. Scholar, C. Lal, and S. Kumar, “Image segmentation: Review paper,”

Int. J. Educ. Sci. Res. Rev., vol. 3, no. 2,2016.

[24] K. Rodenacker and E. Bengtsson, “A feature set for cytometry on digitized microscopic

images.,” Anal. Cell. Pathol., vol. 25, pp. 1–36,2003.