You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/251401579

Texture Based Segmentation Using Graph Cut and Gabor Filters1

Article in Pattern Recognition and Image Analysis · June 2011


DOI: 10.1134/S105466181102043X

CITATIONS READS

7 56

3 authors:

Miroslav Jiřík Tomáš Ryba


University of West Bohemia University of West Bohemia
23 PUBLICATIONS 44 CITATIONS 13 PUBLICATIONS 34 CITATIONS

SEE PROFILE SEE PROFILE

Miloš Železný
University of West Bohemia
81 PUBLICATIONS 347 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Quantification of microvessel density View project

Liver Segmentation View project

All content following this page was uploaded by Miroslav Jiřík on 19 January 2018.

The user has requested enhancement of the downloaded file.


GABOR FILTER AND GRAPH CUT BASED TEXTURE ANALYSIS 1
M. Jiřík2, T. Ryba3, M. Železný4
2
The University of West Bohemia, mjirik@kky.zcu.cz
3
The University of West Bohemia, tryba@kky.zcu.cz
4
The University of West Bohemia, zelezny@kky.zcu.cz

This paper describes a method for texture based segmentation. Texture features are
extracted by applying a bank of Gabor filters using two-sided convolution strategy.
Probability texture model is represented by Gaussian mixture that is trained with the
Expectation-maximization algorithm. Texture similarity, obtained this way, is used like
the input of a Graph cut method. We show that the combination of texture analysis and
the Graph cut method produce good results.

Introduction The popular boundary analyzing methods are


border tracing, deformable models etc. These
Image segmentation divides image into parts methods are shown in [5].
that are homogenous in some sense and have Some of these techniques either don´t have a
strong correlation with objects or areas in the clear cost function at all or compute only an
image. It is certainly an important part of approximate solution, which corresponds to
image processing. It is usually the first step local extreme that can be arbitrary far from the
leading to image understanding. There are two global optimum [4]. We can avoid these
main approaches to deal with this problem, difficulties by using the Graph cut method,
algorithms based on region and algorithms that combine the boundary and region
based on boundary analysis respectively. approaches. Solution obtained with this
Algorithms based on region approaches method is globally optimal with respect to the
grouped together all pixels, which belongs to a cost function. This method is useful for many
certain object. Belonging to the object is often applications but in texture based problems can
defined by using some criterion function that ´t give good results, due to the nature of this
distinguishes objects in the image. kind of problems.
The simplest region analyzing methods are for On the other hand, there are some techniques
example thresholding, region merging or developed for this kind of problem, for
splitting etc. example the Gabor filters or Local binary
The main goal of image segmentation based patterns [1].
on boundary detection is to find and analyze In article [6] another approach to texture
edges in the image. Because these edges are analysis is described. Here, first of all, the
defined in the image like places where texture element (texel) is detected applying a
significant difference in the intensity occurs, splitting-like algorithm. Further, the texture
one can assume, that they lie on the border characterized by this texel is described, this
between two different regions which belongs means that the equivalence class of a certain
to different objects. To find this kind of edges, structural description is identified using an
different, more or less complicated, energy function. To increase the accuracy of
edges-finding operators are used. Most of the contours, least squares spline
these operators take advantage of intensity approximation is used.
discontinuities. Among the most known Our approach combines texture analysis and
operators belong for example Prewitt’s, image segmentation. Texture analysis is
Sobel’s, Kirch’s, Canny’s etc.
1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.
realized via the Gabor filters and image
segmentation is realized with Graph cut. Our
goal is to segment two known textured objects
(see fig. 1) and this combination provides
promising results.

Fig. 2: Two-dimensional Gabor Filter

Parameter ϕ specifies a phase offset, γ is


2
the orientation, the parameter pair σ x and
σ 2y determines the receptive field and the
Fig. 1: Tested image with two textures mx , m y specifies the
parameter pair
center of the Gabor function in image
coordinates.
Texture analysis For feature extraction we use two-sided
convolution strategy. In this approach the filter
The first step for texture analysis is to extract is bisected with a line p into two half planes
texture features. We extract texture features by and convolution is performed on each side.
applying the bank of filters with various This strategy finds better borderlines between
orientations and spatial frequencies. For the textures. Schematic image of two-sided
filtering we use the Gabor filters because of convolution strategy is shown in figure 3.
their good properties. The family of two-
dimensional Gabor function G( x , y ) is
defined as gaussian kernel function modulated
by a sinusoidal plain wave. You can see image
of this 2D Gabor function on figure 2.
Equations which describe the 2D Gabor filter
are as follows (shown in [1]):

