Anda di halaman 1dari 8

Automatic Leukemia Detector Using

Digital Image Processing


Ankush Bagwale, Nikhil Rai

 ues is use of artificial intelligence. Basically here we use


Abstract— Blood cancers such as leukemia, Hodgkin “image processing” followed by “fuzzy logic”. These AI
lymphoma, non-Hodgkin lymphoma, myeloma and techniques removes the human errors in detection, number of
myelodysplastic syndromes are cancers that originate in the bone steps involved are also less. And more importantly it is cost
marrow or lymphatic tissues. They are considered to be related effective
cancers because they involve the uncontrolled growth of cells
with similar functions and origins. The diseases result from an
1. LEUKEMIA
acquired genetic injury to the DNA of a single cell, which
becomes abnormal (malignant) and multiplies continuously. The White blood cells are made in your bone marrow, which is the
accumulation of malignant cells interferes with the body's soft spongy centre of your bones. White blood cells are
production of healthy blood cells. Around 1,20,603 people in involved in your body's immune system, a defense system that
India die every and Every 4 minutes one person is diagnosed with protects you from infections. Your bone marrow makes the
a blood cancer due to leukemia. most basic type of cells (called stem cells), and they can
develop further into three types of cells:
I. INTRODUCTION  white blood cells - protect your body from infection
Blood cancers such as leukemia, Hodgkin lymphoma, non-  red blood cells - carry oxygen around your body
Hodgkin lymphoma, myeloma and myelodysplastic  platelets - important for normal blood clotting
syndromes are cancers that originate in the bone marrow or White blood cells are involved in your
lymphatic tissues. They are considered to be related cancers body's immune system, a defense system that protects you
because they involve the uncontrolled growth of cells with from infections. There are two main types of white blood
similar functions and origins. The diseases result from an cells: myeloid cells and lymphocytes.
acquired genetic injury to the DNA of a single cell, which Leukemia affects three times as many adults
becomes abnormal (malignant) and multiplies continuously. as children. It's the most common form of childhood cancer,
The accumulation of malignant cells interferes with the body's but this is because childhood cancers are rare. In the UK,
production of healthy blood cells. Around 1,20,603 people in almost 7,000 people are diagnosed with leukemia every year
India die every and Every 4 minutes one person is diagnosed ,
with a blood cancer due to leukemia. Leukemia can be
diagnosed:
From a blood test to measure the number of blood cells and
look for any abnormal cells.Slides of blood sample are
prepared and observed under the microscope to detect
abnormal shaped cells such as kidney shape.Or the blood
sample is detected for presence of immature cells in bone
marrow.The Conventional Method Of Diagnosis Suffer From
Following Disadvantages:-
 All imaging techniques have to be repeated in cases
of suspected fungal infection.
 Higher cost.
 Human error of Visual Perception.
Using recent leukemia detection technique may lead to
incorrect conclusions. This may result due to human errors in Figure 1: normal and leukemic cell in bone marrow
observing the peripheral sections under microscope. This may In leukemia, some of the white blood cells don't grow
lead to improper diagnosis of disease. Further numbers of properly. Leukemia is a type of cancer that affects the white
steps are involved in detection. blood cells. In leukemia, white blood cells become abnormal,
The most efficient method to overcome all and divide and grow in an uncontrolled way. They stay in the
this drawbacks of present cancer detection techniq bone marrow and keep reproducing in an uncontrolled way.
These abnormal white blood cells fill up the bone marrow and
Leukemia Detection Using Image Processing

