Modified Global and Modified Linear Contrast Stretching Algorithms: New Colour Contrast Enhancement Techniques for Microscopic Analysis of Malaria Slide Images

Malaria is one of the serious global health problem, causing widespread sufferings and deaths in various parts of the world. With the large number of cases diagnosed over the year, early detection and accurate diagnosis which facilitates prompt treatment is an essential requirement to control malaria. For centuries now, manual microscopic examination of blood slide remains the gold standard for malaria diagnosis. However, low contrast of the malaria and variable smears quality are some factors that may influence the accuracy of interpretation by microbiologists. In order to reduce this problem, this paper aims to investigate the performance of the proposed contrast enhancement techniques namely, modified global and modified linear contrast stretching as well as the conventional global and linear contrast stretching that have been applied on malaria images of P. vivax species. The results show that the proposed modified global and modified linear contrast stretching techniques have successfully increased the contrast of the parasites and the infected red blood cells compared to the conventional global and linear contrast stretching. Hence, the resultant images would become useful to microbiologists for identification of various stages and species of malaria.


Introduction
Malaria is a widely prevalent disease, affecting millions of people in the world. Research has shown that malaria is caused by a protozoan parasite of the genus Plasmodium. Plasmodium is a small, single-cell organism which originated from a species of mosquito named Anopheles [1]. Malaria is passed on by the female Anopheles mosquito biting a person who has malaria parasites in their blood. If the disease is not treated, it can lead to serious problems such as anemia, retinal damage, and convulsions [2]. Malaria infection ends in one of two ways either the patient dies or the parasites are defeated by immune system or medications. Up to this date, five species of genus Plasmodium that can cause human infection have been discovered namely, P. falciparum, P. vivax, P. ovale, P. malariae, and P. knowlesi [3]. In 2009, it is estimated that 3.3 billion people which is half of the world population are at risk of malaria, with approximately 225 million cases and 781,000 of deaths [4]. The vast majority of cases occur in children under the age of 5 and also pregnant women. In Malaysia, a total of 7,010 malaria cases were diagnosed among Malaysians in 2009 [4].
Diagnosis of malaria must be prompt, as a few hours of delay in treatment involves a matter of life and death. Currently, there are several new methods have been employed for diagnosis of malaria. These include the use of fluorescent microscopy, rapid antigen detection method, and polymerase chain reaction (PCR) technique [5]. Despite these advances, the most economic and reliable diagnosis which is based on microscopic examination of blood slide remains the gold standard for laboratory confirmation of malaria [5,6].The procedure is performed manually by expert microbiologists through visual identification under light microscope [6]. The percentage of parasitaemia as well as the species and life-cycle stages of the detected parasite must be determined in order to provide the best treatment. The scheme that requires the examination of both thick and thin blood smears for the presence of plasmodia is believed to be the most sensitive and specific one [7]. Besides these numerous advantages, there are also some limitations associated with the identification of malaria based on light microscopy, such as time consumption and labour intensity. In addition, the accuracy of the final diagnosis varies depending on the skill and experience of the experts [7,8]. In comparison to the expert microscopy, standard laboratory microscopy has a sensitivity of approximately 90%, a figure which drops dramatically in the field [7]. In Malaysia, there are more than 1.5 million slides examined each year in a population at risk of approximately 1 million [3]. Due to human error and time consumption, better and more efficient method is needed.
The contrast of the malaria image is one of the factors that may influence the accuracy of interpretation by microbiologists. The malaria slide images that have been captured through the microscope may have their own weaknesses such as blurred or low contrast due to the magnification or underexposure of the light built in the system of the image analyzer. In addition, variable smears quality and the conditions of the slide are highly influenced by the time and storage. Due to the low quality of the image, it will be hard to visualize and analyze the morphological features between the different plasmodia species on the screen, hence increasing the false diagnosis rate. Thus, contrast enhancement technique at the preprocessing stage is developed to adjust the quality of image for better human visual perception [9]. The resulting enhanced medical image will provide clearer and cleaner images for better and easier disease screening process by the doctor.
Various approaches of contrast enhancement techniques have been developed for enhancing the image contrast. Despite of histogram equalization, contrast stretching is one of the popular contrast enhancement technique that has been applied in X-ray [10] and various medical images such as leukaemia [11], retinal fundus [12], and computed tomography (CT) brain images [13]. There are several contrast enhancement techniques that have been developed for malaria image. Tek [14] proposed a new colour normalization method that has been applied on peripheral thinfilm blood images. This method has been developed in order to maintain the colour constancy of the images that have been captured from various sources. The normalization has been applied separately to the foreground and background regions. A rough estimation of the foreground-background regions is done by mathematical morphology and followed by a refined segmentation using histograms of these regions. Then, an illumination-independent response is calculated using the background region. The normalization is completed by transforming the foreground region according to the grey values determined by a reference set. The proposed method has been tested on various images and has been found successful.
Another example for the application of contrast enhancement technique is the use of dark stretching technique for enhancing and segmenting the P. falciparum based on thick blood smear images [15]. By applying the dark stretching technique, the darkest region of the image which is referred to the parasite will be stretched, while the bright region will be compressed. Thus, the appearance of the parasites will become clearer due to the stretching process in dark stretching technique. Due to the requirement for enhancing the malaria image, the current study investigates the performance of contrast enhancement techniques namely, global and linear contrast stretching as well as the proposed modified global and modified linear contrast stretching that have been applied to enhance the malaria slide images. The proposed contrast enhancement technique is expected to improve the performance of microscopy by improving the quality and clarity especially on degrading or low contrast malaria image as well as easing the image segmentation process in the later part of the diagnostic system.