G( x , y )=α ( x , y )⋅cos(2 π x¿
λ
+ϕ ) (1)

α ( x , y)=exp −
( ) ( )
x¿
2 σ 2x
exp −
y¿
2σ 2y
(2)

x '=( x−m x ) cos ( γ )−( y −m x ) sin ( γ ) Fig. 3: Schematic image of two-sided convolution
(3) strategy
y ' =( x−m y ) cos ( γ )−( y−m y ) sin ( γ )
After the convolution of filters with training
image, we obtain filter responses R n . Here n

1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.
represents the direction of the half plane. From is equivalent to the maximum flow problem,
these responses we create a feature vector. which belongs to the classical optimizing
After texture features extraction, we need a problems.
texture model for good similarity measure. We The first step is to obtain a weighted graph
model the training textures in the feature G(V,E) from the image, where V represents set
vector space as a mixture of Gaussians (one of nodes and E represents set of edges. Each
model for each direction n): node corresponds to a pixel in the image and
each edge between these nodes corresponds to
K
a neighboring relationship between these
U n ( x P|Θn )=∑ α ni h ni ( x P|Θni ) (4) nodes and is called an n-link (neighborhood
i=1
link). The graph contains two additional nodes,

hi ( x|Θ i )=
(
exp −
1
2
T
( x−μ i ) Bi=1 ( x−μ i ) ) (5) the source (represents objects) and the sink
(represents background) respectively. These
D
special nodes are called terminals. Each node
(2 π ) 2
√ det Bi from the set V is connected to the terminals
with a link called t-link (terminal link).
Here, index P is a point in the image, XP is the We can imagine the graph like a pipeline
feature vector of the point P, α ni is a mixing system (in the basic version of Graph cut
method), described in [3]. Each pipe has own
weights, Θ n is a collection of parameters capacity given by the weight of the
{α n 1 ,…, α nK ; Θn1 ,…,ΘnK } . Function hni corresponding edge. Segmentation consists in
is a multivariate Gaussian density. This gradual filling this pipeline with a medium
mixture of Gaussians is trained by Expectation through the source and the leakage of this
Maximization algorithm. medium through the sink. Some of the pipes
The Expectation Maximization algorithm (or become saturated in this process, which means
simply EM algorithm for short) is used for that through this pipe flows the maximum
finding maximum likelihood estimates of value of the medium given by its capacity.
parameters in statistical models. It is an After a certain amount of water was sent to the
iterative method which alternates between system, there can occur a state in which there
expectation and maximization step. During the isn´t a path from the source to the sink without
expectation step, the current estimate of any saturated edge. In this case the
parameters is used for computation of new segmentation ends and the objects are
expectation. During the maximization step, separated from background by the set of the
parameters which maximizing the expectation saturated edges. This set of saturated edges
are computed. These estimated parameters are represents a cut of the graph. The graph, t-
then used as an input to the expectation step links, n-links and a cut of the graph are shown
and so on. in figure 4.
Before final segmentation the object texture
similarity and background texture similarity
are computed.

Image segmentation

Image segmentation is realized with Graph cut


method as mentioned above. The main goal of
this method is to find minimum cut in a graph
that represents an image. It is not easy to deal
with the problem of finding minimum cut in a
graph. Fortunately the minimum cut problem
1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.
Fig. 4: Cut in a graph In figure 5 are the terminal links presented.
They are computed by using the equation (10).
The resulting binary segmentation can be The higher the similarity is the lower intensity
defined as a labeling vector in the image. Figure 5 shows the background
L=( L 1 , L2 ,…, L|I|) terminal links and figure 6 shows the object
where each image pixel
terminal links.
pi takes a binary label Li ∈{ obj,bgd } .
The cost function C ( L ) that is minimized
with this process may be defined as λ-
weighted combination of a region property or
data term R ( L ) and a boundary property or
smoothness term B ( L ) :

C ( L )=λR ( L ) +B ( L ) (6)
R ( L )= ∑ R p ( L p ) (7)
p∈R p

B ( L )= ∑ B( p, q ) δ ( L p , L q ) (8)
( p ,q ) ∈N

