Improvement of Grayscale Image Segmentation Based ... - IEEE Xplore

3 downloads 2295 Views 534KB Size Report
CAD Research Center. School of Electrical ... information of greyscale image, an improved 2D entropy ... effective method for segmentation grayscale image.
2009 Fourth International Conference on Computer Sciences and Convergence Information Technology

Improvement of Grayscale Image Segmentation Based On PSO Algorithm Liping Zheng, Quanke Pan School of Computer Science Liaocheng University Liaocheng, Shandong, China [email protected]

Guangyao Li

Entropy;

Threshold

I. INTRODUCTION Grayscale image is a kind of image. CT and MRI are grayscale images. Image segmentation is to separate pixel of the image into some non-intersecting regions[1]. Image segmentation is the base of image 3D reconstruction. It is a critical step in image processing. At present, there isn’t a common segmentation algorithm. According to features of image and application purposes, different algorithms are used in application. Threshold segmentation method is a widely used and effective method for segmentation grayscale image. Segmentation results rely on the segmentation threshold value. Therefore it is very important to choose an optimal threshold value in grayscale segmentation. A.

II.

IMPROVEMENT OF 2D GRAY HISTOGRAM

While segment image with 2D threshold value method, associated 2D entropy need to be computed and obtain the optimal segmentation threshold value[8]. In order to reduce the solution time and improve the search efficiency, the gray histogram is improved in this paper.

Threshold Segmentation

Threshold segmentation method is one of the most important methods in image segmentation. This method utilizes features of pixels. That is said, object pixels and background pixels of image can be distinguished by their gray level values. In process of segmentation, the histogram of the image is usually used, other image information such as the spatial information is not utilized[2].By choosing an adequate threshold value and segmentation image, object can be extracted from grayscale image. Selection criterion of segmentation threshold value plays an important role in threshold segmentation method. In past years, many schemes have appeared in literature. Many different selection criterions were 978-0-7695-3896-9/09 $26.00 © 2009 IEEE DOI 10.1109/ICCIT.2009.68

School of Electrical Engineering, Zhengzhou University Zhengzhou, Henan, China

proposed, such as Otsu method[3], minimum error threshold value method[4]. In 1980, entropy-based selecting approach was proposed[5]. Kapur proposed the one-dimension entropy threshold value method[6]. When segment an image, one-dimension threshold value method solely depended on the gray-level distribution. While the Signal-to-Noise of image is low and the background of image is complex, segmentation results with one-dimensional entropy segmentation method are poor. Therefore, Abutaleb proposed two-dimension entropy method in 1989[7]. The two-dimension entropy is obtained from the two-dimension histogram which is constructed by using the gray value of image and the average gray value of image. Two-dimension entropy method is a region-dependent method. When computing optimal threshold value, two-dimension entropy method needs cost more time than one-dimension entropy method. In order to cut down the computation time and improve accuracy of segmentation threshold value, an improved 2D maximum entropy threshold segmentation method is proposed. This method narrows down the search space. And PSO algorithm is used to solve the optimal segmentation threshold value. PSO algorithm has advantages of quick convergence. Therefore it can cut down computation time. Improved 2D entropy is called spatial difference attribute information value entropy (SDAIVE). This improved threshold segmentation method based on PSO is called PSO-SDAIVE algorithm.

Abstract-Image segmentation is the base of image 3D reconstruction. It is a critical step in image processing. Threshold segmentation is a simple and important method in grayscale image segmentation. Maximum Entropy method is a common threshold segmentation method. This method only utilizes gray information. In order to adequately utilize spatial information of greyscale image, an improved 2D entropy segmentation method is proposed. This new method is called PSO-SDAIVE algorithm. In this new method, the computation of 2D entropy is improved. Otherwise, Particle Swarm Optimization(PSO) algorithm is used to solve maximum of improved entropy. Maximum takes as the optimal image segmentation threshold. In this paper, two head CT images are segmented in experiment. Compare with other segmentation method. Experimental results show that this new method can quickly and accurately obtain segmentation threshold. Otherwise, this method has strong anti-noise capability and saves computation time. Keywords: Grayscale Image; Segmentation; PSO Algorithm;

