Global Threshold Using Otsu and Active Contour for Detection of Malaria Parasites in Thick Blood Smear

Malaria is a disease caused by the plasmodium parasite and has caused many fatalities. In general, identifying malaria parasite infection can be done by visually observing thick and thin blood smears through microscopic devices. Identification of parasites in thick blood preparations has a higher level of difficulty than thin blood preparations. In thick blood preparations, various objects such as artefacts and noise have a structure similar to the structure of parasitic objects. This paper aims to develop a parasite detection method based on image processing in thick blood smears, consisting of two main stages. First is to improve image quality by applying contrast value stretching, converting green channels, and refining each image. Second is to segment the plasmodium parasite using global threshold Otsu and active contour followed by several morphological operations. The proposed method produces a high sensitivity of 98.06% with an average negative false rate of 1.4%. With the sensitivity level obtained, it can be interpreted that most of the parasitic objects have been detected correctly in one blood sample image.


Introduction
Malaria is a significant threat to health and has caused many deaths. According to the World Health Organization (WHO), at least 219 million malaria cases in 2017, with 435,000 deaths [1]. Transmission of this disease occurs through the bite of a female Anopheles mosquito which causes the growth of parasites in human blood from the genus plasmodium [2]. Humans infected with malaria have the highest risk of death. One of the leading causes of death in malaria patients is the slow handling of parasitic infections, especially in areas that lack experts and inadequate facilities. An early diagnosis of malaria parasite infection in human blood is needed that can provide fast and accurate screening results according to WHO competency standards; this is very important to do because the results of the diagnosis can be used as the basis for taking appropriate medical action in the context of treating patients infected.
In general, identifying the plasmodium parasite is conducted by visually observing the preparation and staining the blood on the sample preparations through a microscopic device used by medical personnel to detect and diagnose malaria parasite infection. However, some researchers have revealed that this technique is prone to errors because it depends on the level of expertise and experiences of the specialist, in addition to the condition of the equipment used and technical matters such as staining of blood preparations, which also affect the objectivity of the diagnostic assessment [3] [4]. There are several diagnostic techniques for malaria parasites, one of which is a diagnosis based on image processing * Corresponding author: adinugroho@ugm.ac.id which is believed to cover some of the weaknesses in examining microscopic devices [5].
There are two types of blood preparations in image processing-based diagnosis: thick blood smear and thin blood smear. Figure 1 (a) shows an example of digital image acquisition of a thick blood smear, and Figure 1 (b) is an example of digital image acquisition of a thin blood smear. Both types of blood preparations are used according to their respective purposes. The image of a thick blood smear is used to detect parasites in the blood, while a thin blood smear is used to determine the type and phase of the parasite. In this study, a thick blood smear was used to detect malaria parasites in the blood. Several related studies have been carried out using thick blood smears. Elter et al. [6] proposed a method which consisted of two stages. The first was to carry out detection with high sensitivity. As a result of this process, the number of detection errors increased. The second stage was to reduce the number of detection errors while maintaining the sensitivity level. The algorithm yielded a sensitivity of 0.97 with an average number of detection errors of 0.8 per image. This study used 256 images with resolution of 1000 by 1000 pixels and divided the data into two parts, i.e. 128 for training and the next 128 for testing. Research by Arco et al. [7] used adaptive thresholding and morphological operations to segment parasitic objects using a dataset of 475 images and subsequently obtained 96% of accuracy. However, in this study, some objects detected as parasites were not considered because it was possible that the detected objects were not parasites but artefacts, which would lead to a high error rate of detection.
Abidin et al. [8] proposed a method using lowpass filtering to reduce noise and stretching contrast to improve image quality, segmentation techniques using Active Contour Without Edge (ACWE), and some morphological operations. The data used in this study were candidate images of the malaria parasites with a total of 50 grayscale JPG images, and the resolution of each file is 140 by 140 pixels. This study obtained with an accuracy of 97.57%, false negative rate (FNR) of 12.04%, and false discovery rate (FDR) of 6.87%. Azif et al. [9] proposed a detection method by adopting the adaptive threshold determination in the ACWE method. The data used in this study were 36 digital images of thick blood preparations with resolution of 1600 by 1200 pixels. This study obtained results with a sensitivity of 98.04%. Furthermore, Dave [10] used an adaptive histogram threshold and morphological operations for segmenting parasitic objects. The obtained sensitivity value of 86.3% in this study can still be improved by exploring segmentation techniques. The used data were 87 digital images of thick blood preparations with resolution of 3136 by 2352 pixels divided into two parts, i.e. 43 images used for training and 44 images used for testing.
Our research work develops a detection method with two main stages. The first is to improve the image quality to facilitate the segmentation process. The second stage is to segment all parasitic objects with a focus on high sensitivity while reducing false positive detection to obtain results that can be categorized as a feasible scheme according to WHO competency standards.