δ ( L p , L q )=
{ 1 , L p ≠L q
0, otherwise
(9)
Fig. 5: Background terminal links

Here, λ, as stated above, specifies a relative


importance of region property term R ( L)
and boundary property term B(L) ,
R p ( Lp )
represents cost associated with
labeling pixel p as object ( L p=obj ) or
background ( L p=bgd ) and ( p,q ) B
describes local labeling discontinuity between
two neighboring pixels p, q. More details can
be found in [2, 3, 4, 5].

Cost of the links Fig. 6: Object terminal links

The cost of the terminal links represents


similarity between the object and the As mentioned above, n-link describes local
background texture. For each point we have labeling discontinuity in the image. We
one similarity per direction of a half plane. We created the cost function for texture
define the cost of the terminal links as discontinuity localization:
logarithm of arithmetic average of similarities.

( UO
)
B
For example for object texture: n ⋅U n'

Qn=log (11)
UO
n
⋅U nB
'

( )
N
1
R Op =−ln ∑ U O ( x |Θ )
N n=1 n P n
(10)
( N2 )mod N
n' = n+ (12)

1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.
( ) Q 2n We used this technique on many test images
Bnp =exp − (13) and compared the results with threshold,
2σ2 Gabor filters method (GF) and simple method
combining Gabor filters with Graph cut
Here, n´ represents the opposite direction of (GFGC), see table 1. For quantitative
n- th half plan, N is the number of directions, evaluation of the segmentation results, we use
index p indicates the point of the image and the classification errors FP (False positive) and
σ usually represents intensity variation. In
FN (False negative). False positive represents
this case it can be estimated as variation of the percentage of pixel which does not belong
Qn . to the object, but which has been assigned to
Figures 7 and 8 show the neighborhood links, it. On the other hand, false negative represents
calculated by using the equation (11). There, the percentage of pixels which belong to the
you can see the weights in vertical (fig. 7) and object, but which have been classified as
horizontal (fig. 8) direction. background.

Table 1. Methods comparison

Total
FP FN
error
Threshold 2.2793 3.7328 6.0121
Gabor filters 1.5012 5.3847 6.8859
GFGC 1.4958 6.0415 7.5373
Two sided GFGC 0.7164 0.2155 0.9319

Example

Figure 7 shows final segmentation using


Fig. 7: Vertical neighborhood links GFGC. Figure 8 shows final segmentation
using Two sided GFGC. It is obvious, that our
approach provides better results. Thanks to the
two sided convolution strategy the algorithm
has better resolution on textures borders,
especially in the corners. In GFGC the
similarity near texture boundary is confused.
After some more simple modifications, for
example using morphological operators like
opening, we can obtain even more accurate
results.

Fig. 8: Horizontal neighborhood links

Results

1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.
References

1. Xie, J.; Jiang, Y. & tat Tsui, H.: Segmentation of


kidney from ultrasound images based on texture and
shape priors Medical Imaging, IEEE Transactions
on, 2005, 24, 45 -57

2. Boykov, Y. & Jolly, M.-P.: Interactive Organ


Segmentation Using Graph Cuts MICCAI '00:
Proceedings of the Third International Conference
on Medical Image Computing and Computer-
Assisted Intervention, Springer-Verlag, 2000, 276-
286

3. Boykov, Y. & Kolmogorov, V.: An Experimental


Comparison of Min-cut/Max-flow Algorithms for
Fig. 7. Final segmentation using GFGC Energy Minimization in Vision EMMCVPR, 2001,
359-374

4. Boykov, Y. Y. & Jolly, M. P.: Interactive graph cuts


for optimal boundary & region segmentation of
objects in N-D images Computer Vision, 2001.
ICCV 2001. Proceedings. Eighth IEEE International
Conference on, 2001, 1, 105-112 vol.1

5. Šonka, M. & Hlaváč, V. & Boyle R.: Image


Processing, Analysis and Machine Vision, 3rd
edition, Thomson Learning, Toronto, April 2007,
821 p, ISBN 049508252X

6. Di Ruberto, C. & Vitulano, S. & Rodriguez, G.:


Image Segmentation by Texture Analysis, Image
Fig. 8. Final segmentation using two sided GFGC Analysis and Processing, International Conference
on, p. 376, 10th International Conference on Image
Analysis and Processing (ICIAP'99), 1999, ISBN 0-
7695-0040-4

Conclusion

In this paper new approach for texture based


image segmentation was presented. This
method uses Gabor filter responses and for
similarity estimation is used two sided
convolution strategy. These similarities are
used as an input for Graph cut method. We
proposed technique for computation weights
of n-links and t-links.
We tested this method on 300 images created
by 7 different textures. In the end of the article
we compared the results with other algorithms.
From tested algorithms achieved our approach
smallest error rate – more accurate by one
order.

1
The work has been supported by the grant of The University of West Bohemia: “Inteligentni
metody strojoveho vnimani a porozumneni”, project No. SGS-2010-054 and by the grant
ED1.1.00/02.0090 – New Technologies for Information Society.

View publication stats

You might also like