# Fast Image Segmentation Using Two-Dimensional Otsu Based on Estimation of Distribution Algorithm

Authors: Wuli Wang; Liming Duan; Yong Wang
Journal: Journal of Electrical and Computer Engineering
 (2017)

---

## Abstract

Traditional two-dimensional Otsu algorithm has several drawbacks; that is, the sum of probabilities of target and background is approximate to 1 inaccurately, the details of neighborhood image are not obvious, and the computational cost is high. In order to address these problems, a method of fast image segmentation using two-dimensional Otsu based on estimation of distribution algorithm is proposed. Firstly, in order to enhance the performance of image segmentation, the guided filtering is employed to improve neighborhood image template instead of mean filtering. Additionally, the probabilities of target and background in two-dimensional histogram are exactly calculated to get more accurate threshold. Finally, the trace of the interclass dispersion matrix is taken as the fitness function of estimation of distributed algorithm, and the optimal threshold is obtained by constructing and sampling the probability model. Extensive experimental results demonstrate that our method can effectively preserve details of the target, improve the segmentation precision, and reduce the running time of algorithms.


---

## Body

## 1. Introduction

Image segmentation is the technology and process of segmenting an image into multiple segments with characteristics and extracting regions of interest, and it is the basis of image analysis. The quality of image segmentation directly affects the results of the subsequent image processing [1].Image segmentation methods mainly include threshold method [2, 3], edge detection method [4], region method [5], graph cut method [6], clustering method [7–12], and machine learning based method [13–15]. In recent years, machine learning, especially the deep learning represented by convolution neural networks (CNN), has captured more attention in image segmentation [15–19]. However, such methods require a multitude of annotated images as samples for training, which is a very time-consuming. In addition, in practice, a small amount of real images as training sample, such as dozens of computed tomography (CT) scanning images, is unable to achieve the desired results.Threshold technique is simple and effective for image segmentation, which has been widely used in computer vision and pattern recognition. There are several popular threshold methods including Otsu, maximum entropy, minimum cross entropy, and histogram [20, 21]. Compared to other threshold segmentation methods, Otsu is the most popular for grayscale image segmentation [22]. In order to enhance the performance of the classical Otsu, a series of improvements have been proposed [23–26]. However, those improved Otsu methods still only use the one-dimensional gray histogram of image without considering the spatial information of image, which is similar to the classical Otsu method. When the image is affected by noneven brightness, noise, and other factors, the result of image segmentation is not ideal, even incorrect. For this reason, Liu and Li [27] extended the Otsu from one dimension to two dimensions and proposed an Otsu method based on two-dimensional gray histogram. By combining the pixel information with the spatial correlation information between the pixel and its neighborhood, the proposed method is able to provide better segmentation results than one-dimensional Otsu. Nevertheless, the two-dimensional Otsu enlarges the search space into two dimensions, which increases the complexity of the algorithm and expands the computational cost with exponential growth. Consequently, some fast algorithms have been proposed, one of which is the introduction of artificial intelligence algorithm. The intelligent search strategy is employed to speed up solving the global optimal threshold instead of exhaustion method. Sun [28] and Deng et al. [29] applied the genetic algorithm to image segmentation based two-dimensional Otsu, which improves the efficiency of algorithm to some extent but fails to address the premature convergence problem of genetic algorithm. The two-dimensional Otsu based artificial fish swarm algorithm [30] is not sensitive to the selection of initial value and parameter, robust, simple, and easy to implement, but easy to fall into local optimum and low convergence accuracy. Tang et al. [31] and Guo et al. [32] introduced the particle swarm algorithm into the method of image segmentation based on the two-dimensional Otsu. Although the algorithm manifests simple, easy to operate, and general characteristics, the diversity of particles disappears rapidly when the selection of the parameter or the population size is not appropriate. And the above defects of the algorithm can lead to precocious and fall into local optimum. Sun et al. [33] adopted a method of image segmentation using two-dimensional Otsu based on simulated annealing algorithm, which shows its superiority in searching the global minimal solution but also has the disadvantage of slow convergence speed. The above-mentioned two-dimensional Otsu methods based on intelligent algorithm enhance the calculation efficiency of two-dimensional Otsu to a certain extent. However, the sum of probabilities of target and background on the main diagonal of two-dimensional histogram is still approximately 1, which is similar to the traditional two-dimensional Otsu. This approximation has been proved to be incompatible with the real image by Fan and Zhao [34] and Wu et al. [35]. And the curve and oblique methods based on two-dimensional Otsu were, respectively, proposed to get a satisfying effect of image segmentation, but the applicability of these two methods is poor [36]. Furthermore, the existing two-dimensional Otsu methods employ the mean filtering template to construct two-dimensional histogram, which loses the edges and detailed features of the neighborhood image and influences the effect of image segmentation.In this paper, in order to improve the effect of segmentation and reduce computational cost of two-dimensional Otsu algorithm, a novel fast image segmentation method using two-dimensional Otsu based on estimation of distributed algorithm is proposed. Firstly, to obtain the approving performance of image segmentation, the guided filtering is employed to improve neighborhood image template instead of the mean filtering. Moreover, the probabilities of the target and background in two-dimensional histogram are exactly calculated to get more accurate threshold. Finally, in order to segment the image quickly and accurately, the estimation of distribution algorithm [37] with outstanding searching ability and fast convergence speed is applied to find the optimal segmentation threshold.


