Research Journal of Recent Sciences _________________________________________________ ISSN 2277-2502 Vol. 3(4), 34-39, April (2014) Res.J.Recent Sci. International Science Congress Association 34 Color Based Segmentation of White Blood Cells in Blood Photomicrographs Using Image Quantization Bakht Azam, Rashid Jalal QureshiZahoor Jan, and Taj Ali Khattak Department of Computer Science, Islamia College Peshawar, Peshawar, K.P, PAKISTAN Faculty of Computing, SZABIST, Dubai International Academic City, Dubai, U.A.E Department of Pathology, Lady Reading Hospital, Peshawar, K.P, PAKISTANAvailable online at: www.isca.in , www.isca.me Received 17th August 2013, revised 4th October 2013, accepted 2nd November 2013Abstract Generally for various diseases blood is used as an indicator. It is composed of three types of cells; Red blood Cells (RBC), White Blood Cells (WBC) and Platelets. Different types of white blood cells or leukocytes are counted in a sample blood smear and give necessary information about various hematological diseases. Evaluating a blood smear for WBC’s with the help of digital image processing is faster, easier and has contributed strongly in Computer Aided Diagnosis (CAD). In this work, we have focused on the segmentation of white blood cells in blood smear photomicrographs and proposed a novel technique for segmentation which can exploit color, size and shape features of different types of objects present in a blood smear photomicrographs. Keywords: Blood Smear, segmentation, quantization, white blood cells. Introduction Blood of human contains three major classes of cells: White Blood Cells (WBC), Red Blood Cells (RBC) and platelets. WBC can be distinguished from other blood cells on the basis of color, shape and size. All of these are produced in the bone-marrow through a consecutive propagation and segregation of hematopoetic stem cells, WBC’s can be clustered by their morphological appearance into about five main types called neutrophils, eosinophils, basophils, monocytes, lymphocytes. Normal peripheral blood contains the types of leukocytes shown in table-1. There may be some other types of WBC’s when there are some abnormalities in the peripheral blood. i.e. erythroblast, myeloblast , metamyelocyte, myelocyte, promyelocyte. Diagnosing various diseases have different protocols, some through appearance, shape and size while the others through a count, low or high. According to a report, World Health Organization (WHO) and French, American, and British (FAB) are two protocols used for its classification widely. The differential count of white blood cells indicates the existence of these diseases. Evaluating a blood smear for leukocytes with the help of digital image processing is faster, easier and cheaper and has overcome the tensions of hematologists in many developed countries. A huge mass of cases can easily be diagnosed in short span of time in a controlled manner. Necessary information relating WBC is that if count is less than 500, then it indicates that it is a risk of a critical infection, if count is more than 30,000 then it demonstrates a huge infection or a dangerous disease like leukemia. Preprocessing, image segmentation, feature extraction and classification are the four important steps in hematological image processing usually. However, we are focusing on preprocessing and segmentation steps in this work. The paper is organized as follows. Section 2 contains the related work. Section 3 describes the proposed methodology. Section 4 presents results and discussions on the proposed work and in section 5 some conclusions of the proposed methodology are highlighted. Table1 Types of leukocyte found in blood smears Type of Leukocyte Images Neutrophil Lymphocytes Monocytes Esonophil (granulocyte) Basophil (granulocytes) Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 3(4), 34-39, April (2014) Res. J. Recent Sci. International Science Congress Association 35 Related Work: There is enormous amount of literature committed to WBC segmentation and differential blood count. Edge detection based on HSI (Hue Saturated Intensity) color space is a widely used segmentation method. Selecting color features and histogram thresholding is used for the segmentation of nucleus and cytoplasm. Region growing is another method oftenly used for this purpose. Fuzzy clustering method and bayes classifier is also applied for segmenting the nucleus of white blood cells. Wei Gao et al used segmentation method for leukocytes. They extracted a textural gradient of cytoplasm by using a non-decimated complex wavelet transform (NDXWT). Watershed algorithm was used for the extraction and the result was refined by using the image enhancement techniques. For binarization they used adaptive thresholding. color features of plasma and WBC’s were extracted. These color features were used for further classification. The entropy based divergence for leukocytes segmentation are often used, i.e. Shannon, Renyi’s and Yager’s entrophy for the reduction of divergence measure. Suberjeet et al. exploited L*a*b* (Lab) color space for the extraction of WBC’s as the two layers a* and b* contains all the information relating WBC’s. They used K mean algorithm for the classification of WBC, supposing the number of clusters=4, as the image of blood smear contain 4 things, i.e. WBC, RBC, platelets and the background, and then they considered the cluster containing the blue nucleus. Nurul Hazwani et al.10, also used color based segmentation, by following HSV- Hue Saturated Value, color space, extracting the saturated component from it, as leukocytes show high contrast in this component. J. M. Sharif et al11 converted the original image into ycbcr color space and choose the second component of Ycbcr, as almost all information relating classification of WBC’s are present in it, and is used specially for the normalization of illumination that affect the quality of the image. Dipti Pathra et al.12 used K-Mean Algorithm combined with nearest neighborhood in L*a*b color space to segment white blood cells from the rest of components of blood smear. Rezatofighi et al.13 proposed the theory of Gram - Schmidt orthognalization for the segmentation of WBC’s nucleus that has a lot of information about every type of WBC, that is helpful for the automated recognition of WBC’s. Hiremath et al.14 proposed an algorithm that classify WBC’s. They converted the input image into gray scale, then applied histogram equalization in order to enhance the image, then used global thresholding method of binarization and applied morphological operations like erosion, dilation, closing etc over it, boundary touched cell were removed. Labeling and segmentation was done and the classification was done with K-mean clustering algorithm, by keeping the value of K=4. Stephan et al.15 converted a sample image into HSV color space, then binarized the saturated component from it and computed an unimodal function from the resulted binary image. The count and surface are of cells were being utilized for the derivation of this function. The counting area and the average surface area of cells were two important parameter for their function. Methodology The different steps of the proposed technique is shown in figure-1. After quantization the blood smear images with the aim to segment the WBC’s, all of the extra information (RBC’s, Platelets and other noise artifacts) were eliminated, images were binarized and labeled, after it if some images containing noise artifacts are eliminated through area filtering and morphological operations, filling and opening. The resulted segmented leukocytes were then counted, showing accurate results closest to that of hematologists. Each step involved is explained below: Figure1 Block diagram of the proposed methodology Smoothing the input image: Smoothing an image means to make the input image clear of tiny noisy objects, which may affect the results of post processing steps. For smoothing we have used wiener filter but as it can’t be directly applied on 3D images16, therefore we separated the three channels of the RGB and applied the filtering technique separately on each channel, and then recombined them as given in figure-2. This algorithm estimates the local mean and variance around each pixel. and Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 3(4), 34-39, April (2014) Res. J. Recent Sci. International Science Congress Association 36 Where is the N-by-M local neighborhood of each pixel in the image A. After recombining the result of each channel we got a quite clear image from undesired artifacts. The result along with its histogram is shown in figure-3. Figure - 2 Block diagram of wiener and quantization operation(a) (b) (c) (d) Figure-3 (a) Original Image (b) after applying wiener filter(c) histogram of original and (d) histogram after wiener filter application Quantization: In colored image processing quantization means to reduce color levels. In the fields of robotic, bioinformatics and artificial intelligence object recognition in color images is performed mostly with the help of quantization, as it easily removes all intensity values from the images while preserving the color values. The image when captured is in three color spaces, red, green and blue. Every image is having a background and the objects in the foreground. The objects in the image presents itself with a specific contrast level in each color channel, in another channel its appearance quality weakens, and we will leverage this concept to achieve our objective. The first step we’ll take is to remove the background from the image, then eliminating the undesired objects and leaving behind the wanted objects. For the purpose we did the following: New_I = F * round( I / FR ) New_ I = F * round(I / FG ) New_I = F * round( I / FB ) Where IR , FG , Fare red, green and blue channels respectively of an input image, R , and are image factors ranged between 0 and 255 and New_I will be the output image. The factor will first divide the image into intensity levels, the image will be normalized then by multiplying the result by the same factor , and the image will get quantized. This process will be repeated for all the three components of RGB images, it can easily be understood by looking to figure-3 and the following simple example. The three factors R , and were put in an iterative process to get the best value for discriminating leukocytes from RBC and rest of other components. See figure4. The images obtained after quantization are needed to be binarized in order to make the extracted WBC’s available for further processing. (a) (b) Figure-4 (a) Before Quantiation and (b) resultant Quantized Image Binarization: After quantization with reduced color levels, it is easy to make the image binary, without applying any other process like conversion to gray scale, the binarization has been carried out using Otsu’s method of thresholding, which chooses the threshold to minimize the intraclass variance of the black and white pixels, defined as a weighted sum of variances of the two classes17)1( where () and () Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 3(4), 34-39, April (2014) Res. J. Recent Sci. International Science Congress Association 37 [0, L-1] is the range of intensity levels, ) is the variance of the pixels in the background (below threshold) ) is the variance of the pixels in the foreground (above threshold) Weights i are the probabilities of the two classes separated by a threshold and variances of these classes. The result of binarization is shown in figure5. (a) (b) Figure-5 (a)Before binarization and (b) after binarization Morphological Operations: The first morphological operation we have done is filling the holes inside objects, A commonly used operation is the flood-fill operation. For example, suppose we have an image, binary or grayscale, in which the foreground objects represent spheres. In the image, these objects should appear as disks, but instead are donut shaped because of reflections in the original photograph, as shown in figure-8. Before doing any further processing on the image, we first filled in the "donut holes" using filling operation18. The sample holed images and the images after filling process are shown in figure-6. After filling the donut holes, another mathematical morphology, opening is applied upon the resulted filled images. Opening is the dilation of the eroded set A by a structuring element B: A o B = (A B) B (a) (b) (c) (d) Figure-6 (a) and (b) leukocytes with holes (c) and (d) after filling operation Where o stands for opening, represents erosion and denotes dilation. This operation was carried out, in order to make the edges of the extracted components smoother and clear the noisy artifacts19. (a) (b) Figure7 (a)Before morphological operations and (b) after morphological operations Labeling and Counting: The last step in our segmentation technique is a formal technique of labeling, counting and then displaying them. The count of the leukocytes play a vital role in the diagnosis of different types of hematological diseases. Figure-10 shows the final count of leukocytes in a sample blood smear image. Figure-8 Image showing the count of leukocytes Results and Discussion The described segmentation scheme has been tested on a set of 50 images of blood smears. Each image has been captured with a 63 magnification on olympus BX 51 microscope and has a size of 558 × 750 pixels. The sample images and their results are given in table-2, demonstrate the comparison of proposed method with other techniques. It can be observed that, in other techniques, a lot of information was lost due to massive mathematical morphological operations, while eliminating the extra objects. Whereas, the proposed method do not need these surplus morphological operations and is cabable of eliminating such extra information easily by just applying the proposed quantization technique. Moreover, due to color compression at a very low level, the images needs not to be converted into gray levels while binarizing the images, reducing the time complexity efficiently and keeping the results much closed to Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 3(4), 34-39, April (2014) Res. J. Recent Sci. International Science Congress Association 38 other competitive methods. In table-3 the accuracy rate of the proposed system is presented. Table-2 The comparison of other techniques with the proposed techniqueOriginal image Processed using HSV color space Processed using YCBCR color space Processed using Proposed method Table-3 The accuracy rate of the proposed system Image Set Manual Proposed System Accuracy (%) 1 1-4 1-4 100% 2 2-5 2-4 96% 3 1-4 1-4 100% 4 1-7 1-6 97.1% 5 2-4 2-4 100% 6 1-5 1-5 100% 7 1-4 1-4 100% 8 3-9 3-8 94.9% 9 1-6 1-6 100% 10 1-5 1-5 100% Conclusion A simple and efficient way of segmenting leukocytes in a blood smear images is presented that takes an RGB image and enhance it by removing the undesired components like red blood cells, platelets and the background by proposed quantization technique to retrieve the desired components, the leukocytes. The proposed method is simple and have fine level of accuracy with incredible reduction of time complexity. Our future work will be to classify different leukocytes and detecting the abnormal leukocytes found in blood smears. References 1.Tkachuk C.D. and Hirschmann J. V., Wintrobe’s Atlas of Clinical Hematology, Lippincott Williams & Wilkins, Philadelphia, Pa, USA, 1st edition, (2007)2.Hengen H., Spoor S.L. and Pandit M.C., Analysis of blood and bone marrow smears using digital image processing techniques, In the Proceedings of the SPIE M. Sonka, J. M. Fitzpatrick (Eds.), Medical Imaging, 4684, 624–635 (2002)3.Angulo J. and Flandrin G., Automated detection of working area of peripheral blood smears using mathematical morphology, Analytical Cellular Pathology, 25, 37- 49 (2003) 4.Trivedi M. and Bezedek J. C., Low-level segmentation of acrial images with fuzzy clustering, IEEE Trans. on System Man and Cybernetics, 16(4), 589-598 (1986) 5.Umpon N.T., Patch-based white blood cell nucleus segmentation using fuzzy clustering, ECTI Trans. Electrical Electronic Communications, 3(1), 510 (2005) 6.Guo N., Zeng L. and Wu Q., A method based on multi-specral imaging technique for white blood cell segmentation, Computers in Biology and Medicine, 7, 70-76 (2006)7.Gao W., Tang Y. and Li X., Segmentation of Microscopic Images for Counting Leukocytes, The 2nd IEEE International Conference on Bioinformatics and Biomedical Engineering, Shanghai, 2609 - 2612 (2008)8.Ghosh M., Das D., Chakraborty C., Entropy based divergence for leukocyte image Segmentation, Proceedings of 2010 International Conference on Systems in Medicine and Biology, Kharagpur, 409 – 413 (2010) 9.Mohapatra S. and Patra D., Automated Leukemia Detection using Hausdorff Dimension in Blood Microscopic Images, IEEE Int. Conf. on Emerging Trends in Robotics & Communication Tech., 64 - 68 (2010) 10.Abd Halim N.H., Mashor M.Y. and Hassan R., Automatic Blasts Counting for Acute Leukemia Based on Blood Samples, International Journal of Research and Reviews in Computer Science, 2(4), 971 (2011)11.Sharif J.M., Miswan M.F., Ngadi M. A. and Salam M.S., Red Blood Cell Segmentation Using Masking and Watershed Algorithm: A Preliminary Study, International Conference on Biomedical Engineering, Penang, 258 - 262 (2012)12.Mohapatra S. and Patra D., Automated Cell Nucleus Segmentation and cute Leukemia Detection in Blood Microscopic Images, International Coference on Systems in Medicine and Biology, Kharagpur, 49 - 54 (2010) 13.Rezatofighi S.H., Soltanian-Zadeh H., Sharifian R. and Zoroofi R.A., A New Approach to White Blood Cell Nucleus Segmentation Based on Gram-Schmidt Orthogonalization, Bangkok, 107 - 111 (2009) 14.Hiremath P.S., Bannigidad P. and Geeta S., Automated Identification and Classification of White Blood Cells (Leukocytes) in Digital Microscopic Images, IJCA Special Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 3(4), 34-39, April (2014) Res. J. Recent Sci. International Science Congress Association 39 Issue on Recent Trends in Image Processing and Pattern Recognition, , 59-63 (2010)15.Rupp S. and Schlarb T., Fully automated detection of the counting area in blood smears for computer aided hematology, 33rd Annual International Conference of the IEEE EMBS Boston, Massachusetts USA, doi: 10.1109/IEMBS.2011.6091912, 7759-62 (2011)16.Jae Lim S., Two-Dimensional Signal and Image Processing, Englewood Cliffs, NJ, Prentice Hall, equations 9.44-9.46, 548 (1990)17.Sezgin M. and Sankur B., Survey over image thresholding techniques and quantitative performance evaluation, Journal of Electronic Imaging, 13 (1), 146–165 (2004)18.http://www.mathworks.com/help/images/ref/imfill.html, 1/12/12, 5:13 PM (2012)19.Dougherty E. R., An Introduction to Morphological Image Processing, SPIE Optical Engineering Press, ISBN 0-8194-0845-X (1992)