Live and dead cells counting from microscopic trypan blue staining images using thresholding and morphological operation techniques

Received Jun 4, 2018 Revised Mar 15, 2019 Accepted Mar 22, 2019 Cell counting is a required procedure in biomedical experiments and drug testing. Manual cell counting performed with a hemocytometer is time consuming and individual dependence. This study reported the development of a computer-assisted program for trypan blue stained-cell counting using digital image analysis. Images of trypan blue-stained breast cancer cells line were obtained by a microscope with a digital camera. Undesired noise and debris were removed by applying a guided image filter. Color space HSV (Hue, Saturation and Value) conversion and grayscale conversion were performed for distinguishing between live and dead cells. Image thresholding and morphological operators were applied for image segmentation. Live and dead cells were counted after image segmentation and the results were compared with manual counting by three wellexperienced counters. The computer-assisted cell counting from thirty-six trypan blue-stained microscopic images had a high correlation coefficient with the live cell results of the experts (r=0.99). The correlation coefficient of the number of dead cells comparing the computer-assisted count and the experts’ count was 0.74. Our approach offers high accuracy (>85%) on counting live cells compared with the experts’ counting. This automated cell counting approach can assist biomedical researchers for both live and dead cells counting.


INTRODUCTION
In cancer drug discovery researches, many aspects of novel drug treatments on cancer cells have been studied, including morphological and cellular structure changes and drug response [1][2][3]. One simple investigation to evaluate the efficacy of cancer drug treatments is the identification of apoptotic cells and live cells [4]. Apoptosis is a programmable cell death, which can be categorically observed from cell morphological changes. Counting viable cells or live cells per total cells after in vitro drug treatment is a common task for biologists and biomedical researchers when they evaluate the efficacy. Manual cell counting by a biomedical expert with a tally counter is a conventional method but the counting result is an individual dependence, and it is tedious and time-consuming. To overcome the drawbacks of manual cell counting, several software packages such as ImageJ, Fiji, CellProfilerTM, CellC, Image-Pro Plus and MetaMorph®, have developed plugins for cell analysis and cell counting [5][6][7][8][9][10][11]. Computer-assisted cell counting using image processing and analysis has been continuously developed and improved to provide the requirements of high reliability, specificity and sensitivity for different cell types and test protocols. For example, Sui et al. [12] developed a cell counting method for host cells in a bright field for insect cells by using a nonlinear transformed sliding band filter. They obtained a low error rate and a high accuracy when comparing their method with a manual counting. A cell counting method for white blood cells was developed using Matlab to evaluate hematic pathologies in terms of numbers, sizes and types of white blood cells [13]. They applied image enhancement and image segmentation as preprocessing steps and used a neural network for classification. Piccinini et al. [14] used a fully automated mosaicing method to improve the reliability and reproducibility of live and dead cell counting. Mouelhi and colleagues [15] also described automatic image segmentation with active contour for stained nuclei in breast cancer tissue which could segment touching nuclei to get the total number of breast cancer nuclei.
The quality of light microscopy digital images taken from hemocytometry significantly influences visual analysis, including cell counting. Therefore, most light microscopy digital images need to undergo a pre-processing step before cell segmentation is performed. Noise filtering is one of the pre-processing steps in every digital image processing technique. A median filter is a popular noise filter which is used to remove salt and pepper noise in digital images [16][17][18][19] . It has been reported that impulse noise in high-density noisy images can be effectively removed by using an improved algorithm such as a decision based adaptive neighborhood median filter [20]. Mahmood and Mansor [21] used a morphological tool with the Hough transform technique to detect and estimate the number of red blood cells in blood sample images. Liew et al. [22] applied image processing methods to develop a prototype for a cell detection algorithm using circular Hough transform to detect the number of cells in bee combs from digital images. Although there are many methods for cell detection and cell counting, computer-assisted cell counting methods are still being developed to improve the counting accuracy and to match with new applications. Furthermore, there is few automated counting software for trypan blue stained cells in biomedical research.
In this paper, we developed an automated counting approach for trypan blue-stained cells which is based on simple digital image processing techniques including image noise reduction, image enhancement, image segmentation and image morphological operations. To evaluate the effectiveness of our approach, both live and dead cells were quantified using this proposed method and compared with manual counting by three well-experienced counters and ImageJ, opensource software.