## 2. Improvements to Method of Two-Dimensional Otsu

The method of two-dimensional Otsu applies the two-dimensional histogram comprising the image gray and its neighborhood image average gray to find the optimal threshold and then divides the image into the target and background. The main diagonal regions I and III of the two-dimensional histogram denote, respectively, the target and background; the subdiagonal regions II and IV present severally the edge and noise, as shown in Figure1.Figure 1
Two-dimensional histogram.Under the method of traditional two-dimensional Otsu, the sum of probabilities of the target and background is approximate to 1, and the sum of probabilities of the edge and noise is approximate to 0. This approximation is only satisfied under certain conditions, which has been confirmed in theory and experiment by the literatures [34–36]. The accuracy of image segmentation is low when the approximation is not true. In addition, the neighborhood image is obtained by a mean filtering template under the method of traditional two-dimensional Otsu, which can effectively eliminate the Gaussian noise of image but also obscure the edge and detailed features of image and affect the performances of image segmentation. Therefore, in order to enhance the performances of image segmentation, the traditional two-dimensional Otsu is improved from two aspects: using the guided filtering to build a new neighborhood template and accurately calculating the probabilities of the target and background.


### 2.1. Construction of Neighborhood Template Based on Guided Filtering

In order to enhance the effect of image segmentation under two-dimensional Otsu method, we introduce the guided filtering to improve the neighborhood template, which can preferably preserve features of the edge and details [38]. The guided filtering is a filtering method that restrains the details of image and is similar to the bilateral filtering. However, compared with the bilateral filtering, the performance of guided filtering is better and the algorithm is faster. It can be regarded as a local linear model, defined as(1)qi=∑jWijIpj,where I represents the guided image, p denotes the input image, q stands for the output image, i, j is the index of the pixel, and Wij(I) is the filter kernel function, and defined as(2)WijI=1ω2∑k:i,j∈ωk1+Ii-μkIj-μkσk2+ε,where ωk is the kth window of kernel function, ω is the number of pixels in the window, μk and σk2 denote the mean value and the variance of a window in I, and ε is the smoothing factor. Here, the local window radius is set to 2, the value of ε is set to 0.04, and then the number of pixels in the window is ω=2×r+12=25.A new neighborhood template can be constructed by using the guided filtering with preserving the edge and details of image instead of the mean filtering, which can preferably construct the image two-dimensional histogram and advance the performance of image segmentation.


### 2.2. Exact Calculation of the Two-Dimensional Otsu