prevent it from making healthy white blood cells. This means Diagnosis, investigation, treatment and
the body is less able to fight off infections. follow-up for people with leukemia usually take place at
The abnormal white blood cells also prevent specialist centers in hospitals.
bone marrow from making enough red blood cells and
platelets. A lack of red blood cells leads to less oxygen being 3. NEED OF IMAGE PROCESSING
delivered to the organs and tissues of your body. This is called Using recent leukemia detection technique
anemia, and it can make you feel tired and breathless. A lack may lead to incorrect conclusions. This may result due to
of platelets can lead to problems with the blood-clotting human errors in observing the peripheral sections under
system, and results in bleeding and bruising much more easily microscope. This may lead to improper diagnosis of disease.
than usual. Further numbers of steps are involved in detection.
of TRANS-JOUR.DOC or cut and paste from another The most efficient method to overcome all
document and use markup styles. The pull-down style menu is this drawbacks of present cancer detection techniques is use of
at the left of the Formatting Toolbar at the top of your Word artificial intelligence. Basically here we use “image
window (for example, the style at this point in the document is processing” followed by “fuzzy logic”. These AI techniques
“Text”). Highlight a section that you want to designate with a removes the human errors in detection, number of steps
certain style, then select the appropriate name on the style involved are also less. And more importantly it is cost
menu. The style will adjust your fonts and line spacing. Do effective.
not change the font sizes or line spacing to squeeze more 4. INTRODUCTION TO IMAGE PROCESSING
text into a limited number of pages. Use italics for A technique in which the data from an
emphasis; do not underline. image are digitized and various mathematical operations are
applied to the data, generally with a digital computer, in order
2. RECENT DETECTION TECHNIQUE
to create an enhanced image that is more useful or pleasing to
a human observer, or to perform some of the interpretation and
recognition tasks usually performed by humans.
An image is usually interpreted as a 2-D
array of brightness values. To digitally process an image, it is
first necessary to reduce the image into a number that can be
manipulated by the computer. Each number representing the
brightness value of the image at the particular location is
called a picture element or pixel. It is this pixel that undergoes
various types of operation such as point operation, local
operation, global operation etc. these operations, singly or in
combination , are the means by which the image is enhanced,
Figure2: (a) & (b) leukemia affected cells restored or compressed.
The figure (3) shows the effect of image processing.
 Leukemia can be diagnosed from a blood test to measure
the number of blood cells and look for any abnormal
cells.
 Slides of blood sample are prepared and observed under
the microscope to detect abnormal shaped cells such as
kidney shape.
 Or the blood sample is detected for presence of immature
cells in bone marrow.
People with suspected leukemia are referred
to a specialist doctor, usually a hematologist (an expert in the
treatment of blood disorders). Radiotherapy, chemotherapy
and some other techniques are used for treatment of cancer.
Sometimes doctors carry out further tests, such as:
 CT (computerized tomography) scans - these can show
Figure 3: effect of image processing
enlarged lymph nodes
 MRI (magnetic resonance imaging) scans - to locate the
5. FUNDAMENTAL STEPS IN IMAGE
position of tumors
PROCESSING
 ultrasound - can be done to see if your spleen has been
affected by anemia
5.1 IMAGE ACQUISITION
 tissue typing - if your doctor has advised you to have a Image processing for microscopy
bone marrow transplant application begins with fundamental techniques intended to
most accurately reproduce the information contained in the
microscopic sample. This might include adjusting the
Leukemia Detection Using Image Processing

brightness and contrast of the image, averaging images to 5.4 IMAGE COMPRESSION
reduce image noise and correcting for illumination non- Image compression, the art and science of
uniformities. Such processing involves only basic arithmetic reducing the amount of data required to represent an image, is
operations between images (i.e. addition, subtraction, one of the most useful and commercially successful
multiplication and division). The vast majority of processing technologies in field of digital image processing. Compression
done on microscope image is of this nature. refers to the process of reducing the amount of data required to
represent that given quantity of information. Figure (6) shows
5.2 IMAGE ENHANCEMENT image compression
Enhancement refers to accentuation or
sharpening of image features, such as contrast, boundaries,
edges, etc. The process of image enhancement, however, in no
way increases the information content of the image data. It
increases the dynamic range of chosen features with the final
aim of improving the image quality. This is visible in the
following figure (4).

Figure 6 : image compression

5.5 IMAGE SEGMENTATION