Morphological Features of Malaria
Generally in malaria diagnosis, the process is performed by searching for the parasites in blood slide through a microscope. The visual aspect of the parasites and the red blood cells (RBCs) can be distinguished based on colour due to the used of chemical named Giemsa stain [1]. Then, specific morphological features will be observed in order to identify the stages and species of malaria. During the life-cycle in peripheral blood, the five malaria species may be observable in the four different life-cycle stages which are morphologically distinguishable between the ring, trophozoite, schizont, and gametocyte [1]. In this study, the four contrast enhancement techniques have been applied on four life-cycle stages of P. vivax images. The malaria images for the four life-cycle stages of P. vivax are shown in Figure 1.
Here, The variations of malaria parasite morphology that are generally being observed are as follows [1,16]; (a) size: the size of the parasite and the infected RBC (red circle); (b) form: the configuration of the nucleus and cytoplasm of the parasite which occur during the growth of the parasite; (c) colour: the fraction of the stain taken up by the various elements of the parasite; (d) pigment: the presence or absence of malarial pigment.

Methodology
In this study, the proposed work comprises of three main steps. These include image acquisition, image enhancement, and measurement of image quality for the four contrast enhancement techniques    [17]. This technique enhances the image from the luminance information of an entire image. Image with a high global contrast will cause a global feeling of a detailed and variation-rich image. On the other hand, image with a lower global contrast contain less information, less details and appears to be more uniform [18].
The formula for global contrast stretching is governed by the following equation [19]: where in RGB (x, y) is The original RGB value of the pixel, out RGB (x, y) is the new RGB value of the pixel, min RGB is minimum value between the RGB components , and max RGB is maximum value between the RGB components Based on (1), (x, y) is the image pixel location. min RGB and max RGB are the minimum and maximum values between the RGBs (red, green, and blue) of the original image. The GCS technique will consider all ranges of RGB colours at once to determine the minimum and maximum values between the RGB components. The combination between the RGB components will give only one value for each minimum and maximum parameter which will later be used for the contrast stretching process. However, the process for selecting these minimum and maximum values is different for the linear contrast stretching (LCS) technique.
For LCS technique, the stretching process for each of the RGB components is carried out separately. Here, the amount of stretching that will be applied in a neighborhood will be controlled by the original contrast in that neighborhood. The formula for linear contrast stretching is governed by (2) [20]: where in RGB (x, y) is the original RGB value of the pixel, out RGB (x, y) is the new RGB value of the pixel, min is minimum value for each RGB components, and max is maximum value for each RGB component Based on (2), the LCS technique will consider each range of RGB components in the image. Thus, the range of each colour component will be used during the contrast stretching process to represent each range of colour. This will give each colour component a set of minimum and maximum values. By applying this technique, each RGB component will be distributed linearly over the whole histogram so that the dynamic range of the histogram (0-255) is fulfilled [9].

