Abstract
In this study, we propose an algorithm that uses an improved Minimum Spanning Tree algorithm and a modified Canny edge detector to segment images that contain a considerable amount of noises. First, we use our modified Canny operator to pre-process an image, and record the obtained object boundary information; then, we apply the improved Minimum Spanning Tree algorithm to associate the above information with boundary points in order to separate edges into two classes in the image, namely the inner and boundary regions. In particular, Minimum Spanning Tree algorithm is improved by using Fractional differential and combining the functions of the intra-regional and inter-regional differences with a function for edge weights. Based on the experimental results, compared with the other four exiting algorithms, the new algorithm has the higher accuracy and the better effect for noised image segmentation.
Introduction
Image segmentation is a process that involves extracting targets or regions of interest from images. In particular, in the image segmentation process, the characteristics of gray scale, texture, color, and other characteristics in the image can be utilized to divide the image into several regions that have internal homogeneity. Since 1971, when Zahn first applied the graph theory for image segmentation and data clustering, 1 the study for graph-based image segmentation has become a hot topic for research worldwide; considering this, the various graph-based image segmentation algorithms have been developed with different advantages based on sound mathematical concepts. It should be noted that, in graph-based image segmentation algorithms, the boundary of a region is the same as the edge of the region. Therefore, the extracted boundary will always be closed, even without using additional conditions or criteria.
In 1993, the graph cuts segmentation criterion was introduced by Wu and Leahy. 2 It involves cutting the edge that has the smallest similarity between pixels; however, this method is prone to producing small image regions. Hence, Shi and Malik studied a normalized cut algorithm that considers the global information of an image to maximize the differences between the regions as well as similarities within the regions based on Wu and Leahy’s graph cuts segmentation criterion, thus overcoming the above-mentioned disadvantages. 3 Boykov and Funka-Lea explored an optimization framework for the energy function using graph cuts based on the properties of an area in a manner similar to the Mumford-Shah functional. 4 In addition, they applied their framework for N-dimensional image segmentation to obtain the global optimum, and found it to be efficient and robust for practical applications. Sharon et al. 5 described a top-down hierarchical image segmentation algorithm based on graph theory, calculated the coupling edge weight to obtain the subdivision graph, selected several seeds to roughly segment the image iteratively, and obtained the saliency map and extracted significant targets from the image. Their algorithm is not only efficient, but also leads to the accurate segmentation results. Furthermore, Wieclawak and Pietka modified the Live Wire algorithm by integrating the Wavelet transform with the fuzzy C means clustering method to obtain a cost function, and used graph theory for the segmentation of medical computed tomography (CT) and magnetic resonance (MR) images. 6 Gopalakrishnan et al. suggested a method to extract significant targets in images through random walks of the image graph. 7 In particular, first, they obtained the global attributes of an image based on the detected seed nodes by using the Markov random walk, and then they computed the local properties using the sparse k-regular graph to determine the background and foreground seed nodes via stepwise semi-supervised learning. Their results were good in terms of target extraction. Egger et al. developed a scale fixed template-based paradigm for complex images, 8 in which the gray level of the target area is the similar to that of the background, they introduced the concept of “template shape” to sample non-uniform and non-equidistant nodes in graph. Then, they applied their paradigm for the processing of two-dimensional and three-dimensional brain tumor images. Chen et al. presented a k clustering and graph-cuts-based image segmentation algorithm, 9 which enabled automatic image segmentation of cardiac dual-source CT images and accurately estimated the structure of the heart. In 2004, Felzenszwalb and Huttenlocher proposed a “small region merging” image segmentation criterion, 10 which entails that, when the internal differences in an area are greater than the differences between different areas, then the two homogeneous regions are identified and merged together so that the graph-based algorithm can extract the characteristics of an image in a faster manner. Considering this advantage, our study is based on this algorithm. It should be noted that, in the past few years, several other studies related to this research topic have been conducted in references.11–14
The above-mentioned algorithms were studied only for specific, special engineering images; however, none of the existing image segmentation algorithms can be standard. Based on our experiments, for the images in this study, the effect of these previously algorithms is not ideal. In particular, the drawbacks of these previous graph-based algorithms are that the larger the parameters are set to, the more the details of the image are lost, whereas small parameters might lead to over-segmentation, in addition, because the image segmentation scale cannot be correctly determined in the previous algorithms, the foreground and background of an image are incorrectly partitioned. To overcome some of these problems and enable optimal edge detection algorithm available, the Canny operator was proposed by Canny in 1986. 15 In general, it is a multilevel edge detection operator. The optimal edge detection includes the following: (1) good detection: identifying the actual edges in an image as accurately as possible by minimizing the error rate; (2) good location: detecting edges as close to the actual edges as possible; and (3) minimal response: marking edges only once a single edge exists, and noise should not be identified as an edge. Thus, it is possible to use Fractional differential to enhance week edges16,17 and combine the Canny operator with a graph-based image segmentation algorithm to overcome over-merging when the parameters are set as relatively large.
This remainder of this paper is organized as follows: the Modified Canny operator section describes the modified Canny operator as well as its differences compared with the traditional operator. Then, the improved minimum spanning tree (MST), its relevance, fractional differential, and its comparison with the other similar algorithms are presented in the Modified minimum spanning tree algorithm and Canny operator section 3. Finally, the Conclusions section provides our conclusions.
Modified Canny operator
Because the Canny operator only uses a single scale to not only suppress noise, but also detect edges, it has two problems: a small scale is sensitive to noise, and a large scale leads to loss in edge information. Furthermore, even if a so-called appropriate scale is found out, it will still require a compromise between the sensitivity and accuracy of the detection results compared with those that could be obtained using the large or small scales. To address this issue, Bao et al. 18 enhanced the Canny edge detector using scale multiplication in order to strengthen the edges in an image while effectively suppressing noise. In this manner, on pre-sorting the pixels, the edges can be divided into two classes while constructing a graph G; in particular, one class is associated with the edge points wherein at least one of the two nodes is connected the edges to be an edge point, whereas the other class includes nodes that are not associated with any edges.
In our study, we used up to hundred different industrial images (e.g. particle images, crack images, etc.) for testing, and in this paper, six typical images are selected for the presentation of the algorithm effects, they are: three well-known images (Aircraft, Peppers and Lena) and three their noised images were used for image segmentation processing. We performed the above-mentioned modified Canny edge detector on the six images. Figure 1 shows the comparison between the results obtained using the original and modified Canny operators, where (a) to (c) shows three different original color images, the corresponding edge detection results by applying the modified Canny operator, and those using the traditional Canny operator, respectively. It is clear that the modified Canny detector can be used to accurately extract edge information and has significant advantages with respect to the suppression of noise and isolated points. In contrast, on using the traditional Canny edge detector, parts of the boundary information were lost, for example, for the edges in the bottom right part of the second image, where the objects are not identified effectively owing to noise.