Jing Liang

CAD Research Center Tongji University Shanghai, China

A.

Traditional Gray Histogram

In traditional 2D gray histogram, the horizontal axis denotes the gray-level value of pixel. It’s range is from 0 to L-1; the vertical axis denotes the average gray-level value of pixel. It’s range is also from 0 to L-1. f(m,n) denotes the gray-level value of pixel which located at (m,n). The range of m is from one to M. The range of n is from one to N. That is m ∈ {1, 2,....M } and

n ∈ {1, 2,....N } . g(m,n) is the average gray value of the neighborhoods of pixel which located at (m,n). 442

In plan of 2D gray histogram, there are fore regions. Object pixels and background pixels locate the diagonal neighborhood. Noise points and edge pixels are far from diagonal. Object pixels locate in region A. Background pixels locate in region B. Noise points locate in region C. Edge pixels locate in region D. According to associated criterion, optimal segmentation threshold value is obtained, such as a pair of values (s, t). Value s represents the segmentation threshold value about gray of pixels. Value t represents the segmentation threshold value about average gray of pixels.

The essence of image segmentation with entropy is that utilize the gray probability and gray information of image. In general, gray information doesn’t include average gray value of pixels. Average gray is spatial information of pixels. In order to better utilize the gray information and spatial information of grayscale images, the improved computation method of 2D entropy is proposed in this paper.

B.

According to figure1, region A denotes the object region of grayscale image. Region B denotes the background region of grayscale image. Suppose mi denotes the number of pixels which gray value is i. The gray probability is defined by formula 1. fij denotes the number of pixels which gray value is i and average gray value is j. L −1 f M = ∑ mi , pij = ij i, j = 0,1," , L − 1 (1) M i =0

A.

Computation

of

Traditional

2D

Information

Entropy

The improvement of Gray Histogram

In traditional 2D gray histogram, the search space is big and the solving time of the optimal threshold value is long. In order to narrow down the search space, 2D gray histogram is improved in this paper. According to pixel attributes, the search region is narrowed. This improved 2D gray histogram is called 2D D-value attribute gray histogram. The horizontal axis of 2D D-value attribute gray histogram denotes gray value. The vertical axis denotes the D-value between gray value of pixels and average gray value of pixels. It denotes absolute value of the difference between f (m, n)

Suppose s is a gray value of pixel. t is an average gray value of pixel. The computation of information entropy is defined by formula 2. φ ( s, t ) = H (O ) + H ( B)

and g (m, n) . The histogram with a given attribute is called attribute histogram. In this paper, the associated attribute conditions are set. Attribute conditions are L1 < f (m, n) < L2 and f (m, n) − g (m, n) < μ .The attribute condition restricts the range of search space. That is the gray value of pixel is between L1 and L2. The average gray value is also in given range. Only pixels which satisfy attribute conditions can be searched.

s

s

t

= ln(∑∑ pij ) −

t

(∑∑ pij ln pij ) i =0 j =0

i =0 j =0

s

t

(2)

∑∑ p

ij

i =0 j =0

L −1

L −1

+ ln( ∑

L −1



i = s +1 j = t +1

pij ) −

(∑

L −1



pij ln pij )

i = s +1 j = t +1 L −1

L −1

∑∑

pij

i = s +1 j = t +1

B.

Spatial Information Function

According to gray value i and average gray value j, spatial information function is defined. When computing image 2D entropy, pixel spatial information value substitutes for gray probability. In this paper, only consider gray value and average gray. Suppose weights of gray and average gray are same. Therefore, spatial information function formula is defined as formula 3.

Figure 1: The plan of 2D D-value attribute gray histogram

⎛ (i + 1) 2 + ( j + 1) 2 ⎞ I (i, j ) = I ij = ⎜ ⎟ pij (3) 2 ⎝ ⎠