Step 1.
Construct two tuples according to the gray values of original image and the filtered neighbor image by the guided filtering, denoted as the gray value of original image and the gray value of neighbor image. If the frequency of two tuplesi,j is expressed as fij, then the corresponding joint probability density can be defined as(3)pij=fijN,i,j=1,2,…,L,where N is the number of pixels and L is the gray level of image, and there is(4)∑i=1L∑j=1Lpij=1.Step 2.
Calculate accurately the probabilitiesPI and PIII of the target and background regions in the two-dimensional histogram:(5)PI=∑i=1t∑j=1spij,PIII=∑i=t+1L∑j=s+1Lpij,where t and s represent the threshold values of original image and neighbor image, respectively.Step 3.
Calculate, respectively, the corresponding mean vectorsμ0∗ and μ1∗ of the target and background:(6)μ0∗=μ0i∗,μ0j∗T=∑i=1t∑j=1si·pijPI,∑i=1t∑j=1sj·pijPIT,μ1∗=μ1i∗,μ1j∗T=∑i=t+1L∑j=s+1Li·pijPIII,∑i=t+1L∑j=s+1Lj·pijPIIIT.Step 4.
Calculate the total mean vectorμT∗ on the two-dimensional histogram:(7)μT∗=μTi∗,μTj∗T=∑i=1L∑j=1Li·pij,∑i=1L∑j=1Lj·pijT.Step 5.
Calculate the trace of interclass dispersion matrixtrSB∗t,s:(8)trSB∗t,s=PIt,s·μ0i∗-μTi∗2+μ0j∗-μTj∗2+PIIIt,s·μ1i∗-μTi∗2+μ1j∗-μTj∗2=PIt,s∑i=1t∑j=1si·pijPIt,s-∑i=1L∑j=1Li·pij2+∑i=1t∑j=1sj·pijPIt,s-∑i=1L∑j=1Lj·pij2+PIIIt,s∑i=t+1L∑j=s+1Li·pijPIIIt,s-∑i=1L∑j=1Li·pij2+∑i=t+1L∑j=s+1Lj·pijPIIIt,s-∑i=1L∑j=1Lj·pij2.Step 6.
Calculate the optimal threshold(T∗,S∗):(9)T∗,S∗=arg⁡max1≤t,s≤L⁡trSB∗t,s.
The improved two-dimensional Otsu algorithm suffers from a high computational cost. Consequently, we introduce the estimation of distribution algorithm with favorable global convergence ability and high computation efficiency to find the optimal segmentation threshold(T∗,S∗).


## 2.1. Construction of Neighborhood Template Based on Guided Filtering

In order to enhance the effect of image segmentation under two-dimensional Otsu method, we introduce the guided filtering to improve the neighborhood template, which can preferably preserve features of the edge and details [38]. The guided filtering is a filtering method that restrains the details of image and is similar to the bilateral filtering. However, compared with the bilateral filtering, the performance of guided filtering is better and the algorithm is faster. It can be regarded as a local linear model, defined as(1)qi=∑jWijIpj,where I represents the guided image, p denotes the input image, q stands for the output image, i, j is the index of the pixel, and Wij(I) is the filter kernel function, and defined as(2)WijI=1ω2∑k:i,j∈ωk1+Ii-μkIj-μkσk2+ε,where ωk is the kth window of kernel function, ω is the number of pixels in the window, μk and σk2 denote the mean value and the variance of a window in I, and ε is the smoothing factor. Here, the local window radius is set to 2, the value of ε is set to 0.04, and then the number of pixels in the window is ω=2×r+12=25.A new neighborhood template can be constructed by using the guided filtering with preserving the edge and details of image instead of the mean filtering, which can preferably construct the image two-dimensional histogram and advance the performance of image segmentation.


## 2.2. Exact Calculation of the Two-Dimensional Otsu

Step 1.
Construct two tuples according to the gray values of original image and the filtered neighbor image by the guided filtering, denoted as the gray value of original image and the gray value of neighbor image. If the frequency of two tuplesi,j is expressed as fij, then the corresponding joint probability density can be defined as(3)pij=fijN,i,j=1,2,…,L,where N is the number of pixels and L is the gray level of image, and there is(4)∑i=1L∑j=1Lpij=1.Step 2.
Calculate accurately the probabilitiesPI and PIII of the target and background regions in the two-dimensional histogram:(5)PI=∑i=1t∑j=1spij,PIII=∑i=t+1L∑j=s+1Lpij,where t and s represent the threshold values of original image and neighbor image, respectively.Step 3.
Calculate, respectively, the corresponding mean vectorsμ0∗ and μ1∗ of the target and background:(6)μ0∗=μ0i∗,μ0j∗T=∑i=1t∑j=1si·pijPI,∑i=1t∑j=1sj·pijPIT,μ1∗=μ1i∗,μ1j∗T=∑i=t+1L∑j=s+1Li·pijPIII,∑i=t+1L∑j=s+1Lj·pijPIIIT.Step 4.
Calculate the total mean vectorμT∗ on the two-dimensional histogram:(7)μT∗=μTi∗,μTj∗T=∑i=1L∑j=1Li·pij,∑i=1L∑j=1Lj·pijT.Step 5.
Calculate the trace of interclass dispersion matrixtrSB∗t,s:(8)trSB∗t,s=PIt,s·μ0i∗-μTi∗2+μ0j∗-μTj∗2+PIIIt,s·μ1i∗-μTi∗2+μ1j∗-μTj∗2=PIt,s∑i=1t∑j=1si·pijPIt,s-∑i=1L∑j=1Li·pij2+∑i=1t∑j=1sj·pijPIt,s-∑i=1L∑j=1Lj·pij2+PIIIt,s∑i=t+1L∑j=s+1Li·pijPIIIt,s-∑i=1L∑j=1Li·pij2+∑i=t+1L∑j=s+1Lj·pijPIIIt,s-∑i=1L∑j=1Lj·pij2.Step 6.
Calculate the optimal threshold(T∗,S∗):(9)T∗,S∗=arg⁡max1≤t,s≤L⁡trSB∗t,s.
The improved two-dimensional Otsu algorithm suffers from a high computational cost. Consequently, we introduce the estimation of distribution algorithm with favorable global convergence ability and high computation efficiency to find the optimal segmentation threshold(T∗,S∗).


