You are on page 1of 9

Fuzzy-connected 2D image segmentation

Mayor T. Walter
walter.mayortoro@usp.br
1 Introduction
In images, one of the most difficult tasks is their segmentation, which is a process of dividing
the image into regions of interest, which permits to analyze the image more easily, and,
additionally, these segments can be classified as object or non-object regions.
Broadly, segmentation methods can be divided into three categories: edge-based, regionbased, and model-based. The method performed in this paper is Fuzzy connectivity, which can
be classified as a region-based method, in which the regions are obtained by pixel connectivity,
and by using two criteria, fuzzy adjacency and fuzzy affinity. The first criterion is computed by
considering the distance between 2 pixels and the second is computed by bearing in mind the
similarity intensity measurement space.
The fuzzy-connected segmentation method presents some advantages; it can be used when
the image contains both random noise and shading. Furthermore, this method takes into
account the notion of hanging togetherness of image elements; a missing concept in other
researches.
The next part is a brief explanation of the process for obtaining fuzzy-connected 2D image
segmentation.
2 Methodology (materials)
To develop an image segmentation by fuzzy connection, it is necessary to know tree important
concepts; fuzzy adjacency, fuzzy affinity and fuzzy connectedness. The two latter terms are the
most complex computing tasks. Therefore, for performing these tasks, we took into account
the approach proposed by Lszl et al in [6]. They analyzed various ways to carry out fuzzyconnected segmentation and they stated in their research that: The optimality of an
algorithm depends on the input data as well as on the type of anity relations used; in
addition, it was found that the best solutions to develop the fuzzy connectedness were using
Dijkstras algorithm, with a data structure called Dials algorithm, which were implemented for
the purposes of this paper.
2.1 Fuzzy adjacency relation
It is a relation of distance between two pixels c and d, where c is the pixel of interest and d are
the pixels adjacent to c. To determine which pixels (d) are adjacent to c, there are basic
relationships; one of them is known as the neighbors of a pixel, which suggests that two pixels
are adjacent if they are neighbors. For 2D segmentation, this relation can be 4-neighbors of a
pixel (c) that are its vertical and horizontal neighbors or 8-neighbors that are its vertical,
horizontal and 4 diagonals neighbors. If the pixel is a neighbor, this takes the value of 1 and if it
is not a neighbor, takes the value of 0. Another way is to use a distance measure such as
Euclidean distance, city block distance or chess board distance. Distance measure method is

initially used by selecting a neighborhood ratio and then by setting all the pixels
pixel (d) within of
the ratio with their respective
ive distance from the pixel (d) to the pixel (c).

Fig.1 shows the methods for finding the adjacent pixels d to a pixel c. (a) and (b) is by using 4-neighbors,
4
(c) 8-neighbors,
neighbors, (d) city block distance and (e) chess board distance.

2.2 Fuzzy affinity relation (  )


It is the measure that determines
determin how close is the relation between two adjacent pixels (hang
together) is calculated, principally by considering the scene intensities.. It is possible to
develop
elop ease function that computes the fuzzy affinity by using only the scene intensities, but
there are usually more complex functions that yield better results. Thus, in segmentation
based on fuzzy connectedness,
connectedness nding a better function to compute the fuzzy anity
a
is one of
the dicult parts.
Different approaches to compute the fuzzy affinity were proposed by Udupa et al [1,2], where
 as follows :
   ,     ,     
 ,  
, 
 ,  1   
Where constant parameters  and  must satisfy:
   1

(2)

Functions h1 and h2 can be expressed by:


by
 ,  




 !"#$%#&
'()/+,


(3)

(1)

 ,  = 




 !"#$'#&
'()/+,


(4)

- ,  = 1  , 

(5)

/ ,  = 1  , 

(6)

The expression (1) can be rewritten as:


 ,  = 
,   0 ,  +  1 ,  (7)
Where 0 is the homogeneity-based component that describes how similar the intensity value
is within a region, by using the mean m1 and standard deviation s1 of the intensity of the
object of interest and 1 is the object-feature-based component that describes how close the
feature value (intensity) is to some specied object feature, by using the mean m2 and
standard deviation s2 of the intensity homogeneity of the object of interest
The linear combination of these two components manages to capture both the global
connectedness and the local hanging togetherness of the object of interest.
2.3 Fuzzy connectedness
It is a measurement that specifies the strength of connectivity between two pixels c and e, by
using the data of fuzzy affinity. The process to calculate the fuzzy connectedness begins by
searching all the paths that join two pixels c and e, where a path is known as a chain formed by
pairs of adjacent pixels with an affinity value in common. Then the strength of connectivity for
each path has to be determined. These are obtained by finding the minimum fuzzy affinity for
each path. Finally, the computing of the fuzzy connectedness is achieved by locating the
maximum strength of connectivity among all the strength previously computed for each path.

Fig. 2 illustrates the process for computing the fuzzy connectedness, in which (a) presents two paths
between pixels c and e. Then, (b) shows the strength of connectivity for each path (0.4 and 0.5), finally
(c) shows the fuzzy connectedness between c and e (0.5).

2.4 Dijkstras algorithm

In a fuzzy image segmentation,