Modified Global and Modified Linear Contrast Stretch-
ing. The enhancement of malaria images depends directly on the minimum and maximum values that will be used during the contrast stretching process. Here, new contrast enhancement techniques namely, modified global contrast stretching (MGCS) and modified linear contrast stretching (MLCS) have been proposed. Both techniques include a step to determine the new minimum and maximum values, which are beyond the original minimum and maximum values for each of the RGB components in the image. The modified global and modified linear contrast stretching techniques are similar to the minimum-maximum global and linear contrast stretching, except that these techniques use specified minimum and maximum values that lie in a certain percentage of pixels from the total number of pixels in the image.
In order to obtain the new minimum and maximum values for each of the RGB components in the image for both MGCS and MLCS techniques, several parameters are required during the calculation process. These include the value for minimum percentage, min p , maximum percentage, max p , number of pixels in each pixel level, Tpix, total number of pixels that lie in a specified minimum percentage, T min, and total number of pixels that lie in a specified maximum percentage, T max. The procedures to develop the proposed MGCS and MLCS techniques are as follows.
(1) Select the desired values for min p and max p .
(2) Initialize T min = 0 and T max = 0. Set the value of k = 0, where k is the current pixel level.
(3) Calculate the histogram for the red component.
(4) Obtain the number of pixels, (5) Check the following condition: T min Total number of pixels in the image (3), set the new minimum value, N min for the red component in the image to the k value that satisfies this condition; else set k = k + 1.
(7) Repeat steps 4 to 6 for the next pixel levels until N min is obtained based on the k value that satisfies (3).
(10) Check the following condition: T max Total number of pixels in the image * 100 ≥ max p . (4) (11) If T max satisfies (4), set the new maximum value, N max for the red component in the image to the k value that satisfies this condition; else set k = k − 1.
(12) Repeat steps 9 to 11 for the next pixel levels until N max is obtained based on the k value that satisfies (4).
(13) Repeat steps 2 to 12 in order to calculate the N min and N max for the green and blue components. (14) Determine the new minimum value between the RGB components, Nmin RGB and the new maximum value between the RGB components, Nmax RGB based on the N min and N max that have been obtained for each of the RGB components.
(15) For MGCS algorithm, substitute min RGB and max RGB in (1) with the Nmin RGB and Nmax RGB that have been obtained based on step 14.
(16) For MLCS algorithm, substitute min and max in (2) with the N min and N max that have been obtained for each of the RGB components.