## 3. Fast Image Segmentation Using Two-Dimensional Otsu Method Based on Estimation of Distribution Algorithm

As a new type of optimization algorithm in the field of evolutionary computation, the estimation of distribution algorithm proposes a new evolutionary model [39]. There are no genetic operations such as crossover and mutation in the estimation of distribution algorithm, which is different from the traditional evolutionary algorithm. The estimation of distribution algorithm predicts the best searching region according to sampling and statistical learning for searching space and generates the optimal new individual. The algorithm using the macrolevel evolution method based on search space has superior global search ability and positive convergence rate [38]. The two-dimensional Otsu method searches the optimal combination of image threshold and neighborhood image threshold in the global range, and the two variables are independent of each other. Accordingly, the variable independent estimation of distribution algorithm is employed to solve the optimal segmentation threshold in the two-dimensional Otsu.The gray value of a pixel in the image and a pixel in its neighborhood image is represented by the individualX=x1,x2, where the ranges of x1 and x2 are 0 to 255. The ith individual in the gth generation is denoted as Xig=xi1g,xi2g, the population size is indicated by the PopSize, and the largest generation of evolution is expressed by the MaxGen. The flowchart of image segmentation using two-dimensional Otsu based on estimation of distribution algorithm is shown in Figure 2, and the concrete steps are as follows.Figure 2
Flowchart of image segmentation using two-dimensional Otsu based on estimation of distribution.Step 1 (initialize the population).
The current evolutionary generationg is initialized to 1, and the initial population is obtained by random sampling referring to the literature [40]:(10)Popul1=Xi1∣i=1,2,…,PopSize.Step 2 (calculate the individual fitness).
The trace of interclass dispersion matrix is regarded as the fitness function, as seen in (8). Firstly, let t=xi1g, s=xi2g in (8), and calculate fitness value fitnessXig of individual Xig in the gth generation. Then similar method is applied to calculate the fitness values of other individuals in the gth generation. Finally, the fitness values of all individuals are obtained:(11)Fitng=fitnessXig∣i=1,2,…,PopSize.Step 3 (obtain the optimal fitness and the best individual).
Calculate the optimal fitnessBestFitng=Max(Fitng), and the corresponding individual is the best individual Xbestg=xbest1g,xbest2g in the population.Step 4 (determine whether the termination condition is satisfied).
If the evolutionary generationg is not greater than MaxGen, then Step 5 is performed; otherwise, the optimization process is terminated, and the optimal fitness BestFitnMaxGen and the best individual XbestMaxGen are obtained; Step 9 is performed.Step 5 (select the individual for establishing probability model).
In order to ensure that the probability model is sensitive to the search process, the individual who is used to construct the probability model must be able to accurately track the information of probability model. For the sake of preventing the algorithm into local optimal, the individual selection should have a certain randomness. Roulette is a proportion of random selection method. On the one hand, in order to ensure the tracking accuracy of probability model, the individual is selected according to the probability of alleles per gene bit. On the other hand, this method does not guarantee that the allele of large probability must be selected and has a certain randomness. In this paper, when the fitness value is the largest, the optimal segmentation threshold is obtained. Therefore, the roulette selection method based on fitness is adopted; that is, the probability that each individual is selected is proportional to its fitness. The specific steps are as follows:(1)
Calculate the relative fitness of each individualfitnessXig/∑fitnessXig, denoted as pk, where k=1,2,…,PopSize and ∑pk=1.(2)
According to relative fitnesspk, the disc is divided into PopSize copies, where the central angle of the kth fan is 2πpk.(3)
Simulate the roulette operation, that is, to generate a random number between 0 and 1. Ifp1+p2+⋯+pk-1<r and r<p1+p2+⋯+pk, then individual Xkg is selected, denoted as X1g′.(4)
Repeat step (3) until the PopSize excellent individuals Xig′∣i=1,2,…,PopSize have been obtained.Step 6 (establish the probability model).
Firstly, construct the Gaussian distribution function according to the excellent individual selected by Step5. Then, calculate the mean and standard deviation of the first variable for all individuals:(12)X1g¯=∑Xi1g′PopSize,σ1g=∑Xi1g′-X1g¯2PopSize,where i=1,2,…,PopSize. Mean X2g¯ and standard deviation σ2g of the second variable of all individuals are calculated in a similar manner. The probability distribution function can be expressed as follows: (13)x1~NX1g¯,σ1g,x2~NX2g¯,σ2g.Step 7 (obtain the new population by sampling).
The sampling method depends on the probability model used by the algorithm. Therefore, the next generation population is generated on the basis of the constructed Gaussian distribution function:(14)Populg+1=Xig+1∣i=1,2,…,PopSize.The individual of the population is denoted as Xig+1=(xi1g+1,xi2g+1), where xi1g+1~N(X1g¯,σ1g), xi2g+1~N(X2g¯,σ2g).Step 8 (establish the diverse population).
In order to enhance the diversity of population and avoid the excessive effect on the population, in the first place,p individuals are randomly removed from the current population, where p=roundPopSize/10 and round(x) represents an integer that is closest to x. Then, the optimal p individuals in the previous population are appended to the current population to establish a diverse population. Finally, return to Step 2 and recalculate the fitness of each individual.Step 9 (image segmentation).
On the basis of the optimal thresholdT∗=xbest1MaxGen, S∗=xbest2MaxGen obtained by Step 4, the two-dimensional Otsu method is employed to segment the image.