Figure1 shows the plan of 2D D-value attribute gray histogram and plan of traditional gray histogram. According to attribute conditions, pixels in region G and H are searched. A pair of value (s,w) represents segmentation threshold value. Impact of noise points are reduced by using this improved gray histogram. Comparing with the traditional 2D gray histogram, pixels in region G should satisfy the following conditions: L1 ≤ f (m, n) ≤ s and max{0, L1 − w} ≤ g ( m, n) ≤ min{s + w, L − 1}

Refer the 2D D-value attribute gray histogram and compute the information value entropy. This entropy is called spatial difference attribute information value entropy (SDAIVE).

C.

Computation of IMPROVED ENTROPY

Suppose threshold value pair (s,w), that is said, the gray value is s, and the gray D-value is w. According to figure 2, the range of gray value and the range of gray D-value are confirmed. Formula 4 defines the computation of improved information entropy. That is SDAIVE. In computation,

Pixels in region H should satisfy s + 1 ≤ f (m, n) ≤ L2 and max{0, s + 1 − w} ≤ g (m, n) ≤ min{L2 + w, L − 1} . III. THE IMPROVED 2D ENTROPY

443

the gray value range of object is from L1 to s. The gray value range of background is from s+1 to L2.

cognitive learning rate c1、social learning rate c2、the

V

maximum of particle flying speed max , the inertia weight factor ω 、constriction factor K. The population size of particles refers the number of particles in iterative process. In these algorithm models, the basic and earliest PSO model was defined by Eberhart and Kennedy[10]. It was called simple PSO model. The specific model as formula 6: vid (t + 1) = vid (t ) + c1r1 ( Pid (t ) − xid (t ))

ψ ( s, w) = H '(O) + H '( B) s

s

= ln ∑

w+ s



I ij +

i = L1 j = L1 − w

(− ∑

w+ s



I ij ln I ij )

i = L1 j = L1 − w s w+ s

∑ ∑

+ I ij

(4)

i = L1 j = L1 − w L2

ln

L2

w + L2

∑ ∑

I ij +

i = s +1 j = s +1 − w

(− ∑

w + L2



I ij ln I ij )

i = s +1 j = s +1 − w L2 w + L2

∑ ∑

+ c2 r2 ( Pgd (t ) − xid (t ))

I ij

xid (t + 1) = xid (t ) + vid (t + 1)

i = s +1 j = s +1− w

Formula 5 defines the maximum function. In this paper, the maximum of SDAIVE is taken as the selection criterion of threshold value. ( s, w)* = Arg Max (ψ ( s, w)) (5)

B.

Computation of Optimal Threshold with simple PSO

In this paper, the simple PSO algorithm is used. Because the sum of c2 and c1 should be 4, the values of parameters c2 and c1 are 2. The values of parameters r1 and r2 are 0.5. In experiment, the iterative formula of speed is simplified as formula 7: vid (t + 1) = vid (t ) + Pid (t ) + Pgd (t ) − 2 xid (t ) (7)

L1 < s < L2 ,0 < w < u

Solve the maximum of SDAIVE with some optimize algorithm and obtain the optimal segmentation threshold value of image. Then segment image with the optimal threshold value (s,w)*. In this paper, PSO algorithm is used to solve the SDAIVE maximum. Therefore, the new method is called PSO-SDAIVE algorithm.

Because gray value of pixel is integer, the solution of SDAIVE maximum can take as integer planning problem. Pixel particles move along the gray value(V-direction) and the gray D-value( μ -direction) at the same time. Speed and location of particles need iterate in two directions at the same time. In this paper, t denotes the particle generation. i denotes serial number of particle. viv denotes the speed

IV. COMPUTATION OF OPTIMAL THRESHOLD WITH PSO Particle Swarm Optimization(PSO) algorithm was jointly proposed by the American sociologist and psychologist of James Kennedy and electrical engineer Russell Eberhart in 1995. The basic idea of PSO algorithm was inspired by researching results of behavior about bird groups and makes use of a biological communities model which was proposed by biologist Frank Heppner.

A.

(6)