Quantitative Measure of Contrast Enhancement Tech-
niques. Image quality measure has become crucial for most image processing applications. In general, the measurement of image quality can be divided into two primary ways which are qualitative and quantitative measures. In malaria image, the level of contrast improvement provided by the proposed contrast enhancement techniques is judged by the fact that it should increase the contrast between the target and background regions so that the target is visible against the background as well as keeping the colour structure of the original image. Here, the target is referred to the parasite. Figure 3 shows the original malaria image and its segmented parasite and background regions after performing the manual segmentation. Generally, it is hard to state the level of enhancement by only depending on human visual interpretation. Thus, a quantitative measure of contrast enhancement is required in order to quantify the degree of contrast between these two regions. Based on this argument, a quantitative measure namely, distribution separation measure (DSM) which is based on the probability density function (PDF) of the target and the background regions, before and after enhancement, has been used for the quantitative analysis [21,22]. By using DSM, a measure of separation between these two PDFs would be an indicator of the performance of the proposed contrast enhancement techniques on malaria images. The procedures to apply the quantitative measure of contrast enhancement techniques on malaria images are as follows. :  (4) Calculate the best decision boundary for the enhanced image between the target and background regions based on the following equation [21]: where μ E T , σ E T , μ E B , and σ E B are the mean and standard deviation for each of the RGB components comprising the parasite and background regions for the enhanced image, respectively.
(5) Calculate the value of DSM based on the following equation [21]: A good enhancement technique must provide a DSM value greater than 0. The higher the DSM, the better separation between the distributions. Hence, the better is the enhancement technique. If the value of DSM is less than 0, there is no enhancement in the image [21].

Results and Discussions
In this study, the four contrast enhancement techniques namely, global, linear, modified global, and modified linear contrast stretching have been applied on 150 malaria images which consist of the ring, trophozoite, schizont, and gametocyte stages of P. vivax species. In order to access the significance of the enhancement technique on malaria image, the comparison between the original image and enhanced image is needed. For each enhancement technique, the qualities of images are initially evaluated based on human visual interpretation and then further analyzed by using a quantitative measure namely, distribution separation measure.

Qualitative Analysis.
Exposure of a microscope as well as variable smears quality and the conditions of the slides are some factors that may influence the quality of the captured images. In order to assess the proposed work, the captured images with normal, blurred, and underexposure conditions have been processed using the proposed procedure. In addition, the enlargement in terms of size for the infected RBC (red circle) which is one of the main malaria characteristics can easily be seen. Here, there are three different sets of minimum and maximum percentage values that have been used to determine the new minimum and maximum RGB values for contrast stretching process. The first set is min P = 1% and max P = 1%, the second set is min P = 1% and max P = 10%, and the third set is min P = 0.5% and max P = 10%. Here, the first, second, and third sets are named as Set I, Set II, and Set III, respectively. For the Set I, a small number of percentage value which is 1 has been used for both min P and max P in order to access the significance of the proposed MGCS and MLCS techniques on malaria images, compared to the conventional GCS and LCS techniques. Meanwhile, Set II and Set III have used different percentage values for both min P and max P in order to measure the effect of stretching process for the data that lie on the left and right sides of the histogram.  The results obtained after applying the proposed MGCS and MLCS techniques on malaria images are shown in Figures 6(d)-6(f) and Figures 6(g)-6(i), respectively. Based on the resultant malaria images, the images have been simply enhanced by adjusting the minimum and maximum values that lie in a certain percentage of pixels from the total number of pixels in the image. Thus, the contrast of the parasites, infected RBC and background regions has been improved significantly even with the additional of salt-andpepper noise. The performance of the proposed contrast enhancement techniques has also been tested on other malaria images with three different conditions. The images are called Normal Ring, underexposed trophozoite, normal schizont, blurred gametocyte and Underexposed Gametocyte as shown in Figures 7, 8, 9 and 10, respectively.
Based on the resultant images provided by the four contrast enhancement techniques, GCS technique has not produced satisfactory results due to the slight increase of malaria image contrast. This is mainly because pixels with extreme differences in RGB levels tend to be irregularly scatted in the images, while pixels with the similar RGB levels tend to bunch. Thus, the dynamic adjustment range of contrast enhancement is very limited for the GCS technique but not for the LCS technique. Based on the resultant images, both MGCS and MLCS techniques have produced colour images with good image contrast compared to the conventional GCS and LCS techniques. The previous darker background region has become brighter. Thus, the size and form of the parasites, the size of the RBC, as well as the presence of malarial pigment inside the parasite can be easily seen.
By comparing both techniques in terms of contrast performance, it has been found that the contrast of the image provided by MLCS technique is slightly better compared to the MGCS technique, since the human vision is mainly sensitive to the local contrast. The application of MLCS technique will result in obtaining different colour appearance of the image because every pixel in the image has been mapped according to the local features of the image. Based on the colour differences, the appearance of the parasite can easily be distinguished from the RBC and background regions. However, this technique has caused a lot of changes in colour for certain malaria images. Based on the resultant images in Figure 7, the colour of the parasite has been changed to dark purple, while the colour of the RBC region has been changed to green after applying the MLCS technique. As a result, the physical appearances of the parasite, RBC and background regions are totally different from the original image. As for the MGCS technique, the overall appearance of images remains mostly unchanged and the enhancement is achieved within the available dynamic range. The images are simply enhanced by adjusting the minimum and maximum values that lie in a certain percentage of pixels, even though every pixel in the image has been mapped in the same way which is independent from the value of surrounding pixels in the image. As a result of applying the MGCS technique, the malaria image becomes clearer and the colour structure does not become disrupted; hence, it can give detailed information about the image. The analysis of DSM for each contrast enhancement technique has also been conducted using the 150 malaria images that have been captured with normal, blurred, and underexposure conditions from different malaria blood slides. Here, MGCS based on Set II and MLCS based on Set I have been chosen for this analysis because each enhancement technique has produced the highest DSM value as shown in Tables 1 and 2, respectively. Figure 11 graphically illustrates the DSM for the four contrast enhancement techniques that have been applied on 150 malaria images. Based on the axis of malaria images, images 1 till 50 are the ranges for normal image, images 51 till 100 are the ranges for underexposed image, while images 101 till 150 are the ranges for blurred image. The DSMs for the four contrast enhancement based on normal, underexposed, blurred and overall malaria images have also been tabulated in Table 3.
By referring to Figures 11(a)-11(c), there are separations of DSM values that can be seen between the four contrast enhancement techniques. Based on the results in Table 3,     Table 3, normal image has produced the highest DSM value, followed by the results provided by the underexposed and blurred images. Overall, based on the high values of DSM that have been obtained, both MGCS and MLCS techniques have provided good contrast performance compared to the conventional GCS and LCS techniques. These results are strongly supported by the qualitative findings provided in Section 4.1.