## 4. Experimental Results and Analyses

In order to evaluate the performance of image segmentation and the efficiency of the proposed method, a large number of industrial computed tomography (CT) images of different mechanical parts and many images from popular image segmentation dataset are used to test. Extensive experimental results are compared with the results of the following approaches, that is, Otsu, 2D Otsu [27], 2D Otsu-GA [29], 2D Otsu-FSA [30], LCK [10], LSD [11], and ME + PPD [3], quantitatively and qualitatively.


### 4.1. Comparisons of Segmentation on Real Image

Figure3 shows the results of image segmentation regarding five real industrial CT images with Gaussian noise under different methods. The cylinder head, carburetor, nuts, aluminum part, and bearing are arranged from left to right; the original image, the results of the traditional two-dimensional Otsu, the results of the 2D Otsu-FSA, the results of the 2D Otsu-GA, and the results of our method are distributed from top to bottom. In order to compare objectively the performances of the above methods, the population size of genetic algorithm, fish swarm algorithm, and estimation of distribution algorithm are set to 20, and evolutionary generations (or optimization times) are set to 50.Figure 3
Segmentation effect of various methods for different images.The experimental results are shown in Figure3. For industrial CT images of the nuts and bearing with clear boundary and large target and background discrimination, the above methods can preferably segment the target and background, and the effect is preferable. However, for industrial CT images of the cylinder head, carburetor, and aluminum part with relative blurred boundary, there is a certain gap in the segmentation effects of each method. For the cylinder head image, the traditional two-dimensional Otsu is poor for the detail at the upper right corner of image, and the 2D Otsu-FSA and the 2D Otsu-GA lose the details at the upper right corner and the upper left corner of image, which is inconsistent with the original image. For the carburetor image, we can intuitively see that the detailed features at the bottom of image are lost after the traditional two-dimensional Otsu, the 2D Otsu-FSA, and the 2D Otsu-GA. For the aluminum part image, the traditional two-dimensional Otsu and the 2D Otsu-GA process incorrectly a noise at the upper right of image as a target. Though the noise is well processed by the 2D Otsu-FSA, the detailed feature (i.e., hole) above the left image is lost. The segmentation result of the 2D Otsu-GA also lost the detail, that is, the hole. It can be seen the proposed method can preferably preserve the details of original images with blurred boundary from the last line in Figure 3.