change in gray value direction. viμ denotes the speed change in gray D-value direction. xiv

denotes the

location change in gray value direction. xi μ denotes the location change in gray D-value direction. Piv (t ) and Pi μ (t ) are the corresponding particle locations of the SDAIVE maximum in t generation. Iterative formulas of speed and location as following: viv (t + 1) = viv (t ) + Piv (t ) + Pgv − 2 xiv (t ) (8)

PSO Algorithm

PSO algorithm is a Swarm Intelligence Algorithm. It takes particle as individual and flight with a certain speed in the search space. These particles haven’t quality and volume. Every particle has the simple rules of conduct. According to the flying experience of individuals and groups, particles can dynamically adjust the flying speed. Implementation of PSO algorithm is simple and easy. Since 1995, researchers proposed different algorithm models in different fields. PSO algorithm was analyzed and designed in different respects. Kenney constructed simple PSO model. Eberhart constructed PSO model with inertia weight factor. YuhuiShi and Clerc constructed PSO model with the shrinkage factor. These models were based on the simulation ideas of PSO. Through a large number of experiments, the significance and role of different control parameters in models were detailed analysis. Corresponding reference values were identified[9]. In PSO algorithm model, choices of parameters are the focus of research. There are six important control parameters in PSO algorithm. They are population size、

xiv (t + 1) = xiv (t ) + viv (t + 1)

(9)

viμ (t + 1) = viμ (t ) + Piμ (t ) + Pg μ − 2 xiμ (t ) (10) xiμ (t + 1) = xi μ (t ) + vi μ (t + 1)

(11)

Figure2: The evolution program of pixel particles

444

Figure2 represents the evolution program of pixel particles in the whole searching process. Vv and Vd represent particle speed in two directions. GB represents the location of SDAIVE maximum. That is said, it is location of optimal threshold in computation process.

C.

In order to validate the capability of algorithm which is proposed in this paper, CT images are took as example in experiment. CT image is a kind of medical image. It also is a kind of gray image. Therefore, two CT images were segmented in experiment. Experiment results were analyzed.

Execution process of PSO-SDAIVE Algorithm

A.

In whole PSO-SDAIVE flaw is shown in figure3. The PSO-SDAIVE algorithm has 5 steps.

Experiment Process

Input two head CT image IM10 and image IM10’. The type of image is uint16 grayscale image. The gray range is from 0 to 65535. Image IM10 hasn’t noise. IM10’ has ‘salt & pepper’ noise. The noise density is 0.04. Figure4 shows two head CT images.

Figure 4: Input IM10 and IM10’

In noise image, the range of grayscale is very big. The noise covers features of grayscale image It is difficult to segment image with noise. Therefore, the attribute conditions are supposed. The range of search space is narrowed. In this experiment, bones need to be separated from CT images. Therefore, bones were taken as object and other tissues were taken as background. By computing, the spatial average gray and difference gray are obtained. According to improved gray histogram, computed their H’(O) and H’(B) of two images. The SDAIVE maximum of image was solved with PSO. At last, optimal segmentation threshold values of two images were obtained.

B.

Figure3: The flaw graph of PSO-SDAIVE algorithm

1).Input image and calculate the number of image pixels. Compute the parameter spatial gray average and spatial information. Draw the 2D D-value histogram; 2).According to 2D D-value attribute histogram, compute information quantity of object region and background region in gray range; 3).Compute SDAIVE with formula and obtain associated discriminate function; 4).Solve the threshold pair(s,w) with PSO algorithm; 5).Ensure the optimal threshold and segment image with optimal threshold. V.

Experiment Results

While computing optimal threshold with PSO, twenty particles are taken as original particles. Table1 lists the twenty pixels of IM10. They are taken as original particles. Table2 lists the twenty pixels of IM10’. TABLE1 ORIGINAL PARTICLES in IM10

EXPERIMENT AND RESULTS 445

1

2

3

4

1

(1502, 1)

(1600,100)

(1700,30)

(1800,15)

2

(1900,50)

(2000,200)

(2100,150)

