Keywords

1 Introduction

Image segmentation is an important component in image processing. It divides the image into several mutually disjoint sub regions, where the values of pixels in each sub-region have a higher similarity, while the values among different sub-regions have a lower one. Due to their simplicity and efficiency, clustering approaches were one of the best techniques used for the texture image segmentation. Texture indicates contextual information of image pixels [1], and it has been used in image segmentation. Because segmentation of texture images depends on pixel feature that are difficult to define and capture, it is more challenging than segmentation only using intensity of pixel. There have been many different approaches for segmentation based on different pixel feature extraction methods (e.g. [2, 3] ).

Fuzzy c-means is one of the most popular methods for image segmentation because it doesn’t need to construct the similarity matrix, is easy to implement and can achieve reasonable results at some cases. But this algorithm has the following shortcomings: it does not consider any spatial information and is easy to converge to a local optimal solution. Max Mignotte [4] proposed an original and simple segmentation strategy based on the K-means algorithm that considered spatial constraints and overcame the problem of the local convergence. D. Yang et al. [5] presented a novel clustering index in Gaussian kernel in search process, which is helpful to find the partitions for the highly overlapping and contaminating samples. And in order to improve the speed, they employed the histogram statistics to implement the pixels partition. Spectral clustering is a kind of effective clustering algorithms, and it has been proven to be powerful to image segmentation [6], applicable to different type of data sets, effective with high dimensional data, convergent to global optimal solutions. Among spectral clustering algorithms, self-tuning spectral clustering (SSC) [7] is one of the most effective ones. Since image segmentation needs to process a large amount of data, directly using SSC algorithm in image processing will get a huge similarity matrix that is far beyond the processing ability for an ordinary computer. To overcome this difficulty, we propose a novel algorithm that uses the law of universal gravitation to sample data firstly and then use SSC algorithm to cluster the resulted data (the representative samples gotten in the first phase) exactly.

The remainder of this paper is organized as follows: Sect. 2 presents the related knowledge. The proposed algorithm is presented in Sect. 3. Section 4 demonstrates the experimental results.

2 Related Knowledge

2.1 The Law of Universal Gravitation

The law of universal gravitation states that any two objects exert a gravitational force of attraction on each other. The magnitude of the force is proportional to the product of the gravitational masses of the objects, and inversely proportional to the square of the distance between them, i.e.,

$$ F\left( {\text{t}} \right) = \frac{{Gm_{x} m_{y} }}{{d\left( {{\text{x}}\left( {\text{t}} \right),{\text{y}}\left( {\text{t}} \right)} \right)^{2} }} $$
(1)

where t means time, and G is the acceleration of gravity.

2.2 Orthogonal Design

Orthogonal design can sample a set of representative data from a large set of data using an orthogonal matrix \( L_{M} \left( {Q^{N} } \right) \) [8], where M refers to the number of data samples, N is the dimension of the data, Q is the number of possible values of data in each dimension called level with Q being odd generally, and M, Q N and J satisfy M = QJ and \( N{\kern 1pt} \le {\kern 1pt} \frac{{Q^{J} {\kern 1pt} - {\kern 1pt} 1}}{{Q{\kern 1pt} - {\kern 1pt} 1}} \) with J being the smallest positive integer.

3 The Proposed Algorithm

To do the image segmentation, we have to first select and extract the texture features of every pixel. Then, select the representative data (samples) from the texture features of pixels, and we call this step as “sampling”. Finally, cluster these representative samples.

3.1 Feature Extraction

Feature extraction for each pixel is one of the major issues for image segmentation. If the extracted features can be representative, then the image segmentation results will be better. We selected two kinds of representative features in our feature extraction stage. One is the gray level co-occurrence matrix, and the other is the gray histogram [9, 10, 11].

3.2 Sampling

