BACKGROUND
imaging of cells in biology are becoming more and more popular with the fast development of microscopy and nanotechnology .
in different applications, different ways had been utilized to separate the imaged cells and they usually took the researchers great effort.
as a powerful tool, the image processing technology is becoming more and more important for the segmentation, quantification and analysis of microscopy data  <cit> .
in different applications, the forms, the dimensions of the cells and their gray-level distributions vary significantly, which makes the segmentation task challenging.
in many applications, the cells are frequently neighboring or overlapping on each other, which makes the quantification difficult.
in this paper, we propose a generalized framework for robust segmentation and quantification of different types of cells imaged in different biological applications.
in the past decades, image processing technology has been utilized widely in segmenting and quantifying different types of cells.
the absence of a generalized framework for different types of cell images makes the research work application specific instead of convergent to a common solution.
different methods were proposed and claimed to be superior in segmenting a class of cells.
these methods include watershed method , region growing based method  <cit> , morphological method  <cit> , clustering based method  <cit> , contour based method  <cit> , multilayer segmentation based method  <cit> , pattern modeling based method  <cit> , supervised learning method  <cit> , morphological watershed based method  <cit> , inference based method  <cit>  and methods that combine the threshold selection and morphology techniques .
however, the performance and applicability of most of these methods are very limited because they are diverging rather than convergent to a generalized solution to address so many types of cells.
to overcome this drawback, the author has proposed a new approach to segment and quantify different types of cells or nanoparticles based on the general property of the cell images: global intensity distribution and local gradient  <cit> , which is more versatile than the referenced state of the art methods.
the approach proposed in  <cit>  evolves the method proposed in  <cit>  and makes it to be able to segment and quantify more types of cells or nanoparticles.
one fundamental improvement of  <cit>  compared to  <cit>  is that the threshold selection method used in  <cit>  was improved to be able to segment more types of cells or nanoparticles robustly.
however, the details of how to apply the proposed threshold selection method with practical cell images are not addressed adequately in  <cit> .
in this paper, we design the practical algorithm to apply the threshold selection method proposed in  <cit>  to segment the practical cell images.
in addition, we calibrate more parameters than  <cit>  to guarantee the robust segmentation.
a more important goal of this paper is to propose a generalized framework to segment and quantify different types of cells imaged in different systems with higher accuracy compared to the past work .
to this end, we tested more cell images in addition to the muscle cell images in  <cit> .
some imaged cell images have artifacts or the segmentation results contain too much noise.
consequently, the segmented cells contain shape noises which will increase the number of the eroded seeds by the iterative erosion method proposed in  <cit> , which will affect the final quantification accuracy.
to eliminate these shape noises, we propose a fourier transformation based shape filter and it could decrease the wrong quantification effectively.
in addition to the shape filter, we also propose a blob filter that could remove the line shape noise blobs effectively.
for the muscle cell images  <cit> , two cases are defined in the union method based on the image characteristics.
for the generalized framework to segment more types of cell images, three cases are defined in the union method in this paper.
to verify the advantages of the proposed generalized framework over the past research work , we give both the qualitative results and the quantitative results.
methods
the generalized framework
the proposed framework for segmentation and quantification of the cells is illustrated in fig.
<dig>  in the framework, the content in the ellipse vary depending on the input image to be processed while the content in the rectangle are the proposed algorithms and they remain the same for different types of cells.
the input image denotes the original cell image.
the gradient image is obtained after edge enhancement.
both the input image and the gradient image are segmented by the threshold selection method automatically to get the binarized image and the constraint edge image, respectively.
the segmentation result is obtained by unifying the binarized image and the negative constraint edge image.
the noise blob removing filter is used to eliminate the thread-like or small noise blobs.
the boundary smoothing filter is used to remove the noise contained in the extracted boundary.
the quantification method is used to obtain the quantification result after identifying each cell individually.
except the segmentation method, the union method and the quantification method, all the other methods are optional based on the characteristics of the cells.
for each type of cell, the methods are selected and then applied one by one in the framework and they need to be prepared and calibrated carefully before the framework could segment and quantify the cells automatically.fig.
<dig> flowchart of the proposed framework
the enhancement method
the gradient image is generated by the enhancement method.
in the current framework, we generate the gradient image using the sobel operators.
firstly, the sobel operator is applied to the cell image along the row direction to get the horizontal gradient components, i
x. secondly, the sobel operator is applied to the cell image along the column direction to get the vertical gradient components, i
y. thirdly, the gradient image is formed by the following equation.
<dig> ighj=ix2hj+iy2hj where h =  <dig>  …, h; is the index of the pixel along the column direction and j =  <dig>  …, j; is the index of the pixel along the row direction.
h × j denotes the dimension of the cell image.
the segmentation method
the segmentation method should be flexible and robust enough for a vast variety of cell images.
we tested all the available state of the art segmentation methods  to segment the cell images and the generated gradient images.
unfortunately, we did not find any state of the art segmentation method that could yield adequate accuracy consistently for so many types of cell images.
a more versatile, flexible and generalized image segmentation method has been proposed in  <cit>  to produce acceptable segmentation results consistently for many types of muscle cell images.
however, the histogram modalities of the muscle cell images are similar and so are the modalities of their gradient images, which makes the image segmentation less challenging compared to segmenting more divergent types of cell images.
fortunately, the flexibility of the previously proposed threshold selection method makes it adjustable for different types of images by varying the its parameters.
hence, we introduce the process of calibration in this paper to find the optimal parameters of the threshold selection method for each specific type of cell image.
the previously proposed threshold selection method could be summarized as follows.
the threshold is calculated from the slope difference distribution of the normalized histogram.
the histogram is assumed as gaussian-mixture distributions in this research work.
we define the slope difference distribution of the image as the variation rate of the normalized histogram and it could be computed by the following steps.
step  <dig>  assuming the image is non-negative, the cell image is modified by rearranging its gray-scale values in the interval  <cit>  with the following equation.
<dig> i′hj=255×ihjmaxi;h= <dig> …,h;j= <dig> …,j where h × j is the resolution of the cell image, i. h is the index of the pixel along the vertical direction of the cell image and j is the index of the pixel along the horizontal direction of the cell image.
here,  <dig> is used for convenience because most gray images have the maximum value of  <dig>   <dig> could be changed to other values based on the application requirements.
step  <dig>  the histogram distribution p of the modified cell image, i′ is normalized by the following equations:  <dig> px=m=nmnl;m= <dig> …,255;
<dig> l=argmaxl˜∈0255nl˜ where n
l denotes the maximum frequency that occurs at l in the interval .
n
m denotes the frequency of the pixel value m.
step  <dig>  after the histogram distribution is normalized, it is then filtered in the frequency domain.
firstly, the normalized histogram distribution, p is transformed into the frequency domain with the discrete fourier transformation :  <dig> fk=∑x=0255pxe−i2πkx255;k= <dig> …, <dig>
then, we select the low frequency parts from  <dig> to l and eliminate the rest of high frequency parts with the following equation.
<dig> f′k=fk;k= <dig> ,…,wfk;k=255−w,…, <dig> ;k=w+ <dig> …,255−w− <dig> where w the bandwidth of the low pass dft filter and it is going to be determined by the calibration process.
after the above equation is performed to filter histogram distribution in the frequency domain, we transform the smoothed histogram distribution back into spatial domain by the following equation.
<dig> p′x=1255∑k=0255f′kei2πxk255;x= <dig> …, <dig> where p′ is the filtered and smoothed histogram.
step  <dig>  for each point, i on p′, there are two slopes, a
<dig> and a
<dig>  they are on the left side and the right side of the point, i respectively.
they could be computed by a fitted line model with n adjacent points at each side and the parameter n will also be determined by the calibration process.
the line model is formulated as:  <dig> yi=axi+b
<dig> abt=btb−1bty
<dig> b=x11x21⋮xn⋮ <dig>
<dig> y=y1y2…,ynt
when the n fitting points are on the left side of the point i, the slope a equals a
<dig>  when the n fitting points are on the right side of the point i, the slope a equals a
<dig>  both slopes are computed by eq.
<dig>
accordingly, the slope difference of the point i is computed by the following equation.
<dig> si=a2i−a1i;i=n+ <dig> …,255−n
the continuous version as s is defined as the slope difference distribution.
setting its derivative to zero, we could get the n
v valleys v
i; i =  <dig>  …, n
v with greatest local variations and n
p peaks p
i; i =  <dig>   <dig>  …, n
p with greatest local variations of the slope difference distribution.
not all peaks or valleys are caused by the histogram variations because the smoothing process by the low-pass dft filter might produce small harmonics when significant parts of the original histogram remain the same or close to the horizontal axis.
consequently, these harmonics produce pseudo peaks and valleys.
fortunately, the pseudo peaks or valleys are much smaller compared to the real peaks or valleys.
the real peaks or valleys could be distinguished from the pseudo ones easily based on their magnitudes.
on the other hand, the produced harmonics avoid the possible ill-conditions of the matrix inverse operation in eq.
<dig>  the matrix inverse operation will become ill-conditioned when the n fitting points are from a horizontal line.
the horizontal parts in the histogram are replaced with harmonics after dft filtering.
we demonstrate the slope difference distribution with three synthesized images in fig.
<dig>  the first synthesized image is an image with two objects as shown in fig.
2a.
the grayscale of the background equals  <dig>  the grayscale of the dark object equals  <dig> and the grayscale of the bright object equals  <dig>  its slope distribution is demonstrated in fig.
2d.
the original histogram distribution consists of three isolated peaks.
after dft filtering, the histogram distribution become continuous with small harmonics that produce many small pseudo peaks and valleys.
there are three real peaks and six real valleys and their magnitudes are much greater than those of the pseudo ones.
the peaks and valleys are denoted by the blue crosses and red circles respectively in fig.
2d.
the second image is synthesized by adding gaussian noise to the first synthesized image and it is shown in fig.
2b.
its slope difference distribution is shown in fig.
2e.
as can be seen, its original histogram is continuous with less parts on the horizontal axis.
as a result, less harmonics and less pseudo peaks and valleys are generated.
the third image is synthesized by blurring the second synthesized image with an iterative moving average filter and it is shown in fig.
2c.
its slope difference distribution is shown in fig.
2f.
as can be seen, its original histogram is also continuous.
however, many parts are close to the horizontal axis.
as a result, many pseudo peaks and pseudo valleys occur.
from all these results, it is seen that the real peaks or valleys could be easily distinguished from the pseudo peaks or valleys.
for most practical images, their histograms are usually continuous without significant parts close to the horizontal axis or remain the same, thus no pseudo peaks or valleys will occur.
for the image with known number of pixel classes k
c, the rule to select the peaks is as follows.
firstly, all the peaks are sorted in the magnitude descending order.
secondly, the first k
c peaks are then selected as the real peaks.fig.
<dig> demonstration of slope difference distribution.
a the first synthesized image.
b the second synthesized image.
c the third synthesized image.
d slope difference distribution of first synthesized image.
e slope difference distribution of second synthesized image.
f slope difference distribution of third synthesized image
the slope difference distribution has three fundamental properties that help to design the threshold selection process.
property 1: in situations where the histogram distribution of background and the histogram distribution of the cells are both gaussian distributed, the valley positions between the background and the object on the slope difference distribution change monotonically with the number of the fitted points n in the line model while the peak positions are almost the same when the parameter, n is changed gradually.
in the experiments, we found that this property holds only when the histogram is filtered by the designed filter with the bandwidth parameter w calibrated and chosen properly for each specific type of image.
when we used other filters, for instance, the finite impulse response  filter and the infinite impulse response  filter, both the peaks and the valleys of the slope difference distribution change irregularly.
hence, we conclude that the fourier transformation based filtering is capable of removing the high frequency noises effectively while maintaining the shape of the histogram well.
however, the fir filter and iir filter lack this capability and will change the shape of smoothed histogram undesirably.
consequently, they cause the peaks of the slope difference distribution to change randomly.
property 2: the peaks of the slope difference distribution correspond to the cluster centers of the objects or the background while the valleys correspond to the thresholds that could separate the objects and the background.
property 3: the fitting number n of line model determines the number of the peaks of the slope difference distribution.
a large n value could suppress small peaks and unify adjacent peaks into one peak.
the proposed threshold selection method is flexible and has some changeable manual inputs that could be adjusted to meet different segmentation requirements.
the first manual input defines how many pixel classes the image contains.
the default value of it is  <dig>  which indicates that there are one object class and one background class.
the second manual input defines what classes to segment.
when the user wants to separate the background class and all the objects classes, it is defined as case  <dig>  when the user wants to separate the first object class and the second object class along the pixel increase direction, it is defined as case  <dig>  case  <dig> is defined as the separation between the second object class and the third object class.
in the same way, other cases are defined.
case  <dig> is default case.
the third input is how many points the line model uses to fit the line and the fourth input is the bandwidth of the low pass filter.
to determine the third and fourth inputs for each type of cell images before segmentation, we calibrate the threshold selection method based on the popular f-measure.
for a specific type of cell images, the calibration process is summarized as follows.
for a specific type of cell images, we select several typical images and obtain the ground truth manual segmentation results for these images.
then, we vary the value of the third input, the parameter n in eq.
from  <dig> to  <dig> and the fourth input, the parameter w in eq.
from  <dig> to  <dig>  we compute the f-measure, f
m of the automatic segmentation result by the threshold selection method and the manual segmentation result for each pair parameters  by the following equations.
<dig> fm=2×p×rp+r
<dig> p=ssd∩smsm
<dig> r=ssd∩smssd where s
m is the ground truth manual segmentation and s
sd is the automatic segmentation result by the threshold selection method.
we choose the pair of parameters  that yields the largest f
m.
during segmentation of a great of variety of cell images, it might be inconvenient to obtain the benchmark manual segmentation from the cytologist for each type of cell image.
here, we propose a rational calibration method in the absence of benchmark manual segmentation result based on property  <dig> of the slope difference distribution.
step 1: we determine how many pixel classes the image contains rationally.
here, we give an example of cell image with three pixel classes: the black cell, the gray clutters and the brighter background as shown in fig.
3a.
there are small abrupt parts with pixel values close to  <dig> in the original histogram distribution, which affects the normalization of the histogram and makes most parts of the histogram below  <dig> .
after dft filtering, this bad effect is removed and the normalized histogram becomes much better.fig.
<dig> demonstration of threshold selection by the proposed efficient calibration method.
a the gray image.
b threshold selection process with n =  <dig>  c threshold selection process with n = 31
step 2: we use the default value, n =  <dig> and w =  <dig> to calculate the thresholds visually as shown in fig.
3b.
it is seen that there are  <dig> peaks instead of  <dig> peaks existing in the calculated slope difference distribution.
step 3: we increase the value of n until there are only  <dig> peaks in the calculated slope difference distribution as shown in fig.
3c.
step 4: we select the threshold according to rules described above from the calculated slope difference distribution with three peaks.
please note that the proposed rational calibration method is used only when the benchmark manual segmentation is not available.
when the benchmark data is available, the calibration method based on the f-measure is used because it is more robust than the proposed rational method.
the union method
we calculate the threshold, t
<dig> for the modified input cell image, i′ with the efficiently calibrated threshold selection method.
then, the modified cell image is binarized by the following equation.
<dig> si=1;i′≥t00;i′<t <dig>
we calculate the threshold, t
<dig> for the gradient image, i
g with the efficiently calibrated threshold selection method.
then, the gradient image is binarized as follows.
<dig> sg=1;ig≥t10;ig<t <dig>
after calculating the two segmentations, s
i and s
g, we compute their union segmentation s
u in three cases.
for one specific type of cell image, the user need to decide which case it belongs to.
for the cell images with a lot of overlapping/neighboring boundaries and their segmented boundaries are not closed for each cell, we define that they belong to case  <dig> and most cell images belong to this case.
for this case, the segmentation method is formulated as follows to utilize the segmentations of the gradient image and original image, s
g and s
i.
<dig> su=1;ifsi=1andsg=00;else
for the cell images with many overlapping or neighboring boundary and the segmented boundary for each cell is closed, we define that they belong to case  <dig>  for instance, many muscle cell images belong to this case.
for this case, the segmentation method is formulated as follows to utilize the segmentation of the gradient image, s
g alone.
<dig> su=1;ifsg=00;else
for the cell images with little overlapping or neighboring boundary, we define that they belong to case  <dig>  in this case, we formulate the segmentation method as follows to make use of the segmentation of the original input image, s
i only.
<dig> su=1;ifsi=10;else
the noise blob removing filter
in many situations, there are a lot of noise blobs in the union segmentation s
u, which might affect the accuracy of the automatic quantification process.
one big difference between the noise blob and the cell blob is that the noise blob is usually more tenuous than the cell blob as shown in fig.
4a, where the noise blobs are threadlike while the cell blobs are relatively massive.
hence, we propose the following filter to remove this kind of noise blobs.fig.
<dig> demonstration of removing the noise blobs by the proposed filter.
a the result of union segmentation.
b the filtering result by the proposed noise blob removing filter
step 1: erode the union segmentation, s
u morphologically by the following equations.
<dig> su′=su⊖b=z|bz⊆su
<dig> bz=c|c=p+z,p∈b
<dig> su=su′ where b is the 4-connected structure element with the disk shape and its radius is  <dig>  p is the point in the structuring element b and z is the translation vector.
step 2: repeat step 1
n
l times.
the value of n
l is determined by the user and its default value is  <dig>
step 3: dilate the union segmentation, s
u morphologically by the following equations.
<dig> su′=su⊕b=z|bsz∩cji≠∅
<dig> su=su′ where b
s denotes the symmetric or supplement of b.
step 4: repeat step 3
n
l times.
the functionality of the above filter is to remove the threadlike or small blobs by a repeating morphological erosion process at first.
then, a morphological dilation process with the same repeating times is used to restore the eroded cell blobs.
figure 4b shows the result of applying the above filter to the union segmentation shown in fig.
3a.
as can be seen, the tenuous noise blobs are removed effectively while the cell blobs are maintained well.
the boundary smoothing filter
there are some imaged cell images with poor quality or with imaging artifacts.
as a result, the segmentation results produce a lot of boundary noise that is defined as the elements e.g.
the boundary roughness or holes inside the segmented cells that make the cells irregular.
the irregular cells will produce more seeds during the iterative erosion process proposed in  <cit> , which will increase the quantified number.
to eliminate the shape noises, we propose a boundary smoothing filter as follows.
step 1: exact the boundaries {x
ij, y
ij}; i =  <dig>   <dig>  …, n
j of all the binary blobs and the holes inside the blobs in the union segmentation s
u. j denotes the index of the binary blobs and the holes inside the blobs.
i denotes the index of the point in the j th extracted boundary for the j th binary blob or the hole.
n
j denotes the total number of the points in the j th extracted boundary.
step 2: for the j th boundary, if n
j > t
sn, the boundary is valid and will be kept.
otherwise, the boundary is invalid and will be removed.
t
sn is the shape noise threshold and it could be computed based on the average size of all the segmented blobs in the image.
for a specific type of cell images, the sizes of the cells and the sizes of the noise blobs usually change in different ranges.
offline analysis could find a more accurate size threshold, t
sn to separate cells and the noise blobs robustly.
step 3: for all the valid boundaries, filter them by the fourier filter defined by eqs.
.
the input is changed from the normalized histogram to x coordinates and y coordinates of the valid boundaries respectively.
step 4: using the filtered boundaries to compute binary blobs again and form the filtered blob image, i
fb.
the quantification method
in most cases, there are cells separate from others and there are also cells connected with each other in the filtered blob image, i
fb.
to identify the cell individually, the same iterative morphological erosion method proposed in  <cit>  is used here.
step 1: initialize the seeds of all the cells to be the filtered blob image, i
fb.
<dig> ib1=ifb
step 2: erode the seeds i
b
i morphologically with the structure element b = {} as follows.
<dig> ib′=ibi⊖b=z|bz⊆ibi
<dig> bz=c|c=p+z,p∈b where p is the point in the structuring element b and z is the translation vector.
step 3: then calculate the union of the separated cells that are determined according to their areas.
use them as the updated seeds.
<dig> ici+1=∪cj˜;j˜=argjareacj<s <dig>
<dig> ibi+1=ib′−ici+ <dig>
s
<dig> that is defined as the area threshold to distinguish the area of the cell and the area of noise blob, is computed as the mean area of all the cells after a number of erosions on the segmented cells.
step 4: use the above steps to erode the segmented cells until the area of each cell is smaller than s
<dig>  at last, the seeds are updated as:  <dig> is=∪i=1lici where l denotes the total number of the isolated cells.
after all the cells are identified, the coordinate  of the k th cell’s center is computed as:  <dig> xck=1m∑j=1mxjk
<dig> yck=1m∑j=1myjk where m is the total number of pixels in the segmented cell and j is the pixel index of the segmented cell.
the algorithm of the generalized framework
the generalized framework is summarized in algorithm  <dig>
the calibration process based on the f-measure is summarized in algorithm  <dig>
RESULTS
in this section, we verify the robustness and the generality of the proposed framework with both the muscle cell images used in  <cit>  and other types of cell images.
one big difference between the proposed framework in this paper and the methods proposed in  <cit>  is the inclusion of the boundary smoothing filter.
here, we use two examples of muscle cells to demonstrate the advantages of the proposed framework in this paper over the methods proposed in  <cit> .
two typical muscle images that have been used to testify the proposed method in  <cit>  are used to show the superiority of the proposed framework in figs.
<dig> and  <dig> respectively.
figure 5a shows the gradient image enhanced from the gray image by eq.
.
figure 5b shows the threshold selection process for the gradient image.
the smoothed histogram is plotted in cyan.
the original histogram is plotted in mauve.
the peak part of the slope difference distribution is plotted in blue and the valley part of the slope difference is plotted in red.
the derivative of the slope difference is plotted in green and its interception points with the horizontal axis are denoted as blue crosses when they correspond to the peaks of the slope difference.
they are denoted as the red circles when they correspond to the valleys of the slope difference.
the selected threshold is denoted as the red asterisk.
after calibration, the optimal w value is chosen as  <dig> and the optimum n value is chosen as  <dig>  figure 5c shows the segmented edges with the selected threshold.
figure 5d shows the gray image of the muscle cell image and fig.
4e shows the threshold selection process for it.
figure 5f shows the segmented edges from the gray image.
figure 5g shows the filtered boundary overlaying on the segmentation result by the case  <dig> union method.
figure 5h shows the cell quantification result overlaying on the original cell image.fig.
<dig> demonstration of segmentation and quantification by the proposed framework using one tested image from  <cit> .
a the gradient image.
b threshold selection for the gradient image.
c segmentation result of the gradient image.
d the gray image.
e threshold selection for the gray image.
f segmentation result of the gray image.
g the green filtered shape and the red original shape overlaying on the union result of case  <dig>  h the quantified cells denoted by the green dots overlaying on the original image
fig.
<dig> demonstration of segmentation and quantification by the proposed framework using another tested image from  <cit> .
a the gradient image.
b threshold selection for the gradient image.
c segmentation result of the gradient image.
d the gray image.
e threshold selection for the gray image.
f segmentation result of the gray image.
g the green filtered shape and the red original shape overlaying on the union result of case  <dig>  h the quantified cells denoted by the green dots overlaying on the original image
figure 6a-h show the segmentation and quantification results of another testified muscle cell image in  <cit> .
to compare the quantification accuracy of the generalized framework in this research work and the method previously proposed in  <cit>  more conveniently, we show the quantification results by  <cit>  in fig.
<dig>  as can be seen, two missing cells in the quantification result of fig.
7a are quantified correctly in fig.
5h.
in addition, the extra one false quantification in fig.
7a is avoided in fig.
5h.
similarly, the quantification result in fig.
6h are better than that in fig.
7b.fig.
<dig> quantification results of the same two muscle cell images in  <cit> .
a the tested muscle cell image in fig.
<dig>  b the tested muscle cell image in fig.
6
to demonstrate the advantage of the generalized framework over state of the art methods, we show the results of the two muscle cell images by the smash method  <cit>  and the cellsegm method  <cit>  in fig.
<dig>  as can be seen, the generalized framework yields significantly better results than state of the art methods  <cit> .
more comparisons are given with different types of cell images in figs.
<dig> and  <dig>  in fig.
<dig>  the muscle cell boundaries are much more unclear than those in fig.
<dig>  the generalized framework still achieves good result while state of the art methods performed significantly worse.
we show the quantitative comparison with ten muscle cell images in table  <dig>  as can be seen, the proposed generalized framework achieves better accuracy than the two state of the art methods  <cit>  in segmenting muscle cell images.
more importantly, the proposed framework is capable of segmenting other different types of cells besides the muscle cell images while the other two state of the art methods  <cit>  might not be capable.
in fig.
<dig>  we show the results of a different type of cell image by these three methods.
it is seen that only the generalized framework yielded meaningful result while smash and cellsegm failed.fig.
<dig> results of the same two muscle cell images in  <cit>  by state of the art methods.
a results of smash for the first tested muscle cell image.
b results of cellsegm for the first tested muscle cell image.
c results of smash for the second tested muscle cell image.
d results of cellsegm for the second tested muscle cell image
fig.
<dig> comparison of the results of the generalized framework with state of the art methods.
a result of the generalized framework.
b intermediate result of smash.
c final result of smash.
d intermediate result of cellsegm.
e final result of cellsegm
fig.
<dig> comparison of the results of the generalized framework with state of the art methods.
a result of the generalized framework.
b results of smash.
c result of cellsegm
the effectiveness of the proposed boundary smoothing filter has been verified by the qualitative results shown in figs.
<dig> and  <dig>  similarly, we show the effectiveness of the proposed noise blob removing filter in figs.
<dig> and  <dig>  figure 11a shows the boundary extracted directly from the union segmentation without noise blob filtering and fig.
11b shows the extracted boundary from the union segmentation after noise blob filtering.
figure 11c shows the final quantification results based on the extracted boundary in fig.
11a and d shows the final quantification results based on the extracted boundary in fig.
11b.
as can be seen, the quantification accuracy based on the filtered result by the noise blob filter is significantly higher that of the result without noise blob filtering.
figure  <dig> shows another example of muscle cell image.
the extracted boundary without and with the noise blob filter affects the final accuracy of the quantification result obviously.
there is one missing quantification in fig.
12c, which is caused by the noise blobs.fig.
<dig> demonstration of the effectiveness of the proposed noise blob filter.
a the extracted boundary from the union segmentation without noise blob filtering.
b the extracted boundary from the union segmentation after noise blob filtering.
c the quantification result based on the extracted boundary in a. d the quantification result based on the extracted boundary in b
fig.
<dig> demonstration of the effectiveness of the proposed noise blob filter with a muscle cell image.
a the extracted boundary from the union segmentation without noise blob filtering.
b the extracted boundary from the union segmentation after noise blob filtering.
c the quantification result based on the extracted boundary in a. d the quantification result based on the extracted boundary in b
for the quantitative result, the same cell image dataset used in  <cit>  is used for validation of the generalized framework proposed in this paper.
the measure for accuracy evaluation is the same as  <cit> .
the true positive  is defined as that there is one and only one identified cell inside each “ground-truth” boundary; the false positive  is defined as that there is more than one identified cell inside each “ground-truth” boundary.
the false negative  is defined as that there is none identified cell inside each “ground-truth” boundary.
the comparison is shown in table  <dig>  as can be seen, the robustness of the generalized framework is superior to the proposed method in  <cit> .table  <dig> quantitative comparison of the quantification accuracy with  <cit>
we use the  <dig> synthetic fluorescent cell images from the open access broad bioimage benchmark collection   <cit>  for the general comparison with state-of-the-art methods.
among the referenced literatures, only  <cit>  reports quantitative results based on the bbbc dataset.
hence, we compare the proposed method with  <cit>  using the quantitative results in table  <dig>  the correct quantification rate which is denoted as tp in table  <dig> is  <dig> %, which is better than that of  <cit> ,  <dig> %.
overall, the robustness and generality of the proposed framework is validated.
we share the codes for testing the quantitative results with these  <dig> synthetic images in the section of data availability.
since the generalized framework evolves and enhances the previous approaches  <cit>  and it inherits all their merits, more performance evaluation of the generalized framework could also be referred from the past work  <cit> .table  <dig> quantitative comparison of the quantification accuracy with state of the art methods
discussion
the microscopy imaging technology has been developed rapidly in recent years.
accordingly, image processing techniques for automatic cell segmentation and robust quantification are becoming more and more necessary.
according to our investigation, we concluded that threshold selection is the most appropriate method in this application due to its good efficiency, good resistance to noise and easy implementation.
state of the art threshold selection methods  failed to select the threshold robustly for the gradient image as stated and proved in  <cit> .
as a result, the threshold selection method was evolved and utilized in  <cit>  to segment the muscle cell images and its advantage over state of the art thresholding methods was also verified in  <cit> .
later, the threshold selection is improved further in  <cit>  by adding the calibration procedure to the selection process.
as a result, the threshold selection becomes flexible and could segment different types of cells robustly.
in this paper, we propose a simpler and more practical calibration method to determine the parameters for the threshold selection method based on the third property of the slope difference distribution.
only with the thresholding method to guarantee the accurate enough and complete enough segmentation, we could proceed to high level applications, e.g.
boundary extraction or quantification.
there are two challenging aspects for automatic and reliable quantification of cells by the proposed iterative erosion method in  <cit> : , there are some noise blobs that might be identified as the cell seed by the iterative erosion method.
, the extracted boundaries of the cell blobs are usually irregular with noise.
, there might be holes inside the cell blobs.
all these three aspects will increase the number of the false seeds produced by the iterative erosion method proposed in  <cit> .
to solve these problems, we propose a noise blob removing filter to get rid of the threadlike or small noise blobs.
we propose a boundary smoothing filter to smooth the extracted boundary of the cell blobs and also eliminate small holes inside the cell blobs.
to verified the proposed methods in this paper, both qualitative and quantitative experiments are conducted.
as it turned out, the proposed framework is more versatile than other state of the art methods due to the fact that it utilizes the characteristics of the adjacent cells and the general property of the cell images: the global intensity distribution and the local gradient.
the frequently occurring overlapping characteristics of the adjacent cells could be dealt effectively by the iterative erosion method.
the intensity image and the gradient image could be segmented effectively by the proposed segmentation method.
the segmentation method is able to segment different kinds of images and their formed gradient images more accurately because of the introduced calibration process.
CONCLUSIONS
in this paper, we propose a generalized framework for automatically segmenting and quantifying different types of cells.
to simplify the calibration process for the threshold selection, we proposed a practical calibration method.
to improve the quantification accuracy over the past research, we proposed a noise blob filtering method and a boundary smoothing filtering method in this paper.
experimental results verified their effectiveness.
as a generalized tool for automatic segmentation and quantification of different kinds of cells, it possible for the proposed framework to benefit a lot of automated microscopy applications in the future.
additional file
additional file 1: source codes of the proposed framework with test images.
abbreviations
dftdiscrete fourier transformation
firfinite impulse response
iirinfinite impulse response

 imaging of cells in biology are becoming more and more popular with the fast development of microscopy and nanotechnology. in different applications, different ways had been utilized to separate the imaged cells and they usually took the researchers great effort. as a powerful tool, the image processing technology is becoming more and more important for the segmentation, quantification and analysis of microscopy data. in different applications, the forms, the dimensions of the cells and their gray-level distributions vary significantly, which makes the segmentation task challenging. in many applications, the cells are frequently neighboring or overlapping on each other, which makes the quantification difficult. in this paper, we propose a generalized framework for robust segmentation and quantification of different types of cells imaged in different biological applications. in the past decades, image processing technology has been utilized widely in segmenting and quantifying different types of cells. the absence of a generalized framework for different types of cell images makes the research work application specific instead of convergent to a common solution. different methods were proposed and claimed to be superior in segmenting a class of cells. these methods include watershed method, region growing based method, morphological method, clustering based method, contour based method, multilayer segmentation based method, pattern modeling based method, supervised learning method, morphological watershed based method, inference based method and methods that combine the threshold selection and morphology techniques. however, the performance and applicability of most of these methods are very limited because they are diverging rather than convergent to a generalized solution to address so many types of cells. to overcome this drawback, the author has proposed a new approach to segment and quantify different types of cells or nanoparticles based on the general property of the cell images: global intensity distribution and local gradient, which is more versatile than the referenced state of the art methods. the approach proposed in evolves the method proposed in and makes it to be able to segment and quantify more types of cells or nanoparticles. one fundamental improvement of compared to is that the threshold selection method used in was improved to be able to segment more types of cells or nanoparticles robustly. however, the details of how to apply the proposed threshold selection method with practical cell images are not addressed adequately in. in this paper, we design the practical algorithm to apply the threshold selection method proposed in to segment the practical cell images. in addition, we calibrate more parameters than to guarantee the robust segmentation. a more important goal of this paper is to propose a generalized framework to segment and quantify different types of cells imaged in different systems with higher accuracy compared to the past work. to this end, we tested more cell images in addition to the muscle cell images in. some imaged cell images have artifacts or the segmentation results contain too much noise. consequently, the segmented cells contain shape noises which will increase the number of the eroded seeds by the iterative erosion method proposed in, which will affect the final quantification accuracy. to eliminate these shape noises, we propose a fourier transformation based shape filter and it could decrease the wrong quantification effectively. in addition to the shape filter, we also propose a blob filter that could remove the line shape noise blobs effectively. for the muscle cell images, two cases are defined in the union method based on the image characteristics. for the generalized framework to segment more types of cell images, three cases are defined in the union method in this paper. to verify the advantages of the proposed generalized framework over the past research work, we give both the qualitative results and the quantitative results. methods the generalized framework the proposed framework for segmentation and quantification of the cells is illustrated in fig.  in the framework, the content in the ellipse vary depending on the input image to be processed while the content in the rectangle are the proposed algorithms and they remain the same for different types of cells. the input image denotes the original cell image. the gradient image is obtained after edge enhancement. both the input image and the gradient image are segmented by the threshold selection method automatically to get the binarized image and the constraint edge image, respectively. the segmentation result is obtained by unifying the binarized image and the negative constraint edge image. the noise blob removing filter is used to eliminate the thread-like or small noise blobs. the boundary smoothing filter is used to remove the noise contained in the extracted boundary. the quantification method is used to obtain the quantification result after identifying each cell individually. except the segmentation method, the union method and the quantification method, all the other methods are optional based on the characteristics of the cells. for each type of cell, the methods are selected and then applied one by one in the framework and they need to be prepared and calibrated carefully before the framework could segment and quantify the cells automatically.fig. flowchart of the proposed framework the enhancement method the gradient image is generated by the enhancement method. in the current framework, we generate the gradient image using the sobel operators. firstly, the sobel operator is applied to the cell image along the row direction to get the horizontal gradient components, i x. secondly, the sobel operator is applied to the cell image along the column direction to get the vertical gradient components, i y. thirdly, the gradient image is formed by the following equation. ighj=ix2hj+iy2hj where h =   …, h; is the index of the pixel along the column direction and j =   …, j; is the index of the pixel along the row direction. h × j denotes the dimension of the cell image. the segmentation method the segmentation method should be flexible and robust enough for a vast variety of cell images. we tested all the available state of the art segmentation methods to segment the cell images and the generated gradient images. unfortunately, we did not find any state of the art segmentation method that could yield adequate accuracy consistently for so many types of cell images. a more versatile, flexible and generalized image segmentation method has been proposed in to produce acceptable segmentation results consistently for many types of muscle cell images. however, the histogram modalities of the muscle cell images are similar and so are the modalities of their gradient images, which makes the image segmentation less challenging compared to segmenting more divergent types of cell images. fortunately, the flexibility of the previously proposed threshold selection method makes it adjustable for different types of images by varying the its parameters. hence, we introduce the process of calibration in this paper to find the optimal parameters of the threshold selection method for each specific type of cell image. the previously proposed threshold selection method could be summarized as follows. the threshold is calculated from the slope difference distribution of the normalized histogram. the histogram is assumed as gaussian-mixture distributions in this research work. we define the slope difference distribution of the image as the variation rate of the normalized histogram and it could be computed by the following steps. step assuming the image is non-negative, the cell image is modified by rearranging its gray-scale values in the interval with the following equation. i′hj=255×ihjmaxi;h= …,h;j= …,j where h × j is the resolution of the cell image, i. h is the index of the pixel along the vertical direction of the cell image and j is the index of the pixel along the horizontal direction of the cell image. here, is used for convenience because most gray images have the maximum value of could be changed to other values based on the application requirements. step the histogram distribution p of the modified cell image, i′ is normalized by the following equations: px=m=nmnl;m= …,255; l=argmaxl˜∈0255nl˜ where n l denotes the maximum frequency that occurs at l in the interval. n m denotes the frequency of the pixel value m. step after the histogram distribution is normalized, it is then filtered in the frequency domain. firstly, the normalized histogram distribution, p is transformed into the frequency domain with the discrete fourier transformation: fk=∑x=0255pxe−i2πkx255;k= …, then, we select the low frequency parts from to l and eliminate the rest of high frequency parts with the following equation. f′k=fk;k=,…,wfk;k=255−w,…,;k=w+ …,255−w− where w the bandwidth of the low pass dft filter and it is going to be determined by the calibration process. after the above equation is performed to filter histogram distribution in the frequency domain, we transform the smoothed histogram distribution back into spatial domain by the following equation. p′x=1255∑k=0255f′kei2πxk255;x= …, where p′ is the filtered and smoothed histogram. step for each point, i on p′, there are two slopes, a and a they are on the left side and the right side of the point, i respectively. they could be computed by a fitted line model with n adjacent points at each side and the parameter n will also be determined by the calibration process. the line model is formulated as: yi=axi+b abt=btb−1bty b=x11x21⋮xn⋮ y=y1y2…,ynt when the n fitting points are on the left side of the point i, the slope a equals a when the n fitting points are on the right side of the point i, the slope a equals a both slopes are computed by eq. accordingly, the slope difference of the point i is computed by the following equation. si=a2i−a1i;i=n+ …,255−n the continuous version as s is defined as the slope difference distribution. setting its derivative to zero, we could get the n v valleys v i; i =   …, n v with greatest local variations and n p peaks p i; i =     …, n p with greatest local variations of the slope difference distribution. not all peaks or valleys are caused by the histogram variations because the smoothing process by the low-pass dft filter might produce small harmonics when significant parts of the original histogram remain the same or close to the horizontal axis. consequently, these harmonics produce pseudo peaks and valleys. fortunately, the pseudo peaks or valleys are much smaller compared to the real peaks or valleys. the real peaks or valleys could be distinguished from the pseudo ones easily based on their magnitudes. on the other hand, the produced harmonics avoid the possible ill-conditions of the matrix inverse operation in eq. the matrix inverse operation will become ill-conditioned when the n fitting points are from a horizontal line. the horizontal parts in the histogram are replaced with harmonics after dft filtering. we demonstrate the slope difference distribution with three synthesized images in fig.  the first synthesized image is an image with two objects as shown in fig. 2a. the grayscale of the background equals the grayscale of the dark object equals and the grayscale of the bright object equals its slope distribution is demonstrated in fig. 2d. the original histogram distribution consists of three isolated peaks. after dft filtering, the histogram distribution become continuous with small harmonics that produce many small pseudo peaks and valleys. there are three real peaks and six real valleys and their magnitudes are much greater than those of the pseudo ones. the peaks and valleys are denoted by the blue crosses and red circles respectively in fig. 2d. the second image is synthesized by adding gaussian noise to the first synthesized image and it is shown in fig. 2b. its slope difference distribution is shown in fig. 2e. as can be seen, its original histogram is continuous with less parts on the horizontal axis. as a result, less harmonics and less pseudo peaks and valleys are generated. the third image is synthesized by blurring the second synthesized image with an iterative moving average filter and it is shown in fig. 2c. its slope difference distribution is shown in fig. 2f. as can be seen, its original histogram is also continuous. however, many parts are close to the horizontal axis. as a result, many pseudo peaks and pseudo valleys occur. from all these results, it is seen that the real peaks or valleys could be easily distinguished from the pseudo peaks or valleys. for most practical images, their histograms are usually continuous without significant parts close to the horizontal axis or remain the same, thus no pseudo peaks or valleys will occur. for the image with known number of pixel classes k c, the rule to select the peaks is as follows. firstly, all the peaks are sorted in the magnitude descending order. secondly, the first k c peaks are then selected as the real peaks.fig. demonstration of slope difference distribution. a the first synthesized image. b the second synthesized image. c the third synthesized image. d slope difference distribution of first synthesized image. e slope difference distribution of second synthesized image. f slope difference distribution of third synthesized image the slope difference distribution has three fundamental properties that help to design the threshold selection process. property 1: in situations where the histogram distribution of background and the histogram distribution of the cells are both gaussian distributed, the valley positions between the background and the object on the slope difference distribution change monotonically with the number of the fitted points n in the line model while the peak positions are almost the same when the parameter, n is changed gradually. in the experiments, we found that this property holds only when the histogram is filtered by the designed filter with the bandwidth parameter w calibrated and chosen properly for each specific type of image. when we used other filters, for instance, the finite impulse response filter and the infinite impulse response filter, both the peaks and the valleys of the slope difference distribution change irregularly. hence, we conclude that the fourier transformation based filtering is capable of removing the high frequency noises effectively while maintaining the shape of the histogram well. however, the fir filter and iir filter lack this capability and will change the shape of smoothed histogram undesirably. consequently, they cause the peaks of the slope difference distribution to change randomly. property 2: the peaks of the slope difference distribution correspond to the cluster centers of the objects or the background while the valleys correspond to the thresholds that could separate the objects and the background. property 3: the fitting number n of line model determines the number of the peaks of the slope difference distribution. a large n value could suppress small peaks and unify adjacent peaks into one peak. the proposed threshold selection method is flexible and has some changeable manual inputs that could be adjusted to meet different segmentation requirements. the first manual input defines how many pixel classes the image contains. the default value of it is which indicates that there are one object class and one background class. the second manual input defines what classes to segment. when the user wants to separate the background class and all the objects classes, it is defined as case when the user wants to separate the first object class and the second object class along the pixel increase direction, it is defined as case case is defined as the separation between the second object class and the third object class. in the same way, other cases are defined. case is default case. the third input is how many points the line model uses to fit the line and the fourth input is the bandwidth of the low pass filter. to determine the third and fourth inputs for each type of cell images before segmentation, we calibrate the threshold selection method based on the popular f-measure. for a specific type of cell images, the calibration process is summarized as follows. for a specific type of cell images, we select several typical images and obtain the ground truth manual segmentation results for these images. then, we vary the value of the third input, the parameter n in eq. from to and the fourth input, the parameter w in eq. from to we compute the f-measure, f m of the automatic segmentation result by the threshold selection method and the manual segmentation result for each pair parameters by the following equations. fm=2×p×rp+r p=ssd∩smsm r=ssd∩smssd where s m is the ground truth manual segmentation and s sd is the automatic segmentation result by the threshold selection method. we choose the pair of parameters that yields the largest f m. during segmentation of a great of variety of cell images, it might be inconvenient to obtain the benchmark manual segmentation from the cytologist for each type of cell image. here, we propose a rational calibration method in the absence of benchmark manual segmentation result based on property of the slope difference distribution. step 1: we determine how many pixel classes the image contains rationally. here, we give an example of cell image with three pixel classes: the black cell, the gray clutters and the brighter background as shown in fig. 3a. there are small abrupt parts with pixel values close to in the original histogram distribution, which affects the normalization of the histogram and makes most parts of the histogram below. after dft filtering, this bad effect is removed and the normalized histogram becomes much better.fig. demonstration of threshold selection by the proposed efficient calibration method. a the gray image. b threshold selection process with n =  c threshold selection process with n = 31 step 2: we use the default value, n =  and w =  to calculate the thresholds visually as shown in fig. 3b. it is seen that there are peaks instead of peaks existing in the calculated slope difference distribution. step 3: we increase the value of n until there are only peaks in the calculated slope difference distribution as shown in fig. 3c. step 4: we select the threshold according to rules described above from the calculated slope difference distribution with three peaks. please note that the proposed rational calibration method is used only when the benchmark manual segmentation is not available. when the benchmark data is available, the calibration method based on the f-measure is used because it is more robust than the proposed rational method. the union method we calculate the threshold, t for the modified input cell image, i′ with the efficiently calibrated threshold selection method. then, the modified cell image is binarized by the following equation. si=1;i′≥t00;i′<t we calculate the threshold, t for the gradient image, i g with the efficiently calibrated threshold selection method. then, the gradient image is binarized as follows. sg=1;ig≥t10;ig<t after calculating the two segmentations, s i and s g, we compute their union segmentation s u in three cases. for one specific type of cell image, the user need to decide which case it belongs to. for the cell images with a lot of overlapping/neighboring boundaries and their segmented boundaries are not closed for each cell, we define that they belong to case and most cell images belong to this case. for this case, the segmentation method is formulated as follows to utilize the segmentations of the gradient image and original image, s g and s i. su=1;ifsi=1andsg=00;else for the cell images with many overlapping or neighboring boundary and the segmented boundary for each cell is closed, we define that they belong to case for instance, many muscle cell images belong to this case. for this case, the segmentation method is formulated as follows to utilize the segmentation of the gradient image, s g alone. su=1;ifsg=00;else for the cell images with little overlapping or neighboring boundary, we define that they belong to case in this case, we formulate the segmentation method as follows to make use of the segmentation of the original input image, s i only. su=1;ifsi=10;else the noise blob removing filter in many situations, there are a lot of noise blobs in the union segmentation s u, which might affect the accuracy of the automatic quantification process. one big difference between the noise blob and the cell blob is that the noise blob is usually more tenuous than the cell blob as shown in fig. 4a, where the noise blobs are threadlike while the cell blobs are relatively massive. hence, we propose the following filter to remove this kind of noise blobs.fig. demonstration of removing the noise blobs by the proposed filter. a the result of union segmentation. b the filtering result by the proposed noise blob removing filter step 1: erode the union segmentation, s u morphologically by the following equations. su′=su⊖b=z|bz⊆su bz=c|c=p+z,p∈b su=su′ where b is the 4-connected structure element with the disk shape and its radius is p is the point in the structuring element b and z is the translation vector. step 2: repeat step 1 n l times. the value of n l is determined by the user and its default value is step 3: dilate the union segmentation, s u morphologically by the following equations. su′=su⊕b=z|bsz∩cji≠∅ su=su′ where b s denotes the symmetric or supplement of b. step 4: repeat step 3 n l times. the functionality of the above filter is to remove the threadlike or small blobs by a repeating morphological erosion process at first. then, a morphological dilation process with the same repeating times is used to restore the eroded cell blobs. figure 4b shows the result of applying the above filter to the union segmentation shown in fig. 3a. as can be seen, the tenuous noise blobs are removed effectively while the cell blobs are maintained well. the boundary smoothing filter there are some imaged cell images with poor quality or with imaging artifacts. as a result, the segmentation results produce a lot of boundary noise that is defined as the elements e.g. the boundary roughness or holes inside the segmented cells that make the cells irregular. the irregular cells will produce more seeds during the iterative erosion process proposed in, which will increase the quantified number. to eliminate the shape noises, we propose a boundary smoothing filter as follows. step 1: exact the boundaries {x ij, y ij}; i =     …, n j of all the binary blobs and the holes inside the blobs in the union segmentation s u. j denotes the index of the binary blobs and the holes inside the blobs. i denotes the index of the point in the j th extracted boundary for the j th binary blob or the hole. n j denotes the total number of the points in the j th extracted boundary. step 2: for the j th boundary, if n j > t sn, the boundary is valid and will be kept. otherwise, the boundary is invalid and will be removed. t sn is the shape noise threshold and it could be computed based on the average size of all the segmented blobs in the image. for a specific type of cell images, the sizes of the cells and the sizes of the noise blobs usually change in different ranges. offline analysis could find a more accurate size threshold, t sn to separate cells and the noise blobs robustly. step 3: for all the valid boundaries, filter them by the fourier filter defined by eqs.. the input is changed from the normalized histogram to x coordinates and y coordinates of the valid boundaries respectively. step 4: using the filtered boundaries to compute binary blobs again and form the filtered blob image, i fb. the quantification method in most cases, there are cells separate from others and there are also cells connected with each other in the filtered blob image, i fb. to identify the cell individually, the same iterative morphological erosion method proposed in is used here. step 1: initialize the seeds of all the cells to be the filtered blob image, i fb. ib1=ifb step 2: erode the seeds i b i morphologically with the structure element b = {} as follows. ib′=ibi⊖b=z|bz⊆ibi bz=c|c=p+z,p∈b where p is the point in the structuring element b and z is the translation vector. step 3: then calculate the union of the separated cells that are determined according to their areas. use them as the updated seeds. ici+1=∪cj˜;j˜=argjareacj<s ibi+1=ib′−ici+ s that is defined as the area threshold to distinguish the area of the cell and the area of noise blob, is computed as the mean area of all the cells after a number of erosions on the segmented cells. step 4: use the above steps to erode the segmented cells until the area of each cell is smaller than s at last, the seeds are updated as: is=∪i=1lici where l denotes the total number of the isolated cells. after all the cells are identified, the coordinate of the k th cell’s center is computed as: xck=1m∑j=1mxjk yck=1m∑j=1myjk where m is the total number of pixels in the segmented cell and j is the pixel index of the segmented cell. the algorithm of the generalized framework the generalized framework is summarized in algorithm the calibration process based on the f-measure is summarized in algorithm  in this section, we verify the robustness and the generality of the proposed framework with both the muscle cell images used in and other types of cell images. one big difference between the proposed framework in this paper and the methods proposed in is the inclusion of the boundary smoothing filter. here, we use two examples of muscle cells to demonstrate the advantages of the proposed framework in this paper over the methods proposed in. two typical muscle images that have been used to testify the proposed method in are used to show the superiority of the proposed framework in figs.  and respectively. figure 5a shows the gradient image enhanced from the gray image by eq.. figure 5b shows the threshold selection process for the gradient image. the smoothed histogram is plotted in cyan. the original histogram is plotted in mauve. the peak part of the slope difference distribution is plotted in blue and the valley part of the slope difference is plotted in red. the derivative of the slope difference is plotted in green and its interception points with the horizontal axis are denoted as blue crosses when they correspond to the peaks of the slope difference. they are denoted as the red circles when they correspond to the valleys of the slope difference. the selected threshold is denoted as the red asterisk. after calibration, the optimal w value is chosen as and the optimum n value is chosen as figure 5c shows the segmented edges with the selected threshold. figure 5d shows the gray image of the muscle cell image and fig. 4e shows the threshold selection process for it. figure 5f shows the segmented edges from the gray image. figure 5g shows the filtered boundary overlaying on the segmentation result by the case union method. figure 5h shows the cell quantification result overlaying on the original cell image.fig. demonstration of segmentation and quantification by the proposed framework using one tested image from. a the gradient image. b threshold selection for the gradient image. c segmentation result of the gradient image. d the gray image. e threshold selection for the gray image. f segmentation result of the gray image. g the green filtered shape and the red original shape overlaying on the union result of case h the quantified cells denoted by the green dots overlaying on the original image fig. demonstration of segmentation and quantification by the proposed framework using another tested image from. a the gradient image. b threshold selection for the gradient image. c segmentation result of the gradient image. d the gray image. e threshold selection for the gray image. f segmentation result of the gray image. g the green filtered shape and the red original shape overlaying on the union result of case h the quantified cells denoted by the green dots overlaying on the original image figure 6a-h show the segmentation and quantification results of another testified muscle cell image in. to compare the quantification accuracy of the generalized framework in this research work and the method previously proposed in more conveniently, we show the quantification results by in fig.  as can be seen, two missing cells in the quantification result of fig. 7a are quantified correctly in fig. 5h. in addition, the extra one false quantification in fig. 7a is avoided in fig. 5h. similarly, the quantification result in fig. 6h are better than that in fig. 7b.fig. quantification results of the same two muscle cell images in. a the tested muscle cell image in fig.  b the tested muscle cell image in fig. 6 to demonstrate the advantage of the generalized framework over state of the art methods, we show the results of the two muscle cell images by the smash method and the cellsegm method in fig.  as can be seen, the generalized framework yields significantly better results than state of the art methods. more comparisons are given with different types of cell images in figs.  and in fig.  the muscle cell boundaries are much more unclear than those in fig.  the generalized framework still achieves good result while state of the art methods performed significantly worse. we show the quantitative comparison with ten muscle cell images in table  as can be seen, the proposed generalized framework achieves better accuracy than the two state of the art methods in segmenting muscle cell images. more importantly, the proposed framework is capable of segmenting other different types of cells besides the muscle cell images while the other two state of the art methods might not be capable. in fig.  we show the results of a different type of cell image by these three methods. it is seen that only the generalized framework yielded meaningful result while smash and cellsegm failed.fig. results of the same two muscle cell images in by state of the art methods. a results of smash for the first tested muscle cell image. b results of cellsegm for the first tested muscle cell image. c results of smash for the second tested muscle cell image. d results of cellsegm for the second tested muscle cell image fig. comparison of the results of the generalized framework with state of the art methods. a result of the generalized framework. b intermediate result of smash. c final result of smash. d intermediate result of cellsegm. e final result of cellsegm fig. comparison of the results of the generalized framework with state of the art methods. a result of the generalized framework. b results of smash. c result of cellsegm the effectiveness of the proposed boundary smoothing filter has been verified by the qualitative results shown in figs.  and similarly, we show the effectiveness of the proposed noise blob removing filter in figs.  and figure 11a shows the boundary extracted directly from the union segmentation without noise blob filtering and fig. 11b shows the extracted boundary from the union segmentation after noise blob filtering. figure 11c shows the final quantification results based on the extracted boundary in fig. 11a and d shows the final quantification results based on the extracted boundary in fig. 11b. as can be seen, the quantification accuracy based on the filtered result by the noise blob filter is significantly higher that of the result without noise blob filtering. figure  shows another example of muscle cell image. the extracted boundary without and with the noise blob filter affects the final accuracy of the quantification result obviously. there is one missing quantification in fig. 12c, which is caused by the noise blobs.fig. demonstration of the effectiveness of the proposed noise blob filter. a the extracted boundary from the union segmentation without noise blob filtering. b the extracted boundary from the union segmentation after noise blob filtering. c the quantification result based on the extracted boundary in a. d the quantification result based on the extracted boundary in b fig. demonstration of the effectiveness of the proposed noise blob filter with a muscle cell image. a the extracted boundary from the union segmentation without noise blob filtering. b the extracted boundary from the union segmentation after noise blob filtering. c the quantification result based on the extracted boundary in a. d the quantification result based on the extracted boundary in b for the quantitative result, the same cell image dataset used in is used for validation of the generalized framework proposed in this paper. the measure for accuracy evaluation is the same as. the true positive is defined as that there is one and only one identified cell inside each “ground-truth” boundary; the false positive is defined as that there is more than one identified cell inside each “ground-truth” boundary. the false negative is defined as that there is none identified cell inside each “ground-truth” boundary. the comparison is shown in table  as can be seen, the robustness of the generalized framework is superior to the proposed method in.table quantitative comparison of the quantification accuracy with we use the synthetic fluorescent cell images from the open access broad bioimage benchmark collection for the general comparison with state-of-the-art methods. among the referenced literatures, only reports quantitative results based on the bbbc dataset. hence, we compare the proposed method with using the quantitative results in table  the correct quantification rate which is denoted as tp in table  is %, which is better than that of, %. overall, the robustness and generality of the proposed framework is validated. we share the codes for testing the quantitative results with these synthetic images in the section of data availability. since the generalized framework evolves and enhances the previous approaches and it inherits all their merits, more performance evaluation of the generalized framework could also be referred from the past work.table quantitative comparison of the quantification accuracy with state of the art methods discussion the microscopy imaging technology has been developed rapidly in recent years. accordingly, image processing techniques for automatic cell segmentation and robust quantification are becoming more and more necessary. according to our investigation, we concluded that threshold selection is the most appropriate method in this application due to its good efficiency, good resistance to noise and easy implementation. state of the art threshold selection methods failed to select the threshold robustly for the gradient image as stated and proved in. as a result, the threshold selection method was evolved and utilized in to segment the muscle cell images and its advantage over state of the art thresholding methods was also verified in. later, the threshold selection is improved further in by adding the calibration procedure to the selection process. as a result, the threshold selection becomes flexible and could segment different types of cells robustly. in this paper, we propose a simpler and more practical calibration method to determine the parameters for the threshold selection method based on the third property of the slope difference distribution. only with the thresholding method to guarantee the accurate enough and complete enough segmentation, we could proceed to high level applications, e.g. boundary extraction or quantification. there are two challenging aspects for automatic and reliable quantification of cells by the proposed iterative erosion method in:, there are some noise blobs that might be identified as the cell seed by the iterative erosion method., the extracted boundaries of the cell blobs are usually irregular with noise., there might be holes inside the cell blobs. all these three aspects will increase the number of the false seeds produced by the iterative erosion method proposed in. to solve these problems, we propose a noise blob removing filter to get rid of the threadlike or small noise blobs. we propose a boundary smoothing filter to smooth the extracted boundary of the cell blobs and also eliminate small holes inside the cell blobs. to verified the proposed methods in this paper, both qualitative and quantitative experiments are conducted. as it turned out, the proposed framework is more versatile than other state of the art methods due to the fact that it utilizes the characteristics of the adjacent cells and the general property of the cell images: the global intensity distribution and the local gradient. the frequently occurring overlapping characteristics of the adjacent cells could be dealt effectively by the iterative erosion method. the intensity image and the gradient image could be segmented effectively by the proposed segmentation method. the segmentation method is able to segment different kinds of images and their formed gradient images more accurately because of the introduced calibration process.  in this paper, we propose a generalized framework for automatically segmenting and quantifying different types of cells. to simplify the calibration process for the threshold selection, we proposed a practical calibration method. to improve the quantification accuracy over the past research, we proposed a noise blob filtering method and a boundary smoothing filtering method in this paper. experimental results verified their effectiveness. as a generalized tool for automatic segmentation and quantification of different kinds of cells, it possible for the proposed framework to benefit a lot of automated microscopy applications in the future. additional file additional file 1: source codes of the proposed framework with test images. abbreviations dftdiscrete fourier transformation firfinite impulse response iirinfinite impulse response 