In computer vision, segmentation refers to
the process of partitioning a digital image into multiple
Figure 4: image enhancement segments (sets of pixels) (Also known as super pixels). The
goal of segmentation is to simplify and/or change the
5.3 IMAGE RESTORATION
representation of an image into something that is more
Sometimes we receive noisy images which
meaningful and easier to analyze. Image segmentation is
are degraded by some degrading mechanism. One common
typically used to locate objects and boundaries (lines, curves,
source of degradation is the optical lens system in a digital
etc.) in images. More precisely, image segmentation is the
camera which acquires visual information.
process of assigning a label to every pixel in an image such
When the degradation is due to atmosphere
that pixels with the same label share certain visual
(foggy weather), defocused camera or a relative accelerated
characteristics.
motion between the object and the focal plane of lens, the
The result of image segmentation (figure
conventional techniques of enhancement are not suitable to get
(7)) is a set of segments that collectively cover the entire
the original objects from the image. This is done by various
image, or a set of contours extracted from the image (see edge
mathematical models and is called as reconstruction or
detection). Each of the pixels in a region is similar with
restoration of image.
respect to some characteristic or computed property, such as
color, intensity, or texture. Adjacent regions are significantly
different with respect to the same characteristics.

Figure 5: image restoration


Leukemia Detection Using Image Processing

Figure 7 : image segmentation Figure 8: the exemplary image of the bone marrow smear of
5.6 COLOR IMAGE PROCESSING the acute leukemia patient containing different blast cells.
The color of images can be altered in a The individual cells are close to each other
variety of ways. Colors can be faded in and out, and tones can and the borders among them are not well defined. The task of
be changed using curves or other tools. The color balance can segmentation of the image is focused on the automatic
be improved. In addition, more complicated procedures such recognition and separation of each cell for further processing.
as the mixing of color channels are possible using more
advanced graphics. Image editors have provisions to 6.1 EDGE DETECTION
simultaneously change the contrast of images and brighten or Edge detection highlights image contrast.
darken the image. Underexposed images can often be Detecting contrast, which is difference in intensity, can
improved by using this feature. Recent advances have allowed emphasize the boundaries of features within an image, since
more intelligent exposure correction whereby only pixels this is where image contrast occurs. This is how human vision
below a particular luminosity threshold are brightened, can perceive the perimeter of an object, since the object is of
thereby brightening underexposed shadows without affecting different intensity to its surrounding. Essentially, the boundary
the rest of the image.. of an object is a step change in the intensity levels. The edge is
6. APPLICATION IN LEUKEMIA DETECTION at the position of step change. An ideal edge has the properties
The acute leukemia is a disease of the of the model shown in figure 9(a) an ideal edge according to
leukocytes and their precursors. It is characterized by the this model is a set of connected pixel, each of which is located
appearance of immature, abnormal cells in the bone marrow at step transition in gray level.
and peripheral blood. The aspirated marrow is found to be In practice, optics, sampling, and other
infiltrated by abnormal cells. The recognition of the blast cells image acquisition imperfections yield edges that are blurred,
in the bone marrow of the patients suffering from with degree of blurring being determined by factors such as
myelogenous leukemia is a very important step in the the quality of image acquisition system, the sampling rate and
recognition of the development stage of the illness and proper illumination condition under which the image is acquired. As
treatment of the patients. a result, edges are more closely modeled as having a “ramp
Image segmentation is a division of the like” profile, such as the one shown in figure 9(b)
image into different regions, each having certain properties. In
a segmented image, the picture elements are no longer the
pixels, but connected set of pixels, all belonging to the same
region. The segmentation techniques are used to separate the
individual cells from the set of cells creating the image. The
recognition and separation of individual cells from the image
of the blood cells is a very difficult task, since different
regions are of little grey level variations and the borders of
individual cells are hardly visible. Fig.8 presents the
exemplary image of the blast cells of the bone marrow
containing different types of cells.

Figure 9 : (a) ideal edge (b) Ramp edge


The slope of the ramp is inversely
proportional to the degree of blurring ill the edge. In this
model, we no longer have a thin (one pixel thick) path.
Instead, an edge point now is any point contained in the ramp,
and edge would then be a set of such points that are connected.
Leukemia Detection Using Image Processing

The "thickness" of the edge is determined by the length of the gradient of an image f (x. y) at location (x, y) is defined as the
ramp, as it transitions from an initial to a final gray level. This vector
length is determined by the slope, which, in turn, is
determined by the degree of blurring. This makes sense:
Blurred edges tend to be thick and sharp edges tend to be thin.

