Colour Image Segmentation Approach For Detection of Malaria
Colour Image Segmentation Approach For Detection of Malaria
and BIOMEDICINE Aimi Salihah Abdul-Nasir, Mohd Yusoff Mashor, Zeehaida Mohamed
Abstract: - Malaria is a serious global health problem that is responsible for nearly one million deaths each
year. With the large number of cases diagnosed over the year, rapid detection and accurate diagnosis of malaria
infection which facilitates prompt treatment are essential to control malaria. This paper presents a colour image
segmentation approach for detection of malaria parasites that has been applied on malaria images of P. vivax
species. In order to obtain the segmented red blood cells infected with malaria parasites, the images are first
enhanced by using partial contrast stretching. Then, an unsupervised segmentation technique namely k-means
clustering has been used to segment the infected cell from the background. Different colour components of
RGB, HSI and C-Y colour models have been analysed to identify colour component that can give significant
segmentation performance. Finally, median filter and seeded region growing area extraction algorithms have
been applied for smoothing the image and remove any unwanted regions from the image, respectively. The
proposed segmentation method has been evaluated on 100 malaria images. Overall, segmentation using S
component of C-Y colour model has proven to be the best in segmenting the malaria image with segmentation
accuracy and F-score of 99.46% and 0.9370, respectively.
Key-Words: - Malaria, Colour Segmentation, Colour Models, k-Means Clustering, Seeded Region Growing
Area Extraction.
artefacts) using visual information. However, the colour image segmentation of malaria have been
manual recognition method is time consuming and published in literature. A typical malaria image
effortful especially in situation where large number consists of three main regions namely parasites or
of samples require reliable analysis [4]. Therefore, infected cells, normal RBCs and background
fast and efficient methods are required for detection regions as shown in Fig.2. In order to get an
of malaria parasites in order to prevent the false accurate diagnosis, the proposed segmentation
diagnosis of malaria. method must be capable of differentiating between
In order to detect the malaria parasites, one of the the malaria parasites or infected cells with the non-
main tasks that need to be performed during image parasitic stained components. However, majority of
processing is the segmentation of malaria image. It existing methods for segmentation of malaria image
is performed before the parasite recognition to do not addressed this requirement effectively except
segment the parasite or infected cell from its in [12], [17]. In [17], a Bayesian pixel classifier has
complicated blood cells background. Many current been employed in order to differentiate between the
research efforts have been focused on new stained and non-stained pixels. Then, the detected
approaches in segmenting the malaria image by stained pixels have been processed to form labelled
using various image processing techniques such as connected components of the parasite.
thresholding [8]-[10], watershed [11]-[13], In further studies, segmentation of malaria image
morphological [14], normalized cut [15] and fuzzy using thresholding [8]-[10] and morphological [14]
divergence [16]. have given promising results. However, these
Mandal et al. [15] have proposed a segmentation techniques are very sensitive to image quality. The
method based on optimized normalized cut (NCut) differences in smear preparation can also cause
algorithm for segmenting the RBCs that have been variations as often as the imaging conditions. For
infected with malaria parasites in peripheral blood example, acidity (pH) of the buffer solution can
smears. The NCut algorithm is based on a global significantly affect the appearance of the parasites
criterion and it maximizes both the total and RBCs [7]. In addition, the non-standard
dissimilarity between the different groups and the preparation of the slide can also lead on producing
total similarity within the groups. Here, the NCut the under or over-staining conditions of the slide.
has been applied in four colour models which are Based on these arguments, the current study will
RGB, HSV, YCbCr and NTSC. By using this utilize the potential of colour image segmentation
method, the segmented trophozoite and schizont approach using various colour models and k-means
have been obtained and the results indicate that the clustering algorithm in order to obtain the fully
performance of the NCut is best in HSV colour segmented RBCs infected with malaria parasites
model. However, the results shown that the artefacts based on the thin blood smear images.
are still appeared on the segmented image. As this
algorithm is based on global criterion, any
unintended noises can significantly reduce the 2 Methodology
segmentation accuracy. The proposed procedures to develop new image
Anggraini et al. [9] have proposed a histogram- processing approach for segmentation of malaria
based thresholding method to identify the presence parasites are summarized as follows:
of malaria parasites in thin blood smears of P.
falciparum species. The grayscale malaria images Step 1: Capture the malaria slide images.
have been segmented using global thresholding to Step 2: Apply the contrast enhancement technique
obtain the RBCs and other blood cells components namely partial contrast stretching technique
in each image. Then, the parasite and infected cell on original malaria image.
components are obtained by applying multiple Step 3: Extract the colour components of RGB
thresholds on the segmented image. This step is (red, green, blue), HSI (hue, saturation,
based on the knowledge that cytoplasm of the intensity) and C-Y colour models from the
parasite appears lighter, while the nucleus of the enhanced image.
parasite appears darker compared to the cytoplasm Step 4: Apply the unsupervised segmentation
of the RBC. Even though the threshold levels have technique namely k-means clustering
been selected automatically, this method is heavily algorithm.
depends on image quality and fails when the Step 5: Apply the 7×7 pixels median filter.
histogram does not have distinct valleys. Step 6: Apply the seeded region growing area
Since the actual malaria diagnosis is performed extraction algorithm.
based on stained slide, different approaches for
minTH maxTH
Compression
0
Compression
255
process process
Stretching process
NminTH NmaxTH
0 255
Fig.1 A set of Leica DLMA microscope, Infinity-2 Fig.3 Partial contrast stretching process
digital camera and personal computer interfaced
together to acquire the malaria images
θ if B G
Hue (1) (d) Blue (e) Hue of HSI (f) Saturation of HSI
360θ if B G
1
1
2
R G R B
θ cos 1
(2)
R G R B G B 2
2
(g) Intensity of HSI (h) R-Y of C-Y (i) B-Y of C-Y
3
Saturation 1 minR, G , B (3)
RG B
(j) Luminance of C-Y (k) Hue of C-Y (l) Saturation of C-Y
it would be difficult to segment the infected cell 3. Assign all pixels to the nearest centre based on
from the normal RBCs in case of using the H d.
component image. Thus, the rest colour components 4. When all pixels have been assigned, recalculate
have been chosen to be fed as the input images to k- the new position of the centres using:
means clustering for further segmentation process.
1
cj
nj
p ( x, y )
yc j xc j
(10)
2.4 Image Segmentation Using k-Means
Clustering
After transforming the RGB into HSI and C-Y 5. Repeat steps 2 to 4 until there is no significant
colour models, the next and important step in image change in the centre positions.
segmentation is to extract the meaningful region
from malaria image. The malaria slides are usually
stained to highlight the region of interest (ROI) 2.5 Image Filtering Using Median Filter
which is referred to the parasite or infected cell. Algorithm
However, segmenting the parasite or infected cell in After the segmented infected cell has been obtained
an image is not an easy task due to the inconsistency using k-means clustering, there might be some
intensity of these two regions as it may appear unwanted regions or noise that are still encountered
lighter or darker depending in the pH of the buffer in the image. Thus, median filter is used as a noise
used. removal in order to obtain a noise-free image. Due
In order to reduce the tedious task of manual to its good smoothing effect, it can also be used to
segmentation, an unsupervised pixel segmentation fill the small holes that might appear on the
based on k-means clustering algorithm [23] is segmented infected cell. Here, the neighbourhood of
applied for easily segmenting the infected cell from n × n (n = 7) pixels is used because large
its complicated blood cells background. The k- neighbourhoods produce more severe smoothing.
means is a clustering method which is one of the
most popular unsupervised learning algorithms due
to its simplicity. In this study, each colour 2.6 Seeded Region Growing Area Extraction
component image of the RGB, HSI and C-Y colour Algorithm
models that has been extracted from the enhanced In this study, a modified version of conventional
RGB image will be fed as input to k-means seed based region growing algorithm namely seeded
clustering for further segmentation process. region growing area extraction (SRGAE) algorithm
Consider a malaria image with resolution of X × [24] has been applied on the segmented image. This
Y pixels to be clustered into nc regions. Let p(x,y) as algorithm is chosen due to its capability to label the
an input pixel to be clustered and cj is the j-th centre ROI according to their order in the image as well as
(cluster) (x = 1, 2, …, X, y = 1, 2, …, Y and j = 1, 2, extracting the size of the segmented region. Since
…, nc). For segmentation of malaria image, the the segmentation using k-means clustering is based
number of clusters, j are set to 3. The k-means only on colour information of the pixels in the
clustering algorithm for image segmentation can be image, some artefacts and unwanted regions which
implemented as follows: share the same colour as the infected cell are still
1. Initialize the centres using: appeared on the segmented image. Thus, the
SRGAE algorithm is applied for the two main
max p ( x, y ) min p ( x, y ) purposes. First is to calculate the total area in pixels
c j min p(x,y) 2 j 1 (8) for the ROI. Secondly is to remove any unwanted
2nc regions that are bigger in size in which cannot be
cleaned by using the 7×7 pixels median filter.
where minp(x,y) and maxp(x,y) are the minimum In order to apply the SRGAE algorithm, the
and maximum pixel levels in the image. segmented malaria image will first be converted into
2. For each pixel of an image, calculate the binary image, where the ROI and background
Euclidean distance, d using: regions will be assigned to 0 and 255, respectively.
Then, the SRGAE algorithm can be implemented as
d p( x, y) c j (9) follows [24]:
1. Initialize Area[k] = 0 and set the value of k = 0, 2.7 Analysis of Segmentation Performance
where Area is the total pixels for the ROI and k After the proposed colour image segmentation
is the number of current ROI. approach using various colour models and k-means
2. Search for the seed with intensity of pixel, I = 0. clustering have been performed, a common
If the seed is found, increase k to k + 1 and quantitative analysis is conducted in order to assess
Area[k] = 1; else go to step 7. the overall performance of the proposed
3. Search for the neighbourhood of 8 surrounding segmentation method. The performances of the
pixels, grow if I = 0 and increase Area[k] = proposed segmentation method are evaluated by
Area[k] + 1 for each pixel that satisfies the using six objective indices. These indices are
growing condition. accuracy, sensitivity, specificity, precision, recall
4. Grow from the neighbour pixels in step 3 and and F-score. The quality of segmented image is
increase Area[k] = Area[k] + 1 for each pixel determined based on pixels similarity of the
that satisfies the growing condition. resultant segmented image against the manual
5. Repeat steps 3 to 4 until all pixels have been segmented image. The accuracy, sensitivity and
considered to be grown or the region cannot be specificity are defined based on Equation 11, 12 and
grown anymore. 13, respectively.
6. Repeat steps 2 to 5 for the new seed which is
not belong to the previous ROI(s). TP TN
7. End. Accuracy 100 (11)
TP TN FP FN
Afterwards, the selection of ROI is determined
based on its size. Fig.5 shows a single infected cell
TP
in malaria image with its area. After performing Sensitivity 100 (12)
analyses on several malaria images, it has been TP FN
found that a typical infected cell may have the area
which is greater than 5000 pixels. Thus, any regions TN
Specificity 100 (13)
which are less than 5000 pixels are considered as TN FP
non-parasite and will be eliminated from the image
during region growing process. This value is chosen TP, TN, FP and FN are the true positive, true
by considering the size of the infected cell from the negative, false positive and false negative,
three malaria stages which are ring, trophozoite and respectively. Based on validation from
gametocyte stages. Therefore, the intensity of pixels microbiologists, TP is refer as the positive region
which are included as ROI will be set to RGB (infected cell) that has been correctly segmented as
colour of the enhanced malaria image, while the positive region, while TN is refer as the negative
intensity of pixels which are not included as ROI region (normal RBCs and background) that has been
will be set to 255. correctly segmented as negative region. Based on
the above equations, segmentation accuracy can be
obtained by calculating the percentage of pixels that
are correctly segmented as infected cell or
background in the image. The sensitivity is defined
as the percentage of pixels that are correctly
(a) Ring. (b) Ring. (c) Ring. segmented as positive region, while the specificity is
Area=11061 Area=13965 Area=14768 defined as the percentage of pixels that are correctly
segmented as negative region.
Afterwards, the performances of the proposed
segmentation method are further evaluated by using
the precision, recall and F-score measures as defined
(d) Trophozoite. (e) Trophozoite. (f) Trophozoite. in Equation 14, 15 and 16, respectively.
Area=15371 Area=17461 Area=19438
TP
Precision = (14)
TP FP
precision recall
F-score = 2 (16)
precision recall
Fig.8 Different colour components of RGB, HSI and Based on these resultant images, the images have
C-Y colour models that have been extracted from been clustered into three groups which are infected
PCS image of Ring_1 cell (black), RBCs (gray) and background (white)
regions except for image (d) where the infected cell
is represented by black and gray colour.
(a) Red (b) Green (c) Blue (a) Red (b) Green (c) Blue
(d) Saturation of HSI (e) Intensity of HSI (f) R-Y of C-Y (d) Saturation of HSI (e) Intensity of HSI (f) R-Y of C-Y
(g) B-Y of C-Y (h) Luminance of C-Y (i) Saturation of C-Y (g) B-Y of C-Y (h) Luminance of C-Y (i) Saturation of C-Y
Fig.13 Results of images for Gametocyte_1 after Fig.14 Results of images for Ring_1 after the
applying k-means clustering on different colour colour of k-means clustering image has been
components images retrieved based on PCS image
(g) B-Y of C-Y (h) Luminance of C-Y (i) Saturation of C-Y (a) Red (b) Green (c) Blue
Fig.16 Results of images for Trophozoite_1 after
the colour of k-means clustering image has been
retrieved based on PCS image
(a) Original image (b) Partial contrast (c) Manual segmented (a) Original image (b) Partial contrast (c) Manual segmented
stretching image image stretching image image
(d) Red (e) Green (f) Blue (d) Red (e) Green (f) Blue
(g) Saturation of HSI (h) Intensity of HSI (i) R-Y of C-Y (g) Saturation of HSI (h) Intensity of HSI (i) R-Y of C-Y
(g) B-Y of C-Y (h) Luminance of C-Y (i) Saturation of C-Y (g) B-Y of C-Y (h) Luminance of C-Y (i) Saturation of C-Y
Fig.20(a) Original Ring_2 image, (b) PCS image, Fig.22(a) Original Gametocyte_2 image, (b) PCS
(c) manual segmented image and (d)-(i) final image, (c) manual segmented image and (d)-(i) final
segmented images after applying the proposed segmented images after applying the proposed
segmentation method segmentation method
Trophozoite_2, Gametocyte_1 and Gametocyte_2 each RGB, HSI and C-Y colour models is very
images. important in order to achieve a good segmentation
Based on the average segmentation performance performance. Based on the average segmentation
for the overall 100 images, segmentation using S performance in terms of segmentation accuracy and
component of C-Y colour model has proven to be F-score for the overall 100 images, segmentation
the best in segmenting the entire area in malaria using green component has provided the best
image and background region with segmentation segmentation performance among the colour
accuracy and specificity of 99.46% and 99.95%, components in RGB colour model. Meanwhile, both
respectively. Meanwhile, segmentation using S HSI and C-Y colour models have achieved the best
component of HSI colour model has proven to be segmentation performance by using the S
the best in obtaining a fully segmented infected cell component.
with sensitivity of 93.84%. In order to ascertain the By comparing the results provided by Table 1
segmentation performances provided in Table 1, the and 2, it can be noticed that F-score has the
performances of the proposed segmentation method capability to provide better measurement of
are further evaluated by computing three objective segmentation performance compared to accuracy.
indices namely precision, recall and F-score. This is because accuracy is directly depends on
The performances of segmentation based on pixels similarity, whereas F-score covers the
precision, recall and F-score that have been obtained information of precision and recall. By referring the
from segmented images of Ring_1, Ring_2, segmentation performance for Ring_1 image,
Trophozoite_1, Trophozoite_2, Gametocyte_1, segmentation using R-Y and S components of C-Y
Gametocyte_2 and the overall 100 malaria images colour model have provided the similar result with
are tabulated in Table 2. Similar with Table 1, segmentation accuracy of 99.93%. However, by
segmentations using S component of HSI colour using the F-score measure, segmentation using S
model, as well as R-Y and S components of C-Y component has proven to be slightly better with F-
colour model have provided good segmentation score of 0.9870 compared to segmentation using R-
performance in terms of high F-score value for the Y component with F-score of 0.9869. Thus, F-score
six malaria images compared to the results provided is found suitable for measuring segmentation
by other colour components. Based on the average performance as it is more sensitive compared to
segmentation performance for the overall 100 accuracy. Meanwhile, precision has been found
images, segmentation using S component of C-Y suitable for measuring the over-segmented image
colour model has proven to be the best in compared to specificity.
segmenting the entire area in malaria image with F- By comparing the segmentation results provided
score of 0.9370. by the S component of HSI and C-Y colour models,
By comparing the precision results provided by segmentation using S component of HSI colour
each colour components, there are only three colour model has proven to be the best in obtaining a fully
components that have the capability to avoid over- segmented infected cell with recall of 0.9384.
segmentation in malaria image by providing However, the results for the precision and F-score
precision value more than 0.8. This is due to pixel that have been obtained are quite small with 0.7353
similarity between the infected cell and RBCs and 0.7591, respectively. Thus, segmentation using
regions provided by several colour components S component of C-Y colour model has proven to be
which lead on producing over-segmented images as the best in segmenting the entire area in malaria
shown in Section 3.1. However, segmentation using image and background region with F-score and
S component of C-Y colour model has provided the precision of 99.46% and 99.95%,, respectively.
most acceptable result in segmenting the Overall, the results of segmentation performances
background region with precision of 0.9871. As for provided by Table 1 and 2 have strongly supported
the recall results, it can be seen that each colour the qualitative findings provided in Section 3.1.
component has the capability to avoid under-
segmentation in malaria image by providing recall Table 1: Segmentation performance based on
value more than 0.8. However, segmentation using sensitivity, specificity and accuracy for the
S component of HSI colour model has proven to be segmented images
the best in obtaining a fully segmented infected cell Image Colour Colour Sensitivity Specificity Accuracy
Model Component (%) (%) (%)
with recall of 0.9384 which is similar to the Ring_1 RGB Red 81.98 91.05 90.80
sensitivity. Green 95.50 85.88 86.14
Based on the results provided by Table 1 and 2, Blue 89.47 86.36 86.45
HSI Saturation 95.99 100 99.89
it is shown that selection of colour component from
to k-means clustering have been made in order to and Image Understanding, Vol.114, No.1,
recognize the significance of applying each colour 2010, pp. 21-32.
component for segmentation of malaria image. The [7] WHO, Basic Malaria Microscopy, Part I.
proposed segmentation method has been tested on Learner’s Guide, World Health Organization,
100 malaria images qualitatively and quantitatively. 2010.
Based on the qualitative findings provided in [8] N. E. Ross, C. J. Pritchard, D. M. Rubin, and
Section 3.1, a fully and smoother infected cell has A. G. Duse, Automated image processing
been obtained by applying k-means clustering on S method for the diagnosis and classification of
component image of HSI colour model. Meanwhile, malaria on thin blood smears, Medical &
a clean segmented image has been obtained by using Biological Engineering & Computing, Vol.44,
the S component image of C-Y colour model. 2006, pp. 427-436.
Quantitatively, the results indicate that segmentation [9] D. Anggraini, A. S. Nugroho, C. Pratama, I. E.
using S component of C-Y colour model has proven Rozi, A. A. Iskandar, and R. N. Hartono,
to be the best in segmenting the entire area in Automated status identification of microscopic
malaria image with F-score and precision of 0.9370 images obtained from malaria thin blood
and 0.9871, respectively. Meanwhile, segmentation smears, 2011 International Conference on
using S component of HSI colour model has proven Electrical Engineering and Informatics, 2011.
to be the best in obtaining a fully segmented [10] V. V. Panchbhai, L. B. Damahe, A. V.
infected cell with recall of 0.9384. Nagpure, and P. N. Chopkar, RBCs and
parasites segmentation from thin smear blood
cell images, I.J. Image, Graphics and Signal
Acknowledgements Processing, Vol.10, 2012, pp. 54-60.
The authors gratefully acknowledges and thanks the [11] K. N. R. Mohana-Rao and A. G. Dempster,
team members of malaria research at Universiti Modification on distance transform to avoid
Malaysia Perlis (UniMAP) for making this research over-segmentation and under-segmentation, 4th
achievable and Universiti Sains Malaysia (USM) for EURASIP - IEEE Region 8 International
providing the malaria blood samples and validate Symposium on Video/Image Processing and
the results. Multimedia Communications, 2002, pp. 295-
301.
[12] F. B. Tek, Computerised diagnosis of malaria,
References: Ph.D. Thesis, School of Life Sciences,
[1] WHO, World Malaria Report 2011, World University of Westminster, London, United
Health Organization, 2011. Kingdom, 2007.
[2] J. Cox-Singh, T. M. E. Davis, K. S. Lee, S. S. [13] D. Das, M. Ghosh, C. Chakraborty, A. K.
G. Shamsul, A. Matusop, S. Ratnam, H. A. Maiti, and M. Pal, Probabilistic prediction of
Rahman, D. J. Conway, and B. Singh, malaria using morphological and textural
Plasmodium knowlesi malaria in humans is information, 2011 International Conference on
widely distributed and potentially life Image Information Processing, 2011.
threatening, Clinical Infectious Disease, [14] C. D. Ruberto, A. Dempster, S. Khan, and B.
Vol.46, No.2, 2008, pp. 165-171. Jarra, Analysis of infected blood cell images
[3] A. Moody, Rapid diagnostic tests for malaria using morphological operators, Image and
parasites, Clinical Microbiology Reviews, Vision Computing, Vol.20, No.2, 2002, pp.
Vol.15, No.1, 2002, pp. 66-78. 133-146.
[4] Y. Purwar, S. L. Shah, G. Clarke, A. [15] S. Mandal, A. Kumar, J. Chatterjee, M.
Almugairi, and A. Muehlenbachs, Automated Manjunatha, and A. K. Ray, Segmentation of
and unsupervised detection of malarial blood smear images using normalized cuts for
parasites in microscopic images, Malaria detection of malarial parasites, 2010 Annual
Journal, Vol.10, 2011, pp. 1-10. IEEE India Conference, 2010.
[5] M. T. Makler, C. J. Palmer, and A. L. Alger, A [16] M. Ghosh, D. Das, C. Chakraborty, and A. K.
review of practical techniques for the diagnosis Ray, Plasmodium vivax segmentation using
of malaria, Annals of Tropical Medicine & modified fuzzy divergence, 2011 International
Parasitology, Vol.92, No.4, 1998, pp. 419-433. Conference on Image Information Processing,
[6] F. B. Tek, A. G. Dempster, and I. Kale, Parasite 2011.
detection and identification for automated thin [17] F. B. Tek, A. G. Dempster, and I. Kale, Malaria
blood film malaria diagnosis, Computer Vision parasite detection in peripheral blood images,