a boundary smoothing filter is proposed to reduce the false seeds produced by the iterative erosion. the accompanying requirements for automatic segmentation and quantification of the imaged cells are becoming more and more. to make the cell segmentation work more convergent, we propose a framework that is able to segment different kinds of cells automatically and robustly in this paper. on the contrary, different segmentation methods were proposed to address the different types of cells, which makes the research work divergent. this framework evolves the previously proposed method in segmenting the muscle cells and generalizes it to be suitable for segmenting and quantifying a variety of cell images by adding more union cases. compared to the previous methods, the segmentation and quantification accuracy of the proposed framework is also improved by three novel procedures: a simplified calibration method is proposed and added for the threshold selection process; a noise blob filter is proposed to get rid of the noise blobs. boundary filteringnoise blob filteringthreshold selectioncalibrationiterative erosionhttp://dx.doi.org/ /501100002367chinese academy of sciencesy5a1270101wang zhenzhou issue-copyright-statement© the author 2017 in addition, the accuracy of the proposed framework is also better in quantifying the muscle cells than two available state-of-the-art methods. the proposed framework is able to automatically segment and quantify more types of cells than state-of-the-art methods. as it turned out, the quantification accuracy of the proposed framework increases from to % compared to the previous method. in recent years, the microscopy technology for imaging cells has developed greatly and rapidly.
 in recent years, the microscopy technology for imaging cells has developed greatly and rapidly. the accompanying requirements for automatic segmentation and quantification of the imaged cells are becoming more and more. after studied widely in both scientific research and industrial applications for many decades, cell segmentation has achieved great progress, especially in segmenting some specific types of cells, e.g. muscle cells. however, it lacks a framework to address the cell segmentation problems generally. on the contrary, different segmentation methods were proposed to address the different types of cells, which makes the research work divergent. in addition, most of the popular segmentation and quantification tools usually require a great part of manual work.  to make the cell segmentation work more convergent, we propose a framework that is able to segment different kinds of cells automatically and robustly in this paper. this framework evolves the previously proposed method in segmenting the muscle cells and generalizes it to be suitable for segmenting and quantifying a variety of cell images by adding more union cases. compared to the previous methods, the segmentation and quantification accuracy of the proposed framework is also improved by three novel procedures: a simplified calibration method is proposed and added for the threshold selection process; a noise blob filter is proposed to get rid of the noise blobs. a boundary smoothing filter is proposed to reduce the false seeds produced by the iterative erosion. as it turned out, the quantification accuracy of the proposed framework increases from to % compared to the previous method. in addition, the accuracy of the proposed framework is also better in quantifying the muscle cells than two available state-of-the-art methods.  the proposed framework is able to automatically segment and quantify more types of cells than state-of-the-art methods. electronic supplementary material the online version of this article contains supplementary material, which is available to authorized users. keywords boundary filteringnoise blob filteringthreshold selectioncalibrationiterative erosionhttp://dx.doi.org/ /501100002367chinese academy of sciencesy5a1270101wang zhenzhou issue-copyright-statement© the author 2017 