Segmentation and Counting of White Blood Cells Using Image Processing Techniques

— The counting of white blood cells (WBCs) is an extremely essential measurement parameter to diagnose some particular diseases and identify various infections that are concealed within the human body. Within the hospital, manual counting of WBCs is time-consuming, laborious, and needs experienced experts for accurate results. Thus, computer-aided diagnosis methods can help pathologists to perform accurate counting with less effort. To achieve this, a new method for WBCs counting based on incorporating the marker-controlled watershed algorithm with morphological filters for a microscopic blood sample image is proposed in this paper. To begin with, color correction is applied to standardize the amount of color intensity in the original blood-smeared image. Segmentation of white blood cells is then carried out using hue-saturation-value (HSV) model color analysis with the Otsu threshold. Noise and undesirable regions that emerge during the segmentation process are removed using morphological filters. For overlapping WBCs, an effective segmentation method based on a watershed algorithm is introduced to overcome the limitations in the existing WBCs counting methods. Images from the ALL_IDB1 dataset are utilized to apply and evaluate the proposed approach. An accuracy of 95% is achieved in the counting of WBCs. The evaluation results reveal that the proposed method outperforms the accuracy of the traditional methods and overcomes their shortages.


I. INTRODUCTION
HE immune system of the human body is a complex network of cells, tissues, and organs that work together to defend the body against harmful pathogens, such as viruses and bacteria.One important component of the immune system is white blood cells (WBCs), also known as leukocytes, which are produced in the bone marrow and circulate throughout the body in the blood.
There is a relationship between the number of WBCs and leukemia, which is a type of cancer that affects the blood and bone marrow.Leukemia is characterized by an abnormal increase in the number of WBCs, which can lead to a decrease in the number of other types of blood cells, such as red blood cells and platelets.Monitoring the number of WBCs can be useful in diagnosing and monitoring certain medical conditions, including leukemia.Therefore, it's important to interpret the WBCs count and consult with a healthcare professional for proper diagnosis and treatment.The normal number of WBCs in the blood is 4,500 to 11,000 WBCs per microliter, and the two cases of aberrant WBCs count are low WBCs and high WBCs count [1]- [2].The former is taken into account when the count is less than 4,500 cells per microliter and can be a result of illnesses like human immunodeficiency virus (HIV) and lymphoma, while the latter is taken into account when the count is greater than 11,000 cells per microliter and can be a sign of illnesses like Anemia, Leukemia, and tissue damage.In traditional methods, skilled operators manually carried out the process of counting and diagnosis.This process is laborious and depends on the operator's skill.An automated method for WBCs counting is required to accurately diagnose the diseases and identify the various infections.The automated approach can be used with low-cost, standard-accurate, and remote screening systems [3].
Counting of WBCs attracted the attention of numerous researchers [4]- [13].In [4] a variety of WBCs segmentation and counting approaches was employed, including k-mean clustering, and the expectation-maximization algorithm.A framework for separation of the nucleus and cytoplasm of WBCs employing active contour, snake algorithm, and Zack thresholding was introduced in [5].For WBCs segmentation and border detection of cells in images of peripheral blood smear slides, Otsu adaptive thresholding, and watershed transform were developed in [6].Histogram thresholding was employed in [7] to separate the WBCs from the other cells.In [8] an approach based on Otsu adaptive thresholding was utilized to segment and extract the WBCs from blood cell images.An approach to identify distinct groups of WBCs was introduced in [9] to find out the type of leukemia.A distinction between segmenting Acute lymphocytic leukemia (ALL) using the hue-saturation-intensity (HSI) and red-green-blue (RGB) color spaces was reported in [10] - [11].In [12] a binary picture displaying the distinct and adjacent WBCs was employed with watershed transform for WBCs counting.This method removed the abnormal components by controlling the values of solidity and area of the cells.In [13] saturation component was extracted from images, and a thresholding method was used to segment the WBCs.

T
Although there are several methods for WBCs counting [4][5][6][7][8][9][10][11][12][13], there are still some limitations in these methods such as the appearance of undesirable regions that emerge during the segmentation process.Additionally, overlapping cells are incorrectly counted as one cell.This affects the results of counting and consequently, the decision whether the person has a specific disease.In this paper, these problems are overcome.Undesirable regions are removed using morphological filters.For overlapping WBCs, an effective segmentation method based on a watershed algorithm and morphological filters is introduced.Moreover, the proposed method can segment and count different types of WBCs in blood smear microscopic images as shown in Fig. 1.
The rest of this paper is organized as follows.Section II explains the main steps of the proposed method.In section III, the utilized dataset and experimental results are discussed.Limitations and future works are presented in section IV.Finally, section V concludes this paper.