### 4.2. Comparisons of Computational Cost on Real Image

The computational cost of two-dimensional Otsu based on intelligent algorithm is mainly reflected in calculation of the fitness of individual. In the case of the same population size, the computational cost of different algorithms are qualitatively evaluated by comparing the evolutionary generation of population when the algorithms reach convergence state.The maximum fitness convergence curves of the aluminum part are obtained by using two-dimensional Otsu methods based on intelligent algorithm, as shown in Figures4–6. The 2D Otsu-FSA: if the population size n is equal to 10, the fitness is convergent until the number of iterations is about 40. If the population size n is equal to 20, the fitness is convergent when the number of iterations is about 22. If the population size n is equal to 30, the fitness has converged when the number of iterations is close to 12. The 2D Otsu-GA: if the population size n is equal to 10, the fitness is convergent when the number of iterations is about 45. However, the fitness of the algorithm is obviously fluctuant in the process of convergence, which reflects the evolutionary disorder affected by variant randomness under the genetic algorithm. If the population size n is equal to 20, the fitness is convergent when the number of iterations is about 35. If the population size n equals 30, the fitness is convergent when the number of iterations is about 25. Our method: if the population size n equals 10, 20, or 30, the fitness has converged when the number of iterations is only about 25, 10, or 3. In addition, the results of the proposed method are stable after convergence.Figure 4
The highest fitness convergence curve based on 2D Otsu-FSA.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30Figure 5
The highest fitness convergence curve based on 2D Otsu-GA.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30Figure 6
The highest fitness convergence curve of our method.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30According to the above experimental results and analyses, for solving the optimal threshold of two-dimensional Otsu, the estimation of distribution algorithm requires fewer population size and few number of iterations than the genetic algorithm and the fish swarm algorithm. In other words, the estimation of distribution algorithm can effectively reduce the computational cost.Moreover, in order to compare the efficiencies of the proposed method and the existing methods, objectively and precisely, the mean time of image segmentation under different methods is counted. Table1 illustrates the mean time of 10 segmentations for 5 industrial CT images. According to the data in Table 1, the speed of the proposed method is about 10, 5, and 3 times faster than the traditional two-dimensional Otsu, 2D Otsu-FSA, and 2D Otsu-GA, respectively.Table 1
Comparison of segmentation time under different methods (s).
Image
Our method
Traditional 2D Otsu
2D Otsu-FSA
2D Otsu-GA
Cylinder head
0.23
2.53
1.25
0.92
Carburetor
0.28
2.66
1.31
0.97
Nuts
0.24
2.58
1.27
0.94
Aluminum part
0.30
2.71
1.39
1.02
Bearing
0.29
2.68
1.37
0.99


### 4.3. Comparisons of Segmentation on Image Dataset

In this section, we compare our method with Otsu, 2D Otsu, 2D Otsu-FSA, 2D Otsu-GA, ME + PPD, LCK, and LSD on a host of images that come from popular image datasets. As an example, we select a grain image and a tire image from the general image library, a duck image and a bird image from the BSD500 image dataset, and a motorcycle image from the VOC image dataset to demonstrate the comparative results, as illustrated in Figure7. For rice grains image, our method can preferably retain the completeness of rice grains. Especially at the bottom of the image, it can better preserve the structural characteristics of rice grains and segment the target from the background. Fortunately, LCK and LSD can also detect the target efficiently. However, these two methods require a high computational cost. With regard to the tire image segmented by the proposed method, the contour details of eight axis are clear; the edges between the inner and outer rings of the tire are favorable. Moreover, the middle four screws are very easy to identify and have only a small black background. For the duck image with simple background, each of above-mentioned methods can obtain a promising result. However, the proposed method can preferably preserve the details, such as the mouth and tail. Compared with 2D Otsu, 2D Otsu-FSA, ME + PPD, and LSD, our method can preferably extract the edges of target on the bird image. Furthermore, our method can more accurately segment out the claw comparing with Otsu, 2D Otsu-GA, ME + PPD, LCK, and LSD. For the motorcycle image with complex contour and scene, the proposed method is favorable on the details, such as the rearview mirror and support and rear seat. ME + PPD and LCK obtain a preferable performance of the global segmentation. Nevertheless, LCK is time-consuming.Figure 7
Comparisons of image segmentation under various methods.The computational costs of the above methods on the five images in Table2 are also measured. From this table, we can see that the computational cost of our method is lower than the other methods except Otsu. However, Otsu’s segmentation results are not very good.Table 2
Comparisons of computational costs (s).
Method
Image
Rice
Tire
Duck
Bird
Motorcycle
Otsu
0.011
0.012
0.013
0.015
0.018
2D Otsu
1.46
1.41
2.01
1.71
1.52
2D Otsu-FSA
0.62
0.64
1.16
1.05
0.68
2D Otsu-GA
0.46
0.51
0.86
0.79
0.53
ME + PPD
0.32
0.38
0.28
0.22
0.27
LCK
5.63
13.25
22.36
23.50
19.72
LSD
4.52
9.64
19.45
16.37
15.21
Our
0.14
0.18
0.12
0.09
0.13