segmentation finding the fuzzy connectedness is the most costly part in
terms of computational resources required;
required therefore a tool that permits to optimize the
process is necessary. This is known
know as Dijkstras algorithm that can be used to minimize a cost
function or, in the case of image segmentation,
segmentation to maximize the affinity function.
function

Fig.3 shows the performance of the Dijkstra`s algorithm for minimizing a function cost.
2.4 Dials algorithm
Dials algorithm is a mathematical tool that permits to organize a set of
of numbers
number (keys) in a
data structure called bucket. The set of data (see Fig.4a) has values from 0 to 1 and they are
divided into n equal-sized
sized subintervals (buckets see Fig.4b).
). To know the location that must
take a key into the array of buckets,
buckets it is necessary to use a hash function. Furthermore,
Furthermore Dials
algorithm uses a doubly or singly linked
li
list for organizing and for storing all the keys that will
be addressed to the same bucket (see Fig.4c).

Fig. 4 explains how Dial`s


ial`s algorithm work. (a) A set of numbers in an interval [0,1) , (b) an array of
buckets and (c) 4 doubly linked lists.
list

3 Results
For the results presented herein,
here an 4-neighbor fuzzy adjacency and a fuzzy affinity with the
form (3 and 4) were used, Also the Dijkstras algorithm was implemented and the dial`s
algorithm as data structure was developed.
developed Finally, the Otsu`s method was used (This method
was used directly of the functions already built in MATLAB) for obtaining a binary image. All
these algorithms were developed
develo
in MATLAB

Fig. 5 shows three thresholded objects (b), (c), (d) from the connectedness values obtained from image
(a) for seeds positioned in three different regions

Initially the fuzzy-connected


connected image segmentation algorithm was proved by segmenting
segment images
with short size (50x50) for which the results were good both in their segmentation and their
process time,, which was 0.23s on average. Other tests were developed with larger images, one
of them show in the Fig.5, in which a medical image of size 400x400 was used; the
segmentation was good but the process time considerably increased.

Fig. 6 shows the same segmented region three times, but for different positions of the seed into the
same region.

For developing the fuzzy-connected segmentation, it is initially necessary to select a seed,


which can be a pixel, a set of pixels or a path of pixels within the region of interest to be
segmented. In our case, we used a pixel as a seed, but to use a single pixel presents a problem,
which is illustrated in Fig. 6. The problem appears when the seed within the region is badly
selected, and captures bad information (intensity) about the region to be segmented and,
therefore, it can segment the object badly.

For the following results, the function imadjust of Matlab was additionally used for
previously changing the image contrast to segment this.

Fig.7 results of the fuzzy-connected image segmentation algorithm, for different adjustments of the
original image.

Another problem that does not allow achieving a good fuzzy segmentation is the high contrast
and low contrast present in the image that we to be segmented. Therefore an adjustment of
the image intensity has to be applied before developing the fuzzy segmentation algorithm.
Different examples of image segmented for different adjustments are shown in Fig. 7; the row
1 and 3 are the image with different adjustments and row 2 and 4 present the results of the
fuzzy connected algorithm for different adjustments of the intensity.

4 Conclusion and discussion


We present different results from the fuzzy-connected image segmentation algorithm, from
which we can conclude that the selection of the seed and the contrast adjustment play a very
important role in the final result of the segmentation. Also, we can observe in the different
images segmented that the affinity function used can capture both the global connectedness
and the local hanging togetherness of the object of interest.
The fuzzy connected image segmentation algorithm implemented herein compared to the
approach developed by Udupa et al in [7] presented a high performance in its process time,
but this process time was not as good as the approach of Udupa et al in [6]. Therefore if the
algorithm purposed herein is implemented in another programming language different to
MATLAB as java or C++, the algorithm will probably have a better performance

5 References
[1]. P.K. Saha, J. K. Udupa, and D. Odhner, Scale-Based FuzzyConnected Image Segmentation:
Theory, Algorithms, and Valida-tion, Computer Vision and Image Understanding, vol. 77,
pp. 145-174, 2000.
[2]. J.K. Udupa and S. Samarasekera, Fuzzy Connectedness and Object Definition: Theory,
Algorithms, and Applications in Image Segmentation, Graphical Models and Image
Processing, vol. 58, pp. 246-261, 1996.
[3]. Herman GT. Geometry of Digital Spaces. Boston, MA: Birkhauser, 1998
[4]. R.E. Tarjan, Data Structures and Network Algorithms, SIAM Publications, Philadelphia, PA,
1983 [chapters 3, 7].
[5]. T.H. Cormen, C.E. Leiserson, R.L. Rivest, Introduction to Algorithms, MIT Press, Cambridge,
MA, 1990 [chapters 7, 12, 16, 20, 21, 25].
[6]. L.G. Nyl, A.X. Falcao, J.K. Udupa ,Fuzzy-connected 3D image segmentation at interactive
speeds, Graphical Models and Image Processing, vol.64, pp. 259-281, 2003.
[7]. J.K. Udupa, L. Wei, S. Samarasekera, Y. Miki, M.A. van Buchem, R.I. Grossman, Multiple
sclerosis lesion quantication using fuzzy-connectedness principles, IEEE Trans. Med.
Imaging 16 (5) (1997) 598609.

You might also like