RESEARCH METHOD 2.1. Sample preparation and image acquisition
A human breast cancer cell line (MDA-MB-231) purchased from the American Type Culture Collection (ATCC, Canada) was used as an example in this study. An overview of the study procedure is shown in Figure 1. The sample preparation generally followed the procedure of Piccinini et al. [14]. In brief, the cells were detached from the flask by short exposure to trypsin/EDTA, washed in the culture media by centrifugation and re-suspended in 5 mL of fresh medium. After trypsinization, the cells were stained with trypan blue solution and then 20 µL of this mixture was placed in a hemocytometer counting chamber. Images of the stained cells were obtained by an inverted Olympus IX51 microscope equipped with a digital Olympus DP72 camera with 2/3-inch CCD. The images were acquired in the bright field by using Olympus UPLanFL N 10x0.13 as standard objective lens. An example of digital trypan blue-stained cell images is shown in Figure 2. The images were cropped to a 16-square grid and then image processing analysis was performed as shown in the cell counting approach flowchart as presented in Figure 3.

Image filtering
In our study, there are piles of debris (dark spots) in trypan blue-stained microscopic images from the hemocytometer which can cause cell artifacts as shown in Figure 2. We applied a guided image filter that spatially distributed the filtering strengths with low-level features to the image to smooth and remove the small debris from background including maintaining the edge features of image and introducing less artifacts [23,24]. The filtering process needs constraints from the input p to determine the linear coefficients (ak, bk). The filtering output q is a linear transform of the guidance I in a window k centered at the pixel k since the input p needs to subtract some unwanted components n such as noise/textures as follows: Furthermore, the neighborhood size around each pixel as a scalar or two-element vector, [M, N] was 30 to remove small debris in the background.

Color space and grayscale conversion
In our study, we converted a color space of the trypan blue stained images which was originally RGB images by applying HSV (Hue Saturation and Value) color space. The HSV color space is quite similar to the way in which humans perceive color and more suitable for image segmentation and analysis than the RGB model. The HSV converted images were then used to perform live cells segmentation. Furthermore, the original RGB images were also converted to grayscale for dead cells detection.

Image segmentation
The segmentation step is very crucial because the accuracy of the subsequent processes mainly depends on the correct segmentation. Prior to image segmentation, the brightness of a HSV converted image is adjusted for getting the better contrast. Our approach utilized Otsu's thresholding method to extract foreground (live cells) from the background and to turn the image to black and white [25]. As our trypan blue-stained microscopic images still contained counterfeit structures in the nuclei, however, which caused difficulty for extraction and segmentation. To eliminate this drawback, two operations based on 2463 morphological reconstruction were used: opening and dilation. The first operation removes the disconnected bright objects that are smaller than the structuring element [26]. Similarly, the second one removes the disconnected dark objects smaller than the structuring element. A disk-shaped structuring element with radius "n" was assigned in the algorithm. The amount of detail presented in the image depends on the size of the structuring element with radius "n". Furthermore, we applied the effective threshold value from the histogram of a grayscale image to obtain only dead cells in the black and white image.

Cell counting
The process of counting the cells was achieved by applying the labeling technique to the binary images after thresholding to distinguish objects from the background and then we measured the geometric properties using a centroid and a boundary to select live and dead cells from labeled regions. Furthermore, the counting results by our approach were compared to the manual counting by three experts as well as comparing to automatic cell counting with ImageJ using CellCountingMacro2-v1.01.ijm (opensource software).

