{'fraction_non_alphanumeric': 0.027376546894274004, 'fraction_numerical': 0.008475587919302852, 'mean_word_length': 4.9315553457635115, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Novel Method for Effective Cell Segmentation and Tracking in Phase Contrast Microscopic Images

Cell migration plays an important role in the identification of various diseases and physiological phenomena in living organisms, such as cancer metastasis, nerve development, immune function, wound healing, and embryo formulation and development. The study of cell migration with a real-time microscope generally takes several hours and involves analysis of the movement characteristics by tracking the positions of cells at each time interval in the images of the observed cells. Morphological analysis considers the shapes of the cells, and a phase contrast microscope is used to observe the shape clearly. Therefore, we developed a segmentation and tracking method to perform a kinetic analysis by considering the morphological transformation of cells. The main features of the algorithm are noise reduction using a block-matching 3D filtering method, k-means clustering to mitigate the halo signal that interferes with cell segmentation, and the detection of cell boundaries via active contours, which is an excellent way to detect boundaries. The reliability of the algorithm developed in this study was verified using a comparison with the manual tracking results. In addition, the segmentation results were compared to our method with unsupervised state-of-the-art methods to verify the proposed segmentation process. As a result of the study, the proposed method had a lower error of less than 40% compared to the conventional active contour method.


Introduction
Cellular dynamics are important with respect to many biological processes that directly affect human health [1]. Cell migration is a basic cell function that is the source of cell life and plays a fundamental role in various diseases [2] and physiological phenomena, such as cancer metastasis, nerve development, immune function, wound healing, and embryo formulation [3]. Thus, analysis of the migration characteristics and motility of cells is essential for physiological and pathological research [4][5][6]. Analysis of the migration characteristics of metastatic cancer cells is essential for detecting the deterioration of cancer cells, and as a basic study, an analysis of the individual motility of each cell is being conducted [7]. In the case of immune cells, studies on the effectiveness of antigen targeting and the individual motility of cells to enhance the effectiveness are being conducted [8]. These eukaryotic cells have different motor forms and properties, and although they are affected by different types of extracellular matrixes, the types of feet that the cells use to exercise, such as the pseudopodium, characterize their basic motility [9]. The study of these cell migration characteristics is generally conducted through probabilistic model analyses, such as persistent random walk and levy walk, by tracking the positions of cells at each interval in the images of the observed cells after several hours of taking a picture with a real-time microscope [7,10]. Although cell tracking is an effective method for quantitative analysis of cell migration characteristics, this requires a lot of effort and cost. Therefore, many studies have been conducted on automatic cell tracking methods [11][12][13].
Recently, research has been conducted on the analysis of migration characteristics based on the morphological transformation of cells [14]. When cells migrate, they move through the pseudopodium and lamellipodia, where the shapes of the cells change in various ways, and studies are being conducted to predict mobility through the probabilistic calculation of the direction or shape in which they extend [7,15]. Thus, an important goal is to change the dynamic properties of cells, for example, by suppressing the motility of parasites. In addition, morphological changes in cells play an important role in the phagocytosis of immune cells in the antigen or host cells by parasites in the "immune synapses" [16]. To proceed with these studies, it is necessary to observe the shape of a cell precisely. Additionally, these depend on accurate information about the cell positions, requiring computational shape segmentation and tracking methods. Moreover, manual segmentation or tracking is avoided because these studies analyze a large number of cell images and require a high level of precision. Since manual segmentation is subjective, errors can occur, especially when analyzing cell movement characteristics at short intervals, resulting in relatively large errors.
To perform a kinetic analysis considering the morphological transformation of cells, it is necessary to detect and consider all the pseudopodium, podosomes, etc., to determine the shape of the entire cell. A microscope is needed to observe these structures, and phase contrast microscopes can be used to visualize a particular structure (such as a filament) [17]. Thin, transparent areas, such as the pseudopodium, can be observed more clearly [18]. Therefore, phase-contrast microscopic images are utilized in many cell migration studies because they are easy to analyze using images [19].
However, in phase contrast microscopy, a favorable high contrast at the cell boundary leads to problems, such as halo patterns, which can complicate cell segmentation [20]. While segmentation techniques are becoming increasingly common in the field of fluorescence microscopy, less accurate and robust methods have been developed for segmenting in phase-contrast images. Several methods have been developed for detecting and counting or tracking cells in a phase contrast image, but the focus has not been on detecting the shapes of cells [21][22][23][24][25][26][27][28][29]. In particular, there are not many studies that have conducted precise segmentation considering halo effects and it is rare to fundamentally eliminate the halo effect itself [30][31][32][33]. State-of-the-art techniques include deep learning-based supervised learning methods that are learned with correct answers and unsupervised methods using threshold values. Since our task is an unsupervised learning method, we compare the Empirical Gradient Threshold [29] (EGT) method using image histogram and the phase contrast microscopy segmentation toolbox [33] (PHANTAST) method using local contrast thresholding and halo effect removal with the proposed method.
It is necessary to obtain a boundary to detect the shape of an object in an image. Several segmentation methods, including active contour, which is a precise high-performance technique, have been recently employed. In addition to the cell detection, the active contour method is widely used as a method for detecting objects in various fields such as skin disease detection, tumor detection, heart detection, etc. [34,35]. In our study, the active contour model was adopted to precisely segment and detect the boundary of cells. However, since the active contour method requires an initial point for each object, it is difficult to implement when the number of cells is large. Therefore, we are limited to single cell research.
When an active contour method is applied to phase contrast microscopic images, it is difficult to distinguish between the cell boundaries and the halo. The contrast varies depending on the thickness or substance of the boundary in a cell, which makes the halo effect less constant [36]. Because of this, non-uniform results are obtained while calculating the energy value of the boundary required by the active contour. Therefore, this study proposes a novel method to eliminate the halo effect itself to solve this halo effect. Using the K-means clustering method, which is a machine learning (ML) method that is mathematically simple and rapidly calculated and converged and can be easily implemented [37], only the halo effect is extracted and removed. By eliminating halo effects, the active contour model, which guarantees excellent performance for precise segmentation, but was difficult to use due to its dependence on initial value, was easily available and precise segmentation was performed. The K-means clustering method is particularly widely used for classification purposes in data statistics and analysis studies, and also for image segmentation purposes such as cell nucleus extraction and white blood cells extraction in imaging fields [38]. It is mainly used for the purpose of obtaining a desired target, but our study shows a new applicability in that it was used as a pre-processing method to remove specific problem phenomena.
In summary, the contributions of our proposed work are as follows: 1. An active contour model showing strong performance in shape detection was used for acquiring the shape of the cell in a phase contrast microscope.

2.
Since the halo effect that occurs in the phase contrast microscope interferes with the precise segmentation of the cell shape, we propose a solution to remove it. 3.
The conventional methods have performed the segmentation for the cell boundary through various complex image processing techniques that distinguish between the halo effect and the cell boundary. In this work, we propose a novel method that uses the ML technique K-means clustering method to separate and correct halo effects from the background signals and cell boundaries, eliminating the basic problem cause itself after denoising. 4.
The method of this study, which performed segmentation by removing the halo effect, was verified by comparing two methods, the method performed by the manual method, which is a basic method and is used a ground truth for the proposed method, and the method performed by segmentation without removing the halo effect.

5.
The results ensure the novelty and reliability of the method proposed in this study.
In the following chapters, we described the process through which the shapes of cells can be accurately detected. First, the noise in the microscope image is removed, and background correction is utilized to mitigate the halo signal. Second, the shape of the cell is detected using the active contour method, followed by the center of mass. Based on the manual tracking results, we compared the tracking results of the images where the halo signal was not removed with those where it was removed and verify the reliability of the algorithms developed in this study. Furthermore, we verified the effectiveness of segmentation through comparisons with other state-of-the-art techniques. Finally, the paper concludes with future works.
After attaching the Jurkat cells to a 60∅ dish coated with fibronectin human plasma (Sigma, St. Louis, Missouri, USA) at 20 µg/mL, the camera started capturing it after 30 min of stabilization. A confluency of 2% was used to ensure a sufficient distance between cells. Before stabilizing the cell, a live cell microscopic device (OKOLAB, Ottaviano, NA, Italy) was employed for sufficient heating of the device. A Nikon TE1000 microscope with a 10× phase contrast microscope (Nikon, Minato-ku, Tokyo, Japan) was utilized for image cell migration using a charge-coupled device camera. Images were taken every 2 min for 4 h, and we used the perfect focus system in the microscope to avoid the defocus problem from long-lasting capture.

Image Acquisition and Processing
Image processing algorithms were implemented using the MATLAB and Image Processing Toolbox Release 2019b. Multiple cell images, taken using phase-contrast microscopes, were saved by cropping each individual cell. A tracking process was conducted for each cell. The entire pipeline, i.e., the process of cropping an image from the entire image to each cell described earlier, is presented in Figure 1.

Denoising
In microscopic images, noise can be modeled mainly as a Poisson and Gaussian distribution. Gaussian noise can be modeled as an additive and an independent form in the images, whereas Poisson noise can be modeled as a multiplicative and image-dependent form, which is difficult to handle. To eliminate these noises, three steps were performed.
The first step is noise estimation, which estimates the variance of Gaussian noise and Poisson noise [39]. In the noise estimation step, the image is divided into several patches, and each patch's noise component and variance are calculated locally. By fitting this result to the estimated value of the noise component of the original image, the total noise component can be estimated. The following step is an Anscombe transformation [40] step, which is a variance-stabilizing transformation. Through the Anscombe transformation, the variance of the Poisson noise is fixed at a constant value, such as the variance of Gaussian noise. Therefore, scanning transmission electron microscopy images can be modeled to have Gaussian noise only. The final step is block matching 3D (BM3D) filtering, an effective denoising method for Gaussian noise [41]. Figure 2 presents a flowchart of BM3D filtering. BM3D filtering consists of two main stages. The first stage is to organize images into blocks, group them into a 3D formation, and co-filter them to create images for use in the second stage. The distance between the blocks is calculated, and blocks smaller than a certain thresholding value are set to similar blocks. The distance between the blocks can be calculated as follows: where · 2 is the l 2 − norm, B x R is the reference block for x R ∈ X, B x is the block for x ∈ X, and N ht 1 indicates the length of the image. If Z x R and Z x do not overlap, this distance can be expressed as a chi-squared random variable. The expected values and variance of the distance are expressed as follows: However, the probability densities of other Dist noisy (B x R , B x ) are likely to be severely overlapped by a relatively large sigma or small N. To solve this problem, coarse prefiltering is used to measure the distance between two blocks. Coarse prefiltering involves the application of a normalized 2D linear transformation to the blocks and hard thresholding of the obtained coefficient values. The applied distance expression is as follows: where γ is a hard thresholding operator, and T ht 2D is a normalized 2D linear transformation. The results, grouped into block matching, are expressed as a set containing blocks similar to B x R as follows: To construct the N ht was performed in the 3D transformation area. The formula is expressed as follows: where T ht 3D is a 3D transformation, T ht 3D −1 is an inverse 3D transformation, andŶ ht x R is a co-filtered group estimate.
In aggregation, which is the last step of the first stage, the basic estimate of the actual image is calculated using a weighted analysis of all the overlapped block unit estimates. The weight values for the group estimates are as follows: where N x R ht is the number of non-zero coefficients after hard thresholding. The overall basic estimate,ŷ basic , is available as the weighted average of the block-unit estimate.ŷ where κ x m : X → {0, 1} is the characteristic function of the square support in blocks located at x m ∈ X.
In the second stage, improved grouping and co-Wiener filtering were performed using the basic estimates obtained in the first stage. Because the noise inŷ basic is assumed to be significantly reduced, the distance is replaced by the square of the normalized l 2 − norm calculated within the underlying estimate. The block set for co-Wiener filtering is calculated as follows: where set S wien x R is used to divideŶ basic S wien . Subsequently, the inverse transform, T, produces the following group estimates: In step 2, aggregation is performed similarly to step 1, resulting in the final estimate, y f inal . The weight value applied to each x R ∈ X is expressed as follows: Finally,ŷ f inal can be obtained using the weights obtained as follows:

Halo Effect Elimination
Figure 1b depicts the process for removing the halo effect, which has been the focus of this study. Statistical classification of the signal characteristics of each grid is performed using image patch grids that show only the background or categorize the signal characteristics of each grid as a mixture of background and background pixels. Thereafter, the K-means clustering method [42] was employed to classify a given set of data using a predetermined number of clusters to estimate the background signal and correct the halo signal as a background signal. The detailed process is illustrated in Figure 3. The image array, I(x,t), of 255 bits is divided by the sub-image 'tile', as shown in Figure 3b. The intensity distribution of the tiles differs between the signal and the background. These tiles are divided using statistical classification and returned to two clusters using the K-means clustering method. As shown in Figure 3c, background tiles are collected in low-density volumes because they are almost identical in statistical distribution. The mean intensity of the tiles that are classified as belonging to the background is defined as the background image, B(x,t), and the original image, I(x,t), is divided by B(x,t). Steps (d) and (e) in Figure 3 are shown in Figure 4. In I(x,t) and B(x,t),the signal corresponding to the cell in I(x,t) is smaller than 1 and closer to 0 because the signal that corresponds to the cell in I(x,t) is smaller than B(x,t). The signal corresponding to the halo of I(x,t) has a value greater than B(x,t); hence, it is divided by a value greater than 1, and a value greater than 1 is specified as a signal similar to the background signal. When this result is imaged, as shown in Figure 3e, the background and image of the cell morphology with the halo effect removed are derived.

Edge Detection of Cells
As shown in Figure 1c, an active contour method was used to detect the shape of a cell in the image that had been removed from the halo effect. Localizing region-based active contour [43] was applied to develop the method devised by Chan-Vese [44]. The total governance formula can be expressed as follows: The Chan-Vese method is simplified into a stair function in the Mumford-Shah [45] method, and the level set method is applied. C 1 and C 2 are the mean values of intensity inside and outside and are defined by formula (15). As shown in Equation (16), the active contour finds that the energy is minimal, which is the boundary of an object.
In the Chan-Vese method, the method developed based on the localized region is expressed as follows: As the active contour converges, it is calculated by considering only the regions within the r range at the initial mask image boundary as a function of B(x,y). In Figure 1d, the mass center was calculated by considering all of the calculated cell boundary coordinates to the internal coordinates, and this was taken as the center point of the cell. If the center points of the cell images are crossed over time, the path of cell movement can be identified, as shown in Figure 1e. This process is automatically performed in one parameter setting.

Results and Discussion
After obtaining microscopic images, we performed denoising, halo effect removal, and segmentation for tracking the cells with the MATLAB program according to the algorithmic flow chart described in Figure 1. First, we verified the effectiveness of denoising and halo effect removal. Second, we validated how the denoising and halo effect removal, which were performed earlier, affect segmentation. Finally, the proposed method, manual tracking, and active contour method without the halo effect removal were compared to analyze the cell migration. Figure 5 presents the denoising results obtained when Poisson-Gaussian noise is removed using the block matching 3D method and the halo effect removal results. Figure 5a shows an original phase contrast microscopic image for analyzing cell migration, and Figure 5b presents the denoising results. Whereas the original image presented some noises, the denoised image exhibited noise reduction. However, we note that the halo effect still remained. Therefore, we performed additional halo effect removal. Figure 5c,d present the halo effect removal results with denoising and without denoising to validate the effectiveness of the denoising process. After preprocessing, we performed segmentation to track the cells. Figure 6 presents the segmentation results compared to other methods. The active contour, EGT, and PHAN-TAST methods and the proposed methods were used for comparison. All parameters were adjusted to the manual based on the default value. The Figure 6a column shows the original phase contrast microscopic image that has long pseudopodium with noise and halo effect. The segmentation results using the active contour method are shown in Figure 6b. The active contour method could not properly segment the cells with pseudopodium affected by the halo effect. The Figure 6c,d columns present the results of EGT and PHANTAST method. The EGT method roughly segmented the pseudopodium, but due to the halo effect, the cell contours were not properly segmented. Although the PHANTAST method lowered the halo effect, some errors still remain around the cell contour. Moreover, PHAN-TAST method contains various parameters so that it is hard to optimize the performance. By contrast, the proposed method significantly reduced the halo effect and segmented the cell contours precisely including pseudopodium (see the Figure 6e column).  Figure 7 presents the trajectories obtained as the result of tracking the center points of the cells calculated from the detected results. Manual tracking results (blue line) using ImageJ, which were obtained by drawing along the border of the cells with direct hands and calculating the center of mass, were compared with the results of tracking without removing the halo effect (green line) and the methods applied in this study (red line). We observe that the green line has a greater difference from the blue line than the red line. The results of the comparison of the coordinate values of the trajectories are presented in Table 1. Cell tracking was performed in five cells. A is the difference between the results of manual tracking and the proposed method in the coordinate data at each time step location, and B is the difference between the results of manual tracking and the results of the active contour method only. The average and maximum values of A and B are compared. For the case of the average value of the errors, the result of A exhibited less than 0.5 pixels precision from 0.25 to 0.45 pixels, and B exhibited less precision than A from 0.32 to 0.83 pixels. For the maximum value of the difference, A is from 1.13 pixels to 2.68 pixels and B is from 1.15 pixels to 4.49 pixels. Further, we compared a variance of A and B. The variance of A ranges from 0.04 to 0.17, and the variance of B ranges from 0.06 to 0.39. Using active contour only yields a greater difference from the results of manual tracking, and the results of the proposed method were more accurate.

Conclusions
In this paper, we present an effective cell segmentation and tracking method for phase-contrast microscopic images. Segmentation and tracking are designed to alleviate noise and halo effects, which are problematic for segmentation using active contours in phase-contrast microscopic images. In the phase-contrast microscopic image, noise was modeled as a Poisson and Gaussian distributions. Therefore, to reduce these noises, noise estimation, Anscombe transform, and BM3D were performed. Additionally, we performed the background correction by solving the hallo effect problem through k-means clustering, a machine learning technique that has strong performance, can be easily implemented and requires less computation. By comparing EGT and PHANTAST, state-of-the-art unsupervised learning methods with the proposed method, we confirmed that our method segments cells effectively considering the pseudopodium. Furthermore, we confirmed that the comparison with manual tracking allows the detection of more accurate boundaries; moreover, we verified the reliability of the algorithm developed in this study. The proposed method outperforms the manual method of directly obtaining cell shapes in terms of time cost of segmentation, and is also highly applicable because it performs with simple algorithms although it is excellent and is performed automatically. It is expected that the cell shape can be accurately detected and utilized for analysis of the motility of the cell considering the shape, rather than analysis via simple location tracking. In addition, the halo effect removal algorithm presented in this study can be employed for cell counting or morphology in phase-contrast microscopic images.
However, in this study, there is a limitation that it is applied only to a single cell, and if there is a circular object, it is difficult to segment it well since the initial point is located by the circular detection algorithm. In a future study, we will apply the algorithm developed in this study to cell images of various types and shapes to optimize them so that they can be used more diversely and generally.