Method
The thick blood smear images were obtained from the Parasitology Laboratory, Faculty of Medicine, Universitas Gadjah Mada. To produce digital images highlighting parasitic objects, the blood preparation to be acquired is given Giemsa staining first. Giemsa staining was performed to clarify and highlight parasitic objects in blood preparations. The process of digitizing blood preparations begins with observation through a microscope. An optilab camera that captures images seen through a microscope is placed on one of the microscope eyepiece lenses to be converted into digital form and saved in JPG format with resolution of 1600 by1200 pixels. The amount of data collected from the acquisition process is 36 images with an average density of malaria parasites for each image of approximately 15-20 objects. In general, the proposed method in this research is divided into two. The first stage is preprocessing and followed by the segmentation stage. Details of the proposed scheme are shown in Figure 2.

Pre-processing
The image obtained from the acquisition has poor quality. This is influenced by several factors such as the image's brightness level, various noises resulting from the coloring technique during the acquisition process. Through the initial processing stage, the image is improved with the aim that after going through quality improvements, it can facilitate the following process and provide optimal results. There are three stages in this initial processing: contrast stretching, green channel conversion, and median filter. The image used in this study has a low contrast value from 36 images with an average pixel intensity distribution between 50 and 175. For that, it is necessary to stretch the contrast value of each image. The contrast enhancement technique uses an intensity adjustment that works by linearly mapping the intensity value in the initial histogram to the intensity value in the new histogram with a pixel intensity distribution ranging from 0 to 255.
After getting the image from the stretching contrast, extracting the green channel on the RGB image simplifies the processing process. The green channel is selected based on the observations; in this channel, the target object is seen more clearly when compared to the red channel or blue channel. Furthermore, the image from the stretched contrast will be refined using the median filtering method.

Segmentation
The parasitic object segmentation stages consist of several processes mainly based on morphological image processing, namely bottom-hat morphology, global threshold Otsu, dilation, opening, active contour, and closing.

Bottom Hat-Morphology
The bottom-hat morphological operation is a composite morphological operation consisting of dilation and erosion. This operation will enlarge the object through a dilation process, followed by an erosion morphology operation that produces an image in the composite closing operation. The results of the bottom-hat morphology operation are obtained from the image from the closing processing minus the original image that has gone through median screening. The forming element is a parameter in the bottom-hat operation used to eliminate various types of unwanted objects.
In this paper, the thick blood smear image used contains white blood cells, generally more significant than other objects such as artefacts, noise, and parasites. To eliminate white blood cell objects, bottom-hat morphological operations are used with the size of the more minor constituent elements or according to the size of the parasitic object. This morphological operation uses a forming element with a radius value of 9. This value is obtained from observing the size of the parasitic candidate object in pixels.

Global Threshold Otsu
This method works by calculating the global threshold value from the image using the Otsu method. The Otsu method selects a threshold that minimizes the intraclass variance of the black and white pixels. In this study, the global threshold Otsu segmentation technique was used to obtain the initial shape of the parasitic object.

Dilation
In image processing applications, morphological dilation operations help find the region of interest (ROI) by increasing the radius through the specified forming element. It aims to get the initials of the entire parasitic object.
In this paper, the dilation morphology operation is used to overcome the impact of the previous processing, which resulted in some parasitic objects being separated from their cell nuclei. Each parasitic object has its pixel radius enlarged through the forming element to reunite previously separated objects with the dilation operation. The radius parameter used in the forming element for dilation purposes is three pixels.

Opening
Morphological opening operation is a combined operation of erosion and dilation. The impact of dilation processing in the previous stage resulted in detecting non-parasitic objects, increasing detection errors. To reduce detection errors, an opening operation with the specified forming element is used.
The radius parameter used for this process is 4 pixels. With this radius, non-parasitic objects smaller than parasitic objects can be eliminated, while malaria parasite targets are still detected.

Active Contour
The active contour method performs segmentation that can move by following the shape of the edges of the target object. This method works by forming the initial object, or the initial mask, which moves actively to form the target object to be segmented. In this study, the initial mask was formed by adjusting the position of all target objects. The implementation of the active contour method uses 100 iterations until the line movement stops.

Closing
The closing operation works by performing a dilation operation and is followed by an erosion operation. This operation affects the background area with a similar shape to the forming element, forming an object based on the surrounding elements. The radius parameter used for this process is 3 pixels.