It is well known from vector analysis that


the gradient vector points in the direction of maximum rate of
change of f at coordinates (x, y).An important quantity in edge
detection is the magnitude of this vector, denoted f,where'

This quantity gives the maximum rate of


increase of f(x, y) per unit distance in the direction of f. It
is a common (although not strictly correct) practice to refer to
.
Figure 10 :(a) vertical edge (b) Gray level first and second f also as the gradient. We will adhere to convention and
derivative Profile also use this term interchangeably, differentiating between the
Detection of edge involves the use of first vector and its magnitude only in cases in which confusion is
and second derivatives. Figure 10(a) shows a horizontal gray- likely. The direction of the gradient vector also is an important
level profile of the edge between the two regions. This figure quantity. Let α (x, y) represent the direction angle of the
also shows the first and second derivatives of the .gray-level
vector f at (x, y). Then, from vector analysis,
profile. The first derivative is positive at the points of
transition into and out, of the ramp as we move from left to
right along the profile; it is constant for points in the ramp;
and-is zero in areas of constant gray level.
The second derivative is positive at the
transition associated with the dark side of the edge, negative at where the angle is measured with respect to the x-axis. The
the transition-associated with the light side of the edge, and direction of an edge at (x, y) is perpendicular to the direction
zero along the ramp and in areas of constant gray level. The of the gradient vector at that point.
signs of the derivatives in Fig. 10(b) would be reversed for an
edge that transitions from light to dark. 7.3 LAPLACIAN OPERATOR
We conclude from these observations that Second derivative can be computed using
the magnitude of the, first derivative can be used to detect the laplacian operator.
presence of an edge at a point in an image (i.e., to determine if
a point is on a ramp). Similarly, the sign of the second
derivative can be used to determine whether an edge pixel lies
on the dark or light side of an edge.
We note two additional properties of the Digital approximation
second derivative around an edge: (1) It produces two values
for every edge in an image (an undesirable feature); and (2) an
imaginary straight line joining the extreme positive and
negative values of the second derivative would cross zero near
the midpoint of the edge. This zero-crossing property of the
second derivative is quite useful for locating the centers of
thick edges.
6.2 GRADIENT OPERATORS
First-order derivatives of a digital image are
based on various approximations of the 2-D gradient. The
Leukemia Detection Using Image Processing

Step 1: Read Image


Read in 'cell.tif', which is an image of a cancer cell.
I = imread('cell.tif'),figure, imshow(I), title('original image');
Original image

Figure:11
Thus figure (11) shows the original image to be processed.
Step 2: Detect Entire Cell
Two cells are present in this image, but only
one cell can be seen in its entirety. We will detect this cell.
Another word for object detection is segmentation. The object
to be segmented differs greatly in contrast from the
background image. Changes in contrast can be detected by
operators that calculate the gradient of an image. One way to
calculate the gradient of an image is the Sobel operator, which
creates a binary mask using a user-specified threshold value.
A threshold value is determined using the gray thresh
function. To create the binary gradient mask, we use the edge
1) 7.4 THRESHOLDING AND LINKING function.
Once we have computed a measure of edge BWs = edge(I, 'sobel', (graythresh(I) * .1));
strength (typically the gradient magnitude), the next stage is to Figure, imshow (BWs), title ('binary gradient mask');
apply a threshold, to decide whether edges are present or not Binary gradient mask
at an image point. The lower the threshold, the more edges
will be detected, and the result will be increasingly susceptible
to noise, and also to picking out irrelevant features from the
image. Conversely a high threshold may miss subtle edges, or
result in fragmented edges.
If the edge thresholding is applied to just the
gradient magnitude image, the resulting edges will in general
be thick and some type of edge thinning post-processing is
necessary. A commonly used approach to handle the problem
of appropriate thresholds for thresholding is by using
thresholding with hysteresis. This method uses multiple Figure: 12
thresholds to find edges. We begin by using the upper The binary gradient mask shows lines of
threshold to find the start of an edge. Once we have a start high contrast in the image as can be seen in the figure (12).
point, we then trace the path of the edge through the image These lines do not quite delineate the outline of the object of
pixel by pixel, marking an edge whenever we are above the interest. Compared to the original image, you can see gaps in
lower threshold. We stop marking our edge only when the the lines surrounding the object in the gradient mask. These
value falls below our lower threshold. This approach makes linear gaps will disappear if the Sobel image is dilated using
the assumption that edges are likely to be in continuous linear structuring elements, which we can create with the strel
curves, and allows us to follow a faint section of an edge we function.
have previously seen, without meaning that every noisy pixel se90 = strel ('line', 3, 90);
in the image is marked down as an edge. se0 = strel ('line', 3, 0);
8. PROCEDURE
Based on above discussed concepts of
segmentation, the segmentation of cancerous blood cell (i.e. Step 3: Dilate the Image
edge detection) can be implemented with the help of following The binary gradient mask is dilated using
steps in matlab programming. the vertical structuring element followed by the horizontal
Leukemia Detection Using Image Processing