## 4.1. Comparisons of Segmentation on Real Image

Figure3 shows the results of image segmentation regarding five real industrial CT images with Gaussian noise under different methods. The cylinder head, carburetor, nuts, aluminum part, and bearing are arranged from left to right; the original image, the results of the traditional two-dimensional Otsu, the results of the 2D Otsu-FSA, the results of the 2D Otsu-GA, and the results of our method are distributed from top to bottom. In order to compare objectively the performances of the above methods, the population size of genetic algorithm, fish swarm algorithm, and estimation of distribution algorithm are set to 20, and evolutionary generations (or optimization times) are set to 50.Figure 3
Segmentation effect of various methods for different images.The experimental results are shown in Figure3. For industrial CT images of the nuts and bearing with clear boundary and large target and background discrimination, the above methods can preferably segment the target and background, and the effect is preferable. However, for industrial CT images of the cylinder head, carburetor, and aluminum part with relative blurred boundary, there is a certain gap in the segmentation effects of each method. For the cylinder head image, the traditional two-dimensional Otsu is poor for the detail at the upper right corner of image, and the 2D Otsu-FSA and the 2D Otsu-GA lose the details at the upper right corner and the upper left corner of image, which is inconsistent with the original image. For the carburetor image, we can intuitively see that the detailed features at the bottom of image are lost after the traditional two-dimensional Otsu, the 2D Otsu-FSA, and the 2D Otsu-GA. For the aluminum part image, the traditional two-dimensional Otsu and the 2D Otsu-GA process incorrectly a noise at the upper right of image as a target. Though the noise is well processed by the 2D Otsu-FSA, the detailed feature (i.e., hole) above the left image is lost. The segmentation result of the 2D Otsu-GA also lost the detail, that is, the hole. It can be seen the proposed method can preferably preserve the details of original images with blurred boundary from the last line in Figure 3.


## 4.2. Comparisons of Computational Cost on Real Image

The computational cost of two-dimensional Otsu based on intelligent algorithm is mainly reflected in calculation of the fitness of individual. In the case of the same population size, the computational cost of different algorithms are qualitatively evaluated by comparing the evolutionary generation of population when the algorithms reach convergence state.The maximum fitness convergence curves of the aluminum part are obtained by using two-dimensional Otsu methods based on intelligent algorithm, as shown in Figures4–6. The 2D Otsu-FSA: if the population size n is equal to 10, the fitness is convergent until the number of iterations is about 40. If the population size n is equal to 20, the fitness is convergent when the number of iterations is about 22. If the population size n is equal to 30, the fitness has converged when the number of iterations is close to 12. The 2D Otsu-GA: if the population size n is equal to 10, the fitness is convergent when the number of iterations is about 45. However, the fitness of the algorithm is obviously fluctuant in the process of convergence, which reflects the evolutionary disorder affected by variant randomness under the genetic algorithm. If the population size n is equal to 20, the fitness is convergent when the number of iterations is about 35. If the population size n equals 30, the fitness is convergent when the number of iterations is about 25. Our method: if the population size n equals 10, 20, or 30, the fitness has converged when the number of iterations is only about 25, 10, or 3. In addition, the results of the proposed method are stable after convergence.Figure 4
The highest fitness convergence curve based on 2D Otsu-FSA.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30Figure 5
The highest fitness convergence curve based on 2D Otsu-GA.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30Figure 6
The highest fitness convergence curve of our method.
(a)
n
=
10
(b)
n
=
20
(c)
n
=
30According to the above experimental results and analyses, for solving the optimal threshold of two-dimensional Otsu, the estimation of distribution algorithm requires fewer population size and few number of iterations than the genetic algorithm and the fish swarm algorithm. In other words, the estimation of distribution algorithm can effectively reduce the computational cost.Moreover, in order to compare the efficiencies of the proposed method and the existing methods, objectively and precisely, the mean time of image segmentation under different methods is counted. Table1 illustrates the mean time of 10 segmentations for 5 industrial CT images. According to the data in Table 1, the speed of the proposed method is about 10, 5, and 3 times faster than the traditional two-dimensional Otsu, 2D Otsu-FSA, and 2D Otsu-GA, respectively.Table 1
Comparison of segmentation time under different methods (s).
Image
Our method
Traditional 2D Otsu
2D Otsu-FSA
2D Otsu-GA
Cylinder head
0.23
2.53
1.25
0.92
Carburetor
0.28
2.66
1.31
0.97
Nuts
0.24
2.58
1.27
0.94
Aluminum part
0.30
2.71
1.39
1.02
Bearing
0.29
2.68
1.37
0.99