Result and Discussion
Examples of image undergoing several steps are shown in Figure 3 and Figure 4. At the initial processing stage, the acquired image is enhanced to clarify the target object before conducting segementation.  To overcome this problem, contrast stretching is carried out. Moreover, it can be seen that in the stretched image (Figure 3 (b)), the background of the image becomes lighter, and the parasitic object becomes darker. Then, the green channel is extracted to highlight both parasitic and non-parasitic objects, such as the background as shown in Figure 3 (c). Before performing the bottom-hat operation, the green channel image undergoes median filtering to refine the image. The resulted image is shown in Figure  4(a). Various objects such as artefacts and noise resemble a parasitic object in the blood supply image. The initial step in order to be able to select these various objects is to use bottom-hat morphological operations (Figure 4 (b)). The structuring element which is set into the 9-pixel forming element becomes the benchmark to be able to distinguish between non-parasitic and parasitic objects. Therefore, the objects that have a size above the forming element that has been determined are automatically eliminated such as white blood cells which have a larger size when compared to parasitic objects. Furthermore, to get the initial shape of the parasitic object, the global threshold Otsu segmentation technique is used and the resulted image is shown in Figure 4 (c). This technique works by calculating the global threshold of the image using the Otsu method. The Otsu method selects a threshold that minimizes the intraclass variance of the black and white pixels.
The result of segmentation with global threshold Otsu is a binary image, where a pixel with a value of 1 is an object, and a pixel with a value of 0 is the background. Some detected parasitic objects have petite pixel sizes; this will be risky when eliminating and cause detection failure later. To deal with this problem, a dilation morphology operation is carried out. This operation is needed to enlarge the radius of the parasitic object with a size of 3 pixels as shown in Figure 4 (d).
The impact of the dilation operation results in many false positives such as artefacts and noise. To reduce detected errors, morphological opening is used. This stage uses a forming element with a radius of 4 pixels in the form of a disc. The resulted image is shown in Figure  4 (e).
Malaria parasites have the cytoplasm (parasite tail) located around the nucleus (cell nucleus). To wrap the entire area of the parasite, an active contour technique is used to hope that the intact form of a malaria parasite can be wrapped in Figure 4 (f). Active contour requires an initial mask in the segmentation process. The image processing results from opening provides an initial mask for the active contour to process the image. Based on the initial mask, the active contour forms an object similar to its original shape based on the bottom hat image processing. After segmenting with active contour, several parasitic objects are separated from the cell nucleus. If no additional processing is carried out, this results in detectied errors because separated objects are recognized as two different parasitic objects. To overcome this problem, the closing operation is used with a radius of 3 pixels forming elements that can combine areas of objects close together (see Figure 4 (g).
Furthermore, to evaluate the performance of the proposed scheme, we use a confusion matrix consisting of several parameters. True-positive (TP) representation of the number of positive data classified as positive. False-positive (FP) representation of the number of negative data classified as positive. False-negative (FN) representation of the number of positive data classified as negative data. From these parameters, three measurement indicators can be formed, as shown in Table 1. Sensitivity is used to measure the detection ability to show which objects are parasites of all-natural parasites. False Negative Rate (FNR) represents the proportion of object pixels misclassified in the segmentation process. False Discovery Rate (FDR) represents the proportion of background pixels misclassified in the segmentation process. As shown in Table 1, the proposed scheme obtains 98.06% of sensitivity. Sensitivity with a high value means that almost all parasitic objects can be detected correctly. Only 1.4% cannot be detected or falsenegative rate. Meanwhile, the false discovery rate is still relatively high at 66.7%, which means that there are still quite many non-parasitic objects being detected. The equations of the three measurement indicators used are shown in Eq (1), Eq (2), and Eq (3).
Based on the aforementioned results, several nonparasitic objects are also detected due to the dilation process. The dilation process is carried out to obtain the overall shape of the parasitic object. However, the impact of this process causes the object radius to enlarge from its original size according to the forming element specified in this case by 3 pixels. This problem is solved in the opening process to reduce the appearance of nonparasitic objects. The opening operation uses a forming element of 4 pixels, but this size has not removed nonparasitic objects. This is the leading cause of the high level of error detection in this study. The determination of the forming elements for each morphological operation must be carried out carefully to obtain optimal results.
There are three studies with the same aim to detect parasites in thick blood smears. The comparison of sensitivity in Figure 5 does not indicate that our proposed method is better than the previous research because two of the studies used different datasets to the one we used. For this reason, we only show the gains in the sensitivity aspect for each study conducted in the same case. Research conducted by Elter et al. and Dave obtained sensitivity of 97% and 86.3%, respectively, using different datasets. Meanwhile, Azif achieved the sensitivity level reached 98.4% using the same dataset that is used in this study. The proposed method from our research work reaches a sensitivity of 98.06% with an error rate of detection that is still relatively high, reaching 30.7 per image.

Conclusion
This paper presents a malaria parasite detection method for thick blood smears. The proposed method in this research consists of improving image quality and segmentation. In this study, the global threshold Otsu segmentation method and active contour are the main techniques used to detect parasitic objects. The main challenge for detecting malaria parasites in thick blood smears is distinguishing between various objects with a structure almost the same as the structure of the parasite object, such as artefacts and noise produced from the blood staining process or objects from white blood cells.
The proposed method obtained encouraging results from the sensitivity level of 98.06%. It outperformed several similar studies, but the detection error generated from the proposed scheme was still relatively high. For further research, techniques are needed to reduce detection errors while maintaining a high sensitivity value.