Conclusions
In this paper, the results of applying the four contrast enhancement techniques namely global, linear, modified global, and modified linear contrast stretching have been presented. Through the experiments using 150 malaria images, the results produced by these four techniques are acceptable in terms of visual quality. The difference between global and linear contrast stretching is the intensity distribution of the image being enhanced. Overall, the proposed MGCS and MLCS techniques have been shown to be good for enhancing the contrast and brightness of the image compared to the conventional GCS and LCS techniques. This statement is strongly supported based on  both qualitative and quantitative findings. Here, the MLCS technique has proven to be the best with DSM for the average RGB components of 67.17. This is followed by the MGCS, LCS, and GCS techniques with DSM for the average RGB components of 56.27, 35.38 and 24.20. Based on the qualitative findings provided in Section 4.1, the contrast of the malaria images that have been captured with normal, blurred, and underexposure conditions from different malaria blood slides has been successfully enhanced. As for the noisy image, it has been shown that both GCS and LCS techniques failed to provide the enhanced image if either the minimum value = 0 or maximum value = 255 has been used during the contrast stretching process. However, the proposed MGCS and MLCS techniques manage to overcome this problem by adjusting the minimum and maximum values that lie in a certain percentage of pixels in the image. By comparing the DSM for the proposed contrast enhancement techniques, it has been proven that the contrast of the image provided by MLCS technique is better compared to the MGCS technique. However, the MGCS technique has also shown to be good in enhancing the contrast of the image by keeping the colour structure of the original image, hence it can preserve as much information as the original. Thus, the results significantly demonstrate the suitability of the proposed contrast enhancement techniques in increasing the contrast of the parasites and the infected RBC so that the resultant images would become useful to microbiologists for further analysis of the various stages and species of malaria.