(2200,400)

3

(2300,500)

(2400,80)

(2500,180)

(2600,300)

4

(2700,250)

(2800,40)

(2650,20)

(2550,50)

5

(2300,400)

(2000,350)

(1900,220)

(1800,140)

TABLE2 ORIGINAL PARTICLES in

IM10’

VI. CONCLUSIONS

1

2

3

4

1

(1900, 100)

(1950,20)

(1500,60)

(1000,0)

2

(1150,20)

(1300,10)

(1450,50)

(1600,80)

3

(1750,100)

(1850,200)

(2000,300)

(2150,100)

4

(2100,200)

(2450,500)

(2600,400)

(2800,100)

5

(2700,500)

(2900,400)

(3500,500)

(4000,400)

The one-dimension entropy method only considers gray information. Spatial information of pixels is ignored. Therefore the spatial conjoint pixels can’t take into account in image. Otherwise, it has poor anti-noise capability. Two-dimension entropy method considers the spatial information and gray information, but the computing quantity is large. Improved 2D maximum entropy threshold segmentation method based on PSO is called PSO-SDAIVE algorithm. This algorithm not only considers the spatial information, but also considers the gray information and decreases the computing quantity. Otherwise, the neighboring pixel control parameter is set. The overly-smoothness of images can be avoided. In this paper, simple PSO model is used. In fact, there are many different PSO models. These models have their own advantages. In future, we will research the solving method of SDAIVE with different PSO models and search an optimal PSO model with shortest time.

By computing, the optimal threshold value of IM10 is 3 (2300, 500). The costing time is 2.813×10 . The optimal threshold value of IM10’ is (2350, 450). The costing time 3 is 8.7×10 . IM10 and IM10’ were segmented with their optimal threshold value. Figure 5 shows the segmentation results of two images.

REFERENCE [1] Pal N R., Pal S K. “A review on image segmentation techniques”, 1993, Pattern Recognition. [2] Glasbey, CA.: ‘An analysis of histogram-based thresholding algorithms’, CVGIP: Graphical Models and Image Process,1993,55,pp.532-537 [3] Otsu N.: “A threshold selection method from grey-level histograms”. IEEE Trans. System. Man Cybernet(1979) SMC-9:62-66. [4]. Kittiler J. Illingworth M., “Minimum error thresholding”. Pattern Recognition(1986),41-47. [5] Pun T. “A new method for grey-level picture thresholding using the entropy of the histogram”. Signal Process(1980)223-237; [6] Kapur J. N., Sahoo P.K. Wong A.:”A new method for gray-level picture thresholding using the entropy of the histogram. Computer Vision”, Graphics and Image Processing(1985)274-285. [7] Abutaleb A S. Automatic “thresholding of gray-level picture using two-dimensional entropies”. Pattern Recognition, 1989,47,pp :22-32 [8] Sahoo P K, Soltani S, Wong A K C, et al. “A svrvey of thresholding techniques”, Comput. Vision Graphics and Image Process, 41,pp.233-260,1988.

(a) IM10

[9] Carlisle A, Dozier G. “An Off-the-shelf PSO”. In Proceedings of the Workshop on Particle Swarm Optimization. Indianapolis, 2001. IN: Purdue School of Engineering and Technology, IUPUI(in press). [10] Kennedy J, Eberhart R. C. “Particle Swarm Optimization.” In: Proc. IEEE Int’l. Conf. on Neural Networks, IV. Piscataway, NJ: IEEE Service Center, 1995.

APPENDIX Subject is supported by National Natural Science Foundation of China. The serial number is 60771065 and 60874075.

(b)IM10’ Figure 5: The segmentation results of IM10 and IM10’

C.

Results Analysis

Experiment results show that this improved segmentation method has good anti-noise capability. The segmentation image is clear. Otherwise, the search space is small with PSO. The time of solving optimal threshold value is decreased. If using genetic algorithm, the computation quantity is also reduced, but the genetic algorithm is complex. The PSO algorithm is simple and easy to apprehend.

446

Suggest Documents