II. PROPOSED METHOD
Six main steps are introduced to apply the proposed method for WBCs segmentation and counting as shown in Fig. 2.These steps include; color correction, leukocyte identification, background removal, separation of grouped WBCs, image cleaning, and circular Hough transform for WBCs counting.

A. Color Correction
Microscopic blood images may differ from one to another in terms of the color intensity due to the various circumstances while the blood-smeared images were taken such as lighting, and setting of the microscope.The color of the resultant image needs to be corrected to a single standard color to uniform the microscopic images.Preselected four targeted microscopic images namely template images are employed to get the standard image as shown in Fig. 3.This method converts the blood-tested image that is over or understained into the target image that is properly stained.Channel correlation is reduced by employing the l α β color space [15].
For this purpose, the mean and standard deviations are computed along the three axes l α β for both the blood image and template images.Initially, this method represents the blood image by using the l α β color space as in (1), (2), and Where L * , α * , and β * are the normalized axes of l, α, and β respectively, and (µ l ) B, (µ α ) B. (µ β ) B are the mean of the blood image along the three axes l, α, and β.Then, using factors based on the corresponding standard deviations, blood image points are scaled by making up the synthetic image as in ( 4),( 5), and (6).[14] where lˊ, α ˊ, β ˊ are the three axes of the color-corrected image, (µ l ) t, (µ α ) t, and (µ β ) t are the mean of the template along the three axes l α β , and σ l t, σ l B , σ α t, σ α B, σ β t, and are the standard deviations of blood image and template along the three axes l α β.Next, the averages of the image rather than the averages that had previously been subtracted are added.Ultimately, the output changes back to RGB as shown in Fig. 4.

B. Leukocyte Identification
Segmentation which involves removing the background and red blood cells is applied to the corrected image.The WBCs have a variety of geometries and contain cytoplasm and a nucleus, making it difficult to segment by traditional methods.Therefore, RGB color space is transformed nonlinearly into hue, saturation, and value (HSV) color space [16].The hue (H) channel refers to the color type such as (Red, Green, Yellow…etc.).The range of hue values changes from 0º to 360º passing through rainbow colors.Value (V) refers to the quantity of light in the colour.The saturation (S) value impacts the purity of the colors.S and V both fall between zero and one.In the proposed method, the H channel is extracted from the HSV color space.It is observed that the H component can give similar pixel values and shapes to the original blasts as shown in Fig. 5. C. Background removal Otsu threshold [17] is utilized to perform automatic image thresholding, the algorithm returns a single intensity threshold that separates pixels into two classes, foreground and background.The variance within each of the two classes is calculated and selects the value for which the weighted sum of these variances is the least.Alternatively, it is also possible to consider the variance between the classes.Minimizing intra-cluster variance (within cluster variance) and maximizing inter-cluster variance (between cluster variance) give the same result, and suggest a good split between the two classes as shown in Fig. 6.

D. Separation of Grouped WBCs
One of the most important problems facing the existing methods for WBCs counting is the overlapping of cells, where the overlapping cells are considered as one cell in the counting step.In this paper, morphological erosion and area closing with a predetermined structuring element are utilized for separate overlapping cells as shown in Fig. 7.A Watershed-marker controlled algorithm [18] is applied to separate the overlapping cells via applying a strategy based on area.It depends on region processing, thresholding, and discontinuity detection.The image gradient is used to find the image discontinuities, where a gradient in an image is a shift in color or intensity that occurs in one direction only.The result of applying the grouped WBCs separation step is shown in Fig. 8.

E. Image Cleaning
It is necessary to remove all of the leukocytes that are near the edge of the blood image as well as any atypical components (non-leukocytes) to avoid errors in the following phases of the counting process.The removal of aberrant components is a more complicated procedure than cleaning the image's edge because it requires figuring out how many leukocytes are present in the image.
For each lymphocyte, area and convex area are computed.The mean area is calculated to identify and remove components with irregular dimensions.A relatively small region, for instance, might point to the presence of an artifacts that was left in place.Alternately, a very broad area can point to the existence of nearby leukocytes that weren't properly isolated.The solidity value is utilized to identify the anomalous component and measure the density of each object.The area of an item divided by the area of its convex hull is the measure of its solidity as in (7).