structuring element. The imdilate function dilates the


image.the image now appears as shown in figure (13).
BWsdil = imdilate (BWs, [se90 se0]);
figure, imshow(BWsdil), title('dilated gradient mask');
Dilated gradient mask

Figure:15

Step 6: Smoothen The Object


Finally in order to make the segmented object look natural,
smoothening of the image is done by eroding the image twice
with a diamond structuring element. The diamond structuring
element can be created using the strel function
Figure:13 seD = strel('diamond',1);
BWfinal = imerode (BWnobord,seD);
Step 4: Fill Interior Gaps BWfinal= imerode(BWfinal,seD);figure, imshow(BWfinal),
The dilated gradient mask shows the outline title ('segmented image');
of the cell quite nicely, but there are still holes in the interior segmented image
of the cell. To fill these holes we use the imfill function and
get the image as shown in figure (14).
BWdfill = imfill(Bwsdil, „holes‟);
figure, imshow(Bwdfill);
title(„binary image with filled holes‟);
Binary image with filled holes

Figure:16
Step 7:Final Segmented Image
An alternate method for displaying the
segmented object would be to place an outline around the
segmented cell. The outline is created by bwperim function
Figure:14 BWoutline=bwperim(BWfinal);
segout=I;segout(BWoutline)=225;
Step 5: Remove Connected Objects on Border figure, imshow(segout),title(„outlined original image‟);
The cell of interest has been successfully Thus we obtain the final image as shown below in figure(17).
segmented, but it is not the only object that has been found. Outlined original image
Any objects that are connected to the border of the image can
be removed using the imclearborder function. The
connectivity in the imclearborder function was set to 4 to
remove diagonal connections.
BWnobord = imclearborder (BWdfill, 4);
figure, imshow(BWnobord), title('cleared border image');
Cleared border image

Figure:17
Leukemia Detection Using Image Processing

9. CONCLUSION
Thus using image processing segmentation,
edge of the cancerous blood cell can be obtained. Matlab
programming is used efficiently involving the concepts of
image segmentation to give the required edge to be checked
for any abnormal shape which assures cancer in a patient. This
image in which edge of cancerous cell is obtained can be
processed further for exact detection of cancer by any AI
technique.
Acknowledgment
We would like to thank Dr. BHARAT PATIL of All India
Institute Of Medical Sciences (AIIMS ) New Delhi,Had it not
been the inspiration and motivation provided by Dr. Bharat
patil this research would definitely not progressed up the way
it is now. We plan to finish the work with Dr.Bharat Patil so
that we could provode this technology to the citizens of india.
at the least cost we can provide.we would also like to thank
Dr.Roopesh Ranjan for the financial support they provided by
funding this project.
References
[1]„Digital image processing‟ by Woods and Gonzalez.
[2]http://www.cancerbackup.org.uk/
[3]http://www.leukaemiacare.org.uk/
[4]Feature extraction and image processing‟ by Mark S. Nixon
and Albrto S. Aguado
[5]Wikipedia- The Free Encyclopedia