RESULTS AND DISCUSSION
The testing was carried out using thirty six trypan blue-stained microscopic images. The debris in the images was removed after applying an image-guided filter as shown in Figure 4. As we performed color space conversion, the images based on HSV channels are shown in Figure 5. It can be seen that the image with the saturation channel as shown in Figure 5b gave a better contrast of live cells as compared to other channels. Then after brightness adjustment, the live cells became clearly extracted from the background as shown in Figure 6. As we used Otsu's thresholding to segment the live cells from the background and the nuclei of live cells were opened and dilated after the thresholding, the result of segmentation step for live cell is demonstrated in Figure 7a. The image segmentation of dead cells after using the histogram thresholding is presented in Figure 7b. After the image segmentation, the image was processed with the counting algorithm to identify and count both live and dead cells. The final images showing the live and dead cells identification are respectively presented in Figure 8 and Figure 9. The live cells are marked with yellow circles while the dead cells are marked as blue circles. As shown in Figure 8, it was noticed that some live cells could not be detected and counted due to their nondistinctive nuclei. Figure 10 shows the plot of the number of live and dead cells counted by our approach against the averaged results from manual counting. Our approach provided a very similar counting result of live cells to the experts' counting result with a high correlation coefficient (r=0.99) whereas a correlation coefficient in case of the dead cells counting is 0.74. In comparison with the experts, the accuracy percentages of cell counting from 36 images were determined. We obtained 83±6% and 63±10% for the average accuracy of live cell counting and dead cell counting respectively. We also calculated the average time consumption per image from each expert and our approach as illustrated in Figure 11. Our approach consumed shorter time than manual counting by experts. It is clearly noticed that there is a variation in counting time among the experts. Furthermore, Figure 12 demonstrates the average number of live and total cells from manual, ImageJ and proposed approach. It shows that our proposed approach had the average number of live cells slightly higher than manual counting and it was better than the ImageJ using CellCountingMacro2-v1.01.ijm. In addition, our approach could detect the dead cells whereas ImageJ with CellCountingMacro2-plugin could not do that.
We showed that the guided image filtering provided smooth edge maintenance to our objects, leading to a better quality input image for our approach [24]. As our results, the accuracy of live cells counting, for each image, was very high (>83%) due to the good contrast between foreground and background after preprocessing with the image noise reduction using a guided image filter and a saturated channel [27]. We experienced a similar high accuracy of live cells counting using similar sample images in our previous work using a K-mean clustering technique [28]. However, this new simple method provided a higher accuracy. With this approach, the brightness of live cells is clearly different from the image background, which is a distinct advantage for image thresholding for live cells detection. Piccinini and colleagues [14] presented a high accuracy of live cells counting using an automated image mosaicing technique for A549 and KKP cell lines. The high accuracy of live cell counting in both their results and ours particularly relates to the clearly distinguishable shape of live cells and a good background contrast. However, some images we could not completely detect all live cells because there was neither structure in nucleus nor smaller structure than our values of structuring element's radius in nucleus. This caused some images got an accuracy less than 90%. Furthermore, our approach did not require manual thresholding adjustment therefore it reduced time consuming.  Our approach provided less number of dead cells compared to manual counting by the experts. This might have been caused by the ineffectiveness of dead cell segmentation. It should be noted that segmentation results depend on the quality of preparation and the coloring of trypan blue-stained microscopic images. Overstraining and poor digitization can adversely affect segmentation results [29]. These quandaries infrequently occur and can be remedied with a more rigorous quality control during the sample preparation and image acquisition. Moreover, dead cells from apoptosis presented in fragments can lead to over counting [30]. Therefore, the counting of dead cells still has erroneous results much more than live cells counting. For example, the approach using automated image mosaicking had false positive results on dead cell counting compared to the experts much more than the live cells counting [14]. It remains a challenge to improve the accuracy of dead cells counting by improving either image noise reduction or image segmentation as well as counting logic for fragmented dead cell.
Comparing the results of cell counting between our approach and ImageJ with automatic cell counting plugin, our approach could give the number of both live cells and dead cells whereas ImageJ could detect only live cells. This indicates that the ImageJ plugin for automatic cell counting does not serve our trypan blue stained images and requirements. It seems ImageJ could automatically count cells with good contrast between cells and background therefore dead cells in our images are quite difficult to be detected. It might be necessary to do an image preprocessing for our images before analyzing with ImageJ. On the other hand, our approach already included the image preprocessing such as noise filtering and contrast enhancement to improve the image quality in the algorithm.
This study was based on only 36 trypan blue-stained images from one cell line which could limit the generalization of the results for other cell lines. Furthermore, there were several limitations which affected the counting accuracy. For example, we assumed that the cell diameters in all images were about the same size, while in fact the dead cells in our study had various diameters, especially when the cells counted by our approach was greater than the results counted by the experts. The quality of image also affects our counting such as the brightness of the image background. Furthermore, low contrast can influence the image segmentation and lead to lower accuracy of cell counting. As our trypan blue-stained microscopic images have a dark background, the color of the dead cells is quite similar to the background, which requires several trials for dead cells segmentation. Moreover, we applied a mean threshold value based on 36 images for dead cells segmentation, thus it is necessary to recalculate the mean threshold value if the number of images or image background is changed. In addition, employing a large structuring element can oversimplify the image, while using too small a structuring element does not always produce desirable results as many of the substructures within the large nuclei remain, affecting the segmentation performance. Therefore, optimum parameters should be determined such as threshold value and radius of structuring element.

CONCLUSION
In this study, we present a computer-assisted cell counting approach on trypan blue-stained microscopic images of a breast cancer cell line. The results of cell counting from the trypan blue-stained microscopic images using our approach achieved a remarkable accuracy compared to three experts, especially in counting the number of live cells. Our simple method could identify overlapping cells and count them correctly. This automated counting approach is beneficial to biologists and biomedical researchers.