Area of the object
Convex area of the object Solidity  (7) A solid item has a solidity value of one, and an object with uneven boundaries or holes has a solidity value of less than one.The threshold solidity value is computed from the image when it has individual leukocytes or when this image is empty.In this instance, experimental results showed that a solidity value of 0.89 effectively distinguishes aberrant components; as a result, this value is adopted as a threshold.Objects with a solidity value below this threshold are discarded.The presence of artifacts that have not been sufficiently eliminated is indicated by a solidity value higher than the threshold value.Fig. 9 displays the outcomes following border cleaning.

F. Circular Hough Transform for WBCs counting
Analytically defined shapes like parametric curves, circles, and straight lines can be found using the Hough transform.By calculating the circle's center and its radius from the original image and based on each image's trails, the circular Hough transform approach may detect and estimate the number of white blood cells by finding the properties such as area, the centroid for each object (connected component) in an image then it automatically draws a circle around WBCs.This finally gives us the correct number of WBCs as shown in Fig. 10.The suggested method enables automatic counting of WBCs using image processing techniques, and it serves as a medical tool to minimize the multiple disadvantages of manual observation.

A. Dataset
A publicly accessible dataset [20] is used for applying and evaluating our proposed method.The information was recorded using a Canon Power Shot G5 camera and an optical lab microscope.Each image has a resolution of 2592 x 1944 in JPG format with 24-bit color depth.There are two versions of the ALL-IDB database: ALL-IDB1 and ALL-IDB2.There are 108 pictures in this dataset.It has roughly 39000 blood cells in it.Images were captured with the microscope at various magnifications, from 300 to 500.

B. Results and Evaluation
The selected dataset [20] to apply the proposed method is challenging, as it has a large number of images with overlapping WBCs and artifacts.This helps to test and evaluate the proposed method to overcome the limitations of the existing method [12]- [13].In this paper, 33 tested images were used to perform manual counting for the WBCs and compare them to automatic counting by the proposed method.In our experiment, white blood cells are counted in the first 33 images in ALL_IDB1.Then, the number of segmented WBCs is contrasted with the manual count and the existing methods as summarized in TABLE I. Counting using existing methods [12] and [13] gives an average accuracy of 91.7% and 93.3% respectively, while the proposed method gives an average accuracy of 95%.As shown in TABLE I, for the first image, "Image 1", the existing method decided that the number of WBCs is five cells in [12] and six cells in [13].the proposed method detects the exact number of WBCs which is 9 WBCs with an accuracy of 100%.In some cases, the proposed method is unable to correctly count the number of WBCs.This is because the utilized image has artifacts that have a large area making it similar in size to WBCs, the final results show that the proposed method enhances the performance of the counting process.In addition, this method overcomes the limitations in the traditional methods such as considering the overlapping cells as one cell or counting artifacts and considering them as WBCs as shown in Fig. 11.

IV. LIMITATIONS AND FUTURE WORKS
A novel technique for fully automatic leukocyte segmentation and counting from microscopic pictures has been developed in this paper.The proposed method has limited counting accuracy when the artifacts have the same size as WBCs in the blood sample image, and this is a challenging problem for human experts.In future work, the identification phase will be improved to overcome this problem by adding other constraints to this phase to remove the unwanted objects.V. CONCLUSIONS This paper introduced a rapid and low-cost technique for WBCs counting in a microscopic blood sample image.The proposed method employed the marker-controlled watershed algorithm with morphological filters to get promising results compared to existing methods.WBCs were separated from microscopic color images in six main steps including; color correction, Leukocyte identification, background removal, separation of grouped WBCs, image cleaning, and circular Hough transform for WBCs counting.Color correction was applied to standardize the amount of color intensity in the original blood-smeared image.Leukocyte identification was performed to extract the H channel from the HSV color space.Otsu threshold was applied in the background removal.For the separation of grouped WBCs, a Watershedmarker controlled algorithm was utilized., for removing the borders and abnormal components image cleaning was applied, and the Circular Hough Transform was employed for WBCs counting, detecting, estimating the number of white blood cells, and automatically drawing a circle around WBCs. counting, detecting, estimating the number of white blood cells, and automatically drawing a circle around WBCs.Comparison between the proposed and existing methods revealed that the proposed method outperformed and achieved an average accuracy of 95% in the counting of WBCs and overcame the limitations of existing methods.

Fig. 4 .
Fig. 4. (a) Sample of source image (b) Result of color correction

TABLE I COUNTING RESULT *
Note: Border cells are not included in the manual count