Comparison between the edges detected using the modified and traditional Canny operators. (a) Original image; (b) edges obtained using the modified Canny operator; (c) edges obtained using the traditional Canny operator.
To prove the robustness of the modified Canny operator, 10% random noise is added to the images shown above and the performances of the modified and traditional Canny operators are compared again. Based on our obtained results, it was observed that the traditional Canny operator retains most of the noise points, and the modified Canny operator eliminates the noise points and effectively extracts the boundary information, see Figure 2.

Comparison between edges detecting using the modified and traditional Canny operators for noised images. (a) Image with 10% noise; (b) results obtained using the modified Canny operator; (c) results obtained using the traditional Canny operator.
Modified minimum spanning tree algorithm and Canny operator
The Minimum Spanning Tree (MST) algorithm proposed by Felzenszwalb involves mapping an image onto a weighted graph G(V, E), after which the image is segmented using the MST algorithm suggested by Krusal, which is based on the merging strategy. This method includes three parameters, namely σ, k and min_size, where σ is the Gaussian filter parameter; k is the key parameter of the threshold function, which is used to control the image segmentation level; and min_size is a re-merge parameter. In particular, two regions can be combined together if one region’s size in two adjacent domains is less than min_size. MST algorithm has a simple structure and it is computationally effective, however, it suffers from a few shortcomings. Therefore, we make the following improvements in terms of parameter k. Before image segmentation, in order to enhance week edges, we studied and used a fractional differential algorithm.
Fractional differential operator
Since a noisy image contains more or less weak edges which might be a part of object boundaries, no matter Canny edge detector or graph-based algorithm, the weak edge information will be ignored, and the segmentation result will be affected. In order to enhance week edges, we studied and used a fractional differential algorithm.
Generally, a two-dimensional images can be enhanced by using the first two-order differential algorithms such as edge detector Sobel, Laplacian or Canny, etc. Although these algorithms can sharpen the edges and textures, they increase noise much in some cases and are difficult to sharpen the weak edges in images. Fractional difference can partially detect the week edges and keep image noise lower. Hence, Fractional difference is suitable for the complicated images.19,20
For an energy function (
Then its Fourier transformation can be expressed as
We can see from equation (3) the comparison results of the amplitude–frequency characteristic curve of the fractional order differential, the first and the second orders.
The G-L definition of fractional order differential is made based on the classical definition of studying integral order derivative in a continuous function, and the order and dimension of the calculus from integer to fraction are extended. A brief explanation is as follows:
For
If one-dimensional signal s(t) is
The v order fractional expression of one-dimensional signal s(t) is deducted as
In all the n + 1 non-zero coefficient values, when the coefficient value of the first term is constant “1”, the other n non-zero coefficient values can be in the fractional order differential function. The n +1 non-zero coefficient values are in order as
It can be proved that the sum of all the n + 1 non-zero coefficient values will be equal to zero, which is the main different property between the fractional order differential and the integral order differential.
If we insert the coefficients into a 5 × 5 template, the fractional differential kernel can be got as shown in the left side of equation (8), which is the Tiansi kernel, and if the kernel is presented by a fractional order, the result can be presented in the right side of equation (8).
If k(i,j) is for a kernel function, the sum of the coefficients or the weights in a 5 × 5 template is written as.
In the kernel, if the coefficients of the fractional differential are calculated only based on the distances between the detecting point and its neighboring point, then a new kernel can be obtained: the coefficients (a1, a1-2, a2, a2-3, a3, a3-4) are got by using equations (7) and (9). In this case, there is no zero coefficient in the kernel. The values of the coefficients are computed according to the distances, for instance, when the distance is 1 pixel length, the coefficient is a1, and when the distance is
In a 5 × 5 kernel, the new kernel model is got as shown in the left side of equation (10). The coefficient computation rule is shown as in the right side of equation (10). In the above new kernel, there is no zero coefficient, the central point coefficient is w = (16v3−108v2+164v)/12 + 1, when v=0.5 or v=1.5, and w=5.75 which is closed to the central point coefficient u=6.0, not the fixed value 8 as in the traditional Tiansi kernel.
The kernel size selection is important, if it small, e.g. 3 × 3, we cannot get the good performance result, and the sharpening is rough; if it is large, e.g. more than 7 × 7, a lot of computation is needed and the result cannot be expected. Since the traditional Tiansi kernel is a 5 × 5 kernel, we also choose the new algorithm kernel size 5 × 5. As tested, when v = 0.5, the image sharpening result is the best in our case. According to the above description, the new algorithm can perform well for the week edge image sharpening and enhancement.
As Wu stated based on the experiments in his thesis, 21 when the fractional differential order v increases from 0.1 to 0.5, the weak edges will be sharpened gradually, but the noise can also be sharpened; when v is over 0.5, the noise will increase sharply. As shown in Figure 3, a simple pavement crack image with a rough surface is enhanced by different v values, when v is 0.7 or 0.8, there is a lot of noise. In our case of weak edge images with much noise, we choose v value as 0.5 to largely enhance weak edges, and the noise can be reduced by an ordinary image smooth filter such as Gaussian filter.

Image enhancement results of Different v. (a) Original image; (b) v = 0.1; (c) v = 0.3; (d) v = 0.5; (e) v = 0.7; (f) v = 0.8.
Improvements of minimum spanning tree algorithm
Ameliorating the difference between the intra-regional and inter-regional functions in MST
In the original form of MST, only the degree of difference in the region with maximum edge weight was represented, making it vulnerable to noise and isolated points, which consequently led to deterioration in the image segmentation results as well. To avoid this, the intra-regional differences were redefined as follows
This indicates that the intra-regional difference is equal to the average value of the edge weight w(e) of MST in the region, where N is the number of edges in MST, i.e. N = | C | −1.
In the similar manner, the inter-regional differences can be defined as follows
Ameliorating the edge weight function
The above-mentioned improvements are aimed at the segmentation criterion. In particular, the image segmentation effect of MST algorithm primarily depends on the following two aspects: the segmentation criteria and design of the weighting function. The weighting function proposed by Felzenszwalb represents only the absolute difference between the gray scale values, without taking the spatial positions of each pixel into consideration; therefore, the weighting function of the intra-regional edge is rewritten as follows
For the non-associated edge with the boundary points, the edge weight function is defined as follows
The advantages of above-mentioned modifications are to strengthen the algorithmic penalty for the boundary edges, which contributes to regional division. Hence, the steps of partitioning in the improved MST algorithm are as follows:
Pre-processing: Gaussian smoothing for the input image to remove noise; Edge detection: Determining the boundary information of an image using the improved Canny operator; Fractional differential: Using a 5 × 5 kernel sharpening week edges in the preprocessed image; Mapping an image to graph G (V, E): Construct an 8-linked weighted graph, |V | = n, |E | = m, and then divide the edges of the weighted graph into two classes: one of the classes includes edges not associated with the edge point of the image, which are set to E1, |E1|=m1, while the other class includes edges associated with the edge point of the image and are set to E2, | E2|=m2, where m1+ m2 = m. Furthermore, the connection weights are set to w (vi, vj) ; Sorting: E1 and E2 are arranged in the non-decreasing order separately to obtain the collection π1 = (O1, O2, … , Om1) , π2 = (Om1 + 1, Om1 + 2, … , Om) , then π = (O1, O2, … , Om) ; Initial State: Assume that the initial segmentation is S 0, where S 0 = (v1, v2, … , vn), i.e. each element (vertex) of V is a single region; repeat Step 5 for q = 1, 2, … , m; Looping: Suppose Sq−1 is the cut set after merging q−1 times, and then establish Sq from Sq−1 as follows. Let C q − 1 I and C q − 1 j be the components containing Vi and Vj, respectively, in S q−1; if C q − 1 i≠C q − 1 j, and Dif (C q − 1 i, C q − 1 j) ≤ min(Int (C q − 1 i)+τ (C q − 1 i), Int (C q − 1 j)+ τ (C q − 1 j)), then merge the clusters C q − 1 I and C q − 1 j to obtain Sq, else, do not merge them, i.e. Sq = Sq−1; Merging: Return S = Sm and then deal with S ground on the re-merging mechanism; Labeling: Assign the pixels belonging to the same region with the same color. Output: Output the image segmentation results.
The flowchart of the above-mentioned algorithm is shown in Figure 4 where 1 (indicated in red) is the part of the algorithm for the Canny operator, while 2 (indicated in red) is that of the fractional differential and the improved graph-based algorithm.

Flowchart for our proposed algorithm. In this figure, number 1 (indicted in red) is the part of the algorithm for the Canny operator, while number 2 (indicated in red) is that of the fractional differential and the improved graph-based algorithm.
Segmentation results and comparison
For comparison between different algorithms, including our proposed algorithm, we used different industrial images for experiments, where, to show the detailed information of the five algorithm results, we selected six typical images (they are three well known images: Aircraft, Peppers and Lena, and their noised images) for the testing results. The five image segmentation algorithms include the improved MST, original MST, Region merging algorithms22,23 and Clustering and FCM algorithms24–27 for the three original images from Figure 1. In addition, for the other three images in Figure 2, the 10% of noises are added on. And all the algorithms are tested on the three noised images. The tested results are shown in Figures 5 and 6. All of the corresponding parameters were set to be the same values in the two different graph-based algorithms. In addition, the segmentation results were shown by using different colors for the other three methods in order to allow for convenient and intuitive comparisons.

Major object marking (see digital figures) in the three images in Figure 1.

Segmentation results overlay the object boundaries of the manual segmentation, for the three algorithms compared in our study. (a1–a3) is for Improved algorithm; (b1–b3) is for Original graph-based algorithm; (c1–c3) is for Region merging algorithm; (d1–d3) is for Clustering algorithm; and (e1–e3) is for FCM algorithm.
In order to compare the image segmentation efficiency by different algorithms, we manually draw the object boundaries in the images, and we only marked 5–6 major objects (the objects can be seen clearly) in the images, respectively, and we take the non-marked objects as background. Since the over-segmented objects are easy to be merged together in the three images, the main problem for the image segmentation is under-segmentation in the three images. We count the number of merging between objects as OO, and the number of merging between object and back ground as OB. For in instance, in Figure 6(b1), object 1 and object 4 are merged together after image segmentation, and object 1 and object 2 are merged, so we count OO = 2; the object 1, 4, 3 merged with background (or non-marked objects), so we count OB = 3. Table 1 gives out counting results for the image segmentation efficiency by five different algorithms in Figure 6. For all the three images, Table 1 shows that the new algorithm produces less OO and OB, which means that it can have less under-segmentation problems than other algorithms.
Algorithm comparison for image segmentation of the three images.
Comparing the results from the five algorithms, it can be observed that our proposed algorithm can preserve more details of the images compared with the other algorithms; furthermore, it overcomes over-clustering when the parameters are set to comparatively large. As can be seen from the first row in Figure 6, because the head and top airfoil of the aircraft were misclassified as the background by the original MST algorithm, the shadow was integrated with the body of the aircraft. Clustering algorithm has the similar problem too. For Region merging algorithm, it is observed that there is the over-segmentation problem in several regions; some lines on the runway/airstrip are missing. For FCM algorithm, large parts of objects are classified into background. Anyhow, the improved MST segmentation algorithm over the other algorithms is that the new algorithm can consolidate the gradient regions of colors into one area, it can extract the detailed object information, and it has less over-segmentation and under-segmentation problems.
For the image of the peppers in the second row, the improved algorithm separately identified each pepper of the three large peppers, and the original MST algorithm and Region merging algorithm suffer from under-segmentation, especially for the large pepper on the bottom. For Clustering algorithm, the three large peppers with other parts are classified into one large object, and many small parts on right are segmented as a long shaped object, which is the under-segmentation problem. In the result of FCM, three large peppers are over-segmented, and the top-right parts are under-segmented.
Then, as can be seen in the third row, the new algorithm separated Lena’s face more clearly than the other algorithms. For the other algorithms, they suffer from under-segmentation more or less especially in the hat and face parts, and some parts, e.g. hair parts, are unclear.
For the other three images which have 10% noised in Figure 1, comparing to the new algorithm, the other four algorithms have more under-segmentation and over-segmentation problems, and are more easily affected by noise as shown in Figure 7. For example, in the first row of Figure 7, the proposed algorithm splits each part of the aircraft appropriately, compared with the segmentation results of the foreground and background obtained using the original graph-based algorithm, wherein the output is messy, and it is difficult to distinguish the different objects. Then, in the second row in Figure 7, the under-segmentation is still observed in the case of using the original MST algorithm. Furthermore, for the image in the third row, while the under-segmentation is observed, Lena’s face was segmented confusingly by utilizing the original MST algorithm. For Clustering algorithm, there is a big problem for under-segmentation; and for FCM, the over-segmentation problem is obvious. In all the three images, the results of the other algorithms are adversely affected by noise, leading to inaccurate splitting of the images into different parts. Hence, based on these observations, it can be said that the improved MST algorithm is good for preventing noise. The image segmentation results are listed in Table 2, and the new algorithm has less OO and OB, so the studied algorithm can make less under-segmentation results than the other four algorithms for this kind of noised images.

Comparison of the segmentation results obtained using the five algorithms for noisy images. (a1–a3) is for Improved MST algorithm; (b1–b3) is for Original MST algorithm; (c1–c3) is for Region merging algorithm; (d1–d3) is for Clustering algorithm; and (e1–e3) is for FCM algorithm.
Algorithm comparison for image segmentation of the three noised images.
Moreover, for the three images, the object boundaries were manually drawn, based on the manual segmentation results, the image segmentation precision of each algorithm was calculated separately; these results were compared and are listed in Table 1. It is clear that the proposed algorithm has significant advantages in terms of the accuracy of image segmentation.
Detailed legend: For the three original images in Figure 1 and the three noised images in Figure 2, the image segmentation accuracy (comparing to manual segmentation) of each algorithm was calculated separately; these results are compared with each other and are listed in Table 3. From the figures, it is clear that the proposed image segmentation algorithm has significant advantages in terms of the accuracy of image segmentation.
Segmentation accuracy of the five algorithms in Figures 5 and 6, respectively.
Conclusions
For the segmentation of images with much noise or/and weak edge characteristics, we proposed a novel algorithm that combines an improved Canny edge detector and an improved MST algorithm with improved Fractional differential algorithm. The new algorithm eliminates under-segmentation to some extent that is caused by over-merging using MST approach. Furthermore, by introducing the improved Canny edge detection operator for preliminary classification of pixels in an image before applying the improved MST algorithm to cluster the pixels, the effect of noise on segmentation is effectively reduced, thus improving the image segmentation accuracy by modifying the intra-regional and inter-regional difference functions and introducing the edge weight function. Since there is too may noise in an image in this study, we have to do Gaussian smoothing which can make edge weak, hence we add an improved Fractional differential algorithm to resolve the problem. Compared with the original MST, Region Merging, Clustering, and FCM algorithms, the studied algorithm has a smaller misclassification rate and the better image segmentation effect.
However, in the current work, only a preliminary study on noisy images was conducted using the proposed algorithm; nevertheless, some more issues are still needed, for example, determining the manner in which the image segmentation parameters in the improved MST algorithm can be dynamically set. These tasks will be addressed in the future study.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research is financially supported by the National Natural Science Fund in China (grant nos 61405037 and 61170147); the National Key R&D Program of China (grant no. 2016YFB0401503); the Science and Technology Planning Project of Fujian province (2018H6011); and the Training Program of Fujian Excellent Talents in University (FETU).