To save the space and computation, we performed sampling on the data set firstly. We use orthogonal design to put some detectors in the data space, and these detectors move based on the law of universal gravitation, small mass detectors are attracted by larger ones and may move very near to larger ones. When the distance of two detectors is smaller than a given threshold value, they will be merged into one. When all detectors do not move and cannot be merged, they are called in a stable state and are seen them as the representative samples. The detail is as follows.

  1. 1.

    Put detectors and classify all data. Use the orthogonal design proposed in [8] to put detectors in the data space, e.g., yellow dots in Fig. 1(a). Then each detector x defines a set C(x) of data in the data space. Data z is in C(x) if and only if the degree of membership between data z and detector x is smaller than that between data z and any other detector. We call set C(x) the class set of detector x.

    Fig. 1.
    figure 1figure 1

    (a) Put the detectors on the image (yellow points represent detectors) (b) Detectors after moving and emerging (c) Result of segmentation by proposed method (each of different gray colors represents one cluster) (Colour figure online).

  2. 2.

    Move and merge. The mass of each detector is defined as the number of data points contained in the circle of radius E with itself as the center. Thus the mass of any detector cannot be smaller than 1. Detectors move based on the law of universal gravitation as follows.

    1. (I)

      Compute the radius E using Eq. (2),

      $$ E = pS/(2Q - 1) $$
      (2)

      where S is the largest distance between two data points in data sets, Q is defined in Sect. 2.2, p is a parameter to control the size of radius E. Based on experiments, it is better to take the value of p between 0.8 and 1.2.

    2. (II)

      Compute gravity between two detectors using Eq. (1) with G = 1.

    3. (III)

      For each detector x, find out a detector y in its neighborhood which has the largest gravity to x in the neighborhood, where the smaller mass detector will move to the larger mass one. Without loss of generality, suppose that the mass of y is smaller, then y will move to x by formula (3) iteratively.

      $$ y\left( {{\text{t}} + 1} \right) = \left( { 1 - \lambda } \right){\text{y}}\left( {\text{t}} \right) + \lambda x\left( {\text{t}} \right),\quad 0 < \lambda < 1 $$
      (3)

      where t is time, λrepresents the step size. We take λ = 1/3 in our experiments.

    4. (IV)

      If the distance between two detectors x and y is shorter thanαE, merge them and keep the larger mass detector, say x. Then, put data in C(y) into C(x) and delete C(y) and y. The parameterαis used to control the speed of the merge. In experiments, we set α = 0.25.

    5. (V)

      Repeat step (II) to (IV) until all detectors no longer move and merge, these detectors are representative samples. For example, the representative samples of detectors in Fig. 1(a) are shown in Fig. 1(b). If E is too small, the detectors may not move and merge. If E is too large, it will cause a lot of computation. Through the experiments we found that E is better to take the value between 0.8 and 1.2

  3. 3.

    These detectors are representative exemplars when they are in a stable state.

3.3 Clustering

After we get these representative exemplars from the previous phase, we will use the Self-tuning Spectral Clustering algorithm (SSC) to cluster these representative exemplars. For the details of algorithm SSC please refer to [7]. When these representative exemplars are grouped into several clusters, the classes C(x) of the exemplars of each cluster will form a cluster in the image segmentation.

4 Experimental Results

4.1 Dataset

In the experiments for image segmentation, we use one natural image from Berkeley segmentation dataset [12] and constructed two synthetic images by selecting several images from Brodatz database [13].

4.2 Results and Comparisons

Figure 2 shows the experimental results of the four compared algorithms (SOM [14], FCM [15], K-means and our proposed method) on two synthetic images (the first two images in Fig. 2) and one natural image (the third image in Fig. 2). Table 1 shows the comparison results of the accuracy on these three images. The accuracy is computed by Eq. (4), where the number of pixels correctly classified was computed by comparing the results obtained by the corresponding method with the manual segmentation results.

Fig. 2.
figure 2figure 2

Experimental results on the synthetic and natural images

Table 1. Comparison of Accuracy
$$ Accuracy = \frac{the\;number\;of\;pixels\;correctly\;classified}{the\;total\;number\;of\;pixels} $$
(4)

5 Conclusion

We propose a novel segmentation method for texture image. This method includes two phases, namely sampling and clustering. We design a new method for sampling based on the law of gravity, and then use the Self-tuning Spectral Clustering (SSC) to cluster the sampling results. The experiment results on synthetic and natural images indicate the proposed algorithm can achieve the higher segmentation accuracy compared to other three methods.