## 4.3. Comparisons of Segmentation on Image Dataset

In this section, we compare our method with Otsu, 2D Otsu, 2D Otsu-FSA, 2D Otsu-GA, ME + PPD, LCK, and LSD on a host of images that come from popular image datasets. As an example, we select a grain image and a tire image from the general image library, a duck image and a bird image from the BSD500 image dataset, and a motorcycle image from the VOC image dataset to demonstrate the comparative results, as illustrated in Figure7. For rice grains image, our method can preferably retain the completeness of rice grains. Especially at the bottom of the image, it can better preserve the structural characteristics of rice grains and segment the target from the background. Fortunately, LCK and LSD can also detect the target efficiently. However, these two methods require a high computational cost. With regard to the tire image segmented by the proposed method, the contour details of eight axis are clear; the edges between the inner and outer rings of the tire are favorable. Moreover, the middle four screws are very easy to identify and have only a small black background. For the duck image with simple background, each of above-mentioned methods can obtain a promising result. However, the proposed method can preferably preserve the details, such as the mouth and tail. Compared with 2D Otsu, 2D Otsu-FSA, ME + PPD, and LSD, our method can preferably extract the edges of target on the bird image. Furthermore, our method can more accurately segment out the claw comparing with Otsu, 2D Otsu-GA, ME + PPD, LCK, and LSD. For the motorcycle image with complex contour and scene, the proposed method is favorable on the details, such as the rearview mirror and support and rear seat. ME + PPD and LCK obtain a preferable performance of the global segmentation. Nevertheless, LCK is time-consuming.Figure 7
Comparisons of image segmentation under various methods.The computational costs of the above methods on the five images in Table2 are also measured. From this table, we can see that the computational cost of our method is lower than the other methods except Otsu. However, Otsu’s segmentation results are not very good.Table 2
Comparisons of computational costs (s).
Method
Image
Rice
Tire
Duck
Bird
Motorcycle
Otsu
0.011
0.012
0.013
0.015
0.018
2D Otsu
1.46
1.41
2.01
1.71
1.52
2D Otsu-FSA
0.62
0.64
1.16
1.05
0.68
2D Otsu-GA
0.46
0.51
0.86
0.79
0.53
ME + PPD
0.32
0.38
0.28
0.22
0.27
LCK
5.63
13.25
22.36
23.50
19.72
LSD
4.52
9.64
19.45
16.37
15.21
Our
0.14
0.18
0.12
0.09
0.13


## 5. Conclusion

In this paper, we present a fast image segmentation method using two-dimensional Otsu based on estimation of distribution algorithm. The proposed method can preferably preserve the edges and details of the object because the guided filtering template is replaced with the mean filtering template. Furthermore, compared with other existing image segmentation methods, our method has desirable segmentation performance and computational cost for image with simple scene. However, similar to other threshold-based image segmentation methods, our method is preferable for the images with the same gray scale range; it has a limitation to the object with large gray scale distribution. In addition, the actual segmentation effect of our method is not perfect in complex scene.In the future, we plan to preprocess the object so that our segmentation method can perform well for special objects as well as handle more complex images.



---

*Source: 1735176-2017-09-11.xml*