gation with the aim of detecting doors in indoor ... (H) represents the colour tone (for example, red or blue) .... door have at least one corner point in its frame.
A Fuzzy Colour Image Segmentation Applied to Robot Vision J. Chamorro-Martínez, D. Sánchez and B. Prados-Suárez
Department of Computer Science and Articial Intelligence. University of Granada, 18071 Granada, Spain E-mail: {jesus,daniel,belenps}@decsai.ugr.es
Abstract
dition.
The growing region techniques [7] and
the split and merge algorithms [1] are two exIn this paper, a new growing region algorithm to
amples of this group. The last type of segmen-
segment colour images is proposed. A region is
tation methods corresponds to the edge based
dened as a fuzzy subset of connected pixels and
algorithms, where a region is dened as a set of
it is constructed using topographic and colour
pixels bounded by a colour contour [11].
information. To guide the growing region pro-
In real images, the separation between regions
cess, a distance dened in the HSI colour space
is usually imprecise.
is proposed. This distance is used both to select
This is one of the main
problems of the crisp segmentation techniques,
the pixels which will be linked in each step of
where each pixel have to belong to an unique
the algorithm, and to calculate membership de-
region. To solve this problem, some approaches
gree of each point to each region. The proposed
propose the denition of region as a fuzzy subset
technique is applied to vision-guided robot navi-
of pixels, in such a way that every pixel of the
gation with the aim of detecting doors in indoor
image has a membership degree to that region
environments.
[3].
Keyword: Colour image segmentation, fuzzy
In this sense, many algorithms have been
developed to segment grey scale images, but the
segmentation, colour distance, robot vision.
fuzzy segmentation of colour images has been paid less attention.
1
Introduction
Other important aspect to take into account is the colour information processing. The most
The image segmentation, view as the process of
common solutions in the literature are (i) com-
dividing the image into signicant regions, is one
bining the information of each band into a sin-
of the most widely used step in image process-
gle value before processing (for example, the
ing.
gradient),
Usually, this operation allows to arrange
or (ii) analyzing each band sepa-
the image in order to make it more understand-
rately and then combining the results (for ex-
able for higher levels of the analysis (for exam-
ample, histogram analysis of each band and sub-
ple, in image database retrieval [4], motion esti-
sequent combination). Apart from the diculty
mation [10] or robot navigation [2, 8]).
to choose an adequate criterion to pool the data, the main problem of these approaches is the
Many types of segmentation techniques have They can be
application of the same combination rule to the
grouped into three main categories correspond-
whole image, without considering the particu-
ing to three dierent denitions of regions: the
larities that appear in the comparison of two
methods in the rst group, called pixel based
colours.
segmentation methods, dene a region as a set of
methods, like those based on growing region,
pixels satisfying a class membership function. In
where the decision in each step depends on the
this category are included the histogram based
dierence between pixels.
been proposed in the literature.
techniques [5] and the segmentation by cluster-
That problem is most signicant in
In this paper, a new growing region algorithm
ing algorithms [12]. The methods in the second
to segment colour images is proposed.
group, corresponding to the area based segmen-
approach, a region is dened as a fuzzy sub-
tation techniques, consider a region like a set
set of connected pixels and it is constructed us-
of connected pixels satisfying a uniformity con-
ing topographic and colour information, i.e., two
1
In our
pixels will be assigned to the same region if they are connected through a path of similar colours. To process the colour information, a distance dened in the HSI colour space is proposed. This distance is used in the growth of a region both (i) to select the pixels which will be linked in each step of the algorithm, and (ii) to calculate the membership degree of each point to each region. Although the proposed algorithm is a multipurpose segmentation technique, in this paper it has been applied to vision-guided robot navigation in indoor environments. Concretely, it has been used to detect doors with the aim of moving a robot to the exit of the room.
2
Colour space
Figure 1: HSI colour space
Many colour spaces may be used in image processing:
RGB, YIQ, HSI, HSV, etc.
[9].
Although the RGB is the most used model to
2.1
acquire digital images, it is well known that it is
Once the colour space is selected, a distance
not adequate for colour image segmentation. In-
between two colour points
stead, other colour spaces based on human per-
pi = [Hi , Si , Ii ]
pj = [Hj , Sj , Ij ] is dened.
For this purpose, we
ception (HSI, HSV or HLS) seem to be a better
Distance between colours
and
rst dene the dierences between components
choice for this purpose [9]. In these systems, hue
as:
(H) represents the colour tone (for example, red
|Hi − Hj | if |Hi − Hj | ≤ π 2π − |Hi − Hj | otherwise dS = |Si − Sj | dI = |Ii − Ij |
or blue), saturation (S) is the amount of colour
dH =
that is present (for example, bright red or pale red) and the third component (called intensity, value or lightness) is the amount of light (it al-
(2)
lows the distinction between a dark colour and with
a light colour).
dH , dS
dI
and
being the distances be-
In this paper, the HSI colour space will be
tween hue, saturation and intensity respectively.
used. This model separate the colour informa-
Based on the previous distances, the following
tion in ways that correspond to the human vi-
equation will be used to measure the dierence
sual system.
between colours:
Moreover, it oers many advan-
tages in a segmentation process (for example,
dC (pi , pj ) =
the use of hue avoids the shading eects). Geo-
h
2
2
(d1 ) + (d2 )
. i1/2 2
(3)
metrically, this colour space is represented as a
d1
cone, in which the axis of the cone is the grey
where
scale progression from black to white, distance
intensities given by
from the central axis is the saturation, and the
M AXI
direction is the hue (gure 1).
mum level of intensity (usually 255), and
images in RGB coordinates, it is necessary to
0 dHS d2 (pi , pj ) = dS
dene a relationship between RGB and HSI systems. In this paper, the following transform is applied [9]:
3(G+B) 2R−G−B
d1 = dI / M AXI
with
being a constant equals to the maxi-
d2
is
dened as
Since we use a digital camera to acquire
√
is the normalized dierence between
if pi or pj are achromatic if pi and pj are chromatic otherwise (4)
H = arctan S = 1 − min {R, G, B}/ I I = (R + G + B)/ 3
with (1)
dHS =
r
2
2
(dS ) + (dH /π)
/2
being a
distance which combines information about hue and saturation. Notice that
2
dC (pi , pj ) ∈ [0, 1].
In the previous equation we introduce the notions of chromaticity/achromacitiy to manage two well known problems of the HSI representation: the imprecision of the hue when the intensity or the saturation are small, and the nonrepresentativity of saturation under low levels of intensity.
An often practical solution to solve
this problem is to perform a partition of the colour space based on the chromaticity degree of each point. In equation (4), we propose to split the HSI space into three regions:
chromatic,
semi-chromatic and achromatic (gure 1). This partition is dened on the basis of two thresholds
TI
and
TS
: the rst one,
TI , correspond to
Figure 2: Example of seed points selection
the level of intensity under which both hue and saturation are imprecise; the second one,
Ts , de-
nes the value of saturation under which the hue
In our approach, we have considered that a
is imprecise (but not the intensity). Therefore,
door have at least one corner point in its frame.
pi = [Hi , Si , Ii ] will be achromatic if Ii ≤ TI (black zone in gure 1), semi-chromatic if Ii > TI and Si ≤ TS (grey zone in gure 1), and chromatic if Ii > TI and Si > TS (white a point
Based on the previous assumption, the seed selection is performed in two steps.
band using the Harris method [6]. Afterwards, a
zone in gure 1). In this paper, the thresholds have been xed empirically to and
In the rst
one, corner points are detected in the intensity couple of seeds are put at a distance
TI = M AXI/5
D from each
corner in the direction of its gradient (one per
Ts = 1/5.
each way). In this paper,
D
has been xed to
7
pixels. Figure 2 shows an example where twelve
3
Segmentation method
seed points have been marked corresponding to six corner points (they are showed with green crosses and red points respectively).
Our approach will segment the colour image in
It would be desirable for each door to contain
two steps:
a single seed, but this is not often the case. In1. Firstly, a set of seed points , noted as
{s1 , s2 , . . . , sq },
deed, it is usual to nd several seeds into the
Θ=
same door (which implies several regions).
will be calculated.
To
solve this problem, the proposed algorithm will 2. Secondly, a collection of fuzzy sets, noted as
discard seeds during the segmentation process.
n o e = Se1 , Se2 , . . . , Seq , will be dened from Θ Θ. For this purpose, a method to calculate
This point will be explained in detail in section 3.3. Although the previous seed selection method
the membership degree of a given pixel to a fuzzy set
Sek
has
will be proposed based on
been
designed
for
a
particular
case,
a
general one could be considered in order to give
topographic an colour information.
more generality to the technique (for example, In the following sections, the previous stages will
seed regions could be located in the local min-
be analyzed in detail.
ima calculated over the gradient of the image). This will be an object of future research.
3.1
Seed points
In the growing region methods, the selection of
3.2
Fuzzy regions
seeds that hopefully may correspond to structural units is a critical step. Due to this paper
In this section, a method to fuzzify a set of seed
is focused in a particular application, i.e., the
points
localization of doors in indoor environments, a
this purpose, a membership function for fuzzy
seed point selection is proposed for this specic
regions is dened (section 3.2.2) based on a dis-
case.
tance between pixels (section 3.2.1).
3
Θ = {s1 , s2 , . . . , sq }
is proposed.
For
Algorithm 1 Algorithm to calculate
dP
Input:
I
Image
of size
N ×M
sv
Seed point Notation:
Contour(L) : N eighbor(pi )
Pixels in the contour of a region : 8-neighborhood of
L
pi
1.-Initialization
dP (sv , sv ) = 0 L = {sv } Card(L) 6= N × M (pin , pout ) = argmin {dC (pi , pj ) / pi ∈ Contour(L) , pj ∈ N eighbor(pi ) \ L} (pi , pj ) dP (pout , sv ) = max [dP (pin , ss ), dC (pin , pout )] (1) L = L ∪ {pout }
2.- While
3.2.1 Let
Q
pixels
Distance between pixels
distance between
ij be the set of possibles paths linking the pi and pj through pixels of the image I .
Given a path
πij ∈
3.2.2
(5) of
πij ,
pr+1 are dC (pr , ps ) is
and
will be high. That
Membership function for fuzzy regions
cost(πij ) = max {dC (pr , pr+1 ) / pr , pr+1 ∈ πij } and
pj ,
the edge, with a high distance between them.
points on the path:
pr
and
points, in the portion of the path that cross over
Q
ij , its cost is dened as the greatest distance between two consecutive
where
pi
is because of the fact that there are consecutive
The membership degree
two consecutive points
a fuzzy region
dened in equation (3)
fv S
v
of a pixel
pi
to
is dened as
and measures the distance between colours. Let
Q ∗ πij ∈ ij be the optimum path between pi and pj dened as the path that link both points with
µSe (pi )
1 − d∗P (pi , sv ) ∗ k=1 (1 − dP (pi , sk ))
µSe (pi ) = Pq v
(8)
minimum cost:
∗ πij =
argmin {cost(πi,j )} πi,j ∈ Πi,j
sv ∈ Θ is the seed point of d∗P (pi , sv ) is dened as where
(6)
Based on the previous denition, the distance between two pixels
pi
and
pj
is dened as the
cost of the optimum path from
dP (pi , pj ) = Let
us
remark
that
pi
to
(paths linking the pixels) and distances between
fuzzy regions
colours. In addition, it is sensitive to the pres-
set of seed
ence of edges in the following sense: if the op-
pj
v=1
ship degree of every point
sv ∈ Θ.
and
Pq
µSe (pi ) = 1. v
Using
the equation (8) we can calculate the member-
dened
in (7) make use of topographic information
pi
1 if pi ∈ Θ , pi 6= sv dP (pi , sv ) otherwise
Let us remark that
(7)
distance
timum path linking two points
and
pj :
∗ cost(πij ) the
d∗P (pi , sv ) =
fv , S
pi ∈ I
to each seed
That allows n us to obtaino the set of
e = Se1 , Se2 , . . . , Seq from Θ points Θ = {s1 , s2 , . . . , sq }.
the
pass
1 Notice that d (p , s ) has been calculated in a prein v P vious step
through an edge (that is, a point which separate two regions), its cost, and consequently the
4
3.3
Algorithm
Given a set of seed points
Θ = {s1 , s2 , . . . , sq },
a growing region algorithm is applied to each
sv ∈ Θ in order to obtain the set of fuzzy ren o e e e S1 , S2 , . . . , Seq . For each sv ∈ Θ, gions Θ = the membership degree µ (pi ) is obtained for Se v
every point of the image using the equation (8).
For this purpose, it is necessary to calculate the distance
dP (pi , sv )
given by equation (7). The
algorithm 1 calculates that distance for all the
I with respect to a given sv ∈ Θ. Its computational complexity is O(nK), where n = N · M is the number of pixels of the image, and K is dened as K = max {N, M } (notice that the maximum size of a contour is 4(N + M )). Due to the alpoints
pi
of an image
seed point
Figure 3: Mobile robot Nomad 200
gorithm have to be applied for each seed point
of them are closed, in the second one there are
Θ, the overall process has a complexity O(qnK), where q is the number of seeds.
an open door in the foreground and a close one
of
of
behind it. In both cases, our approach obtains
As we mentioned in section 3.1, it is usual to
one fuzzy region for each door (gure 4(K-L)).
nd several seeds into the same region. To over-
On the image 4(E), the algorithm generates four
sv ∈ Θ,
regions: one of them corresponds to the back-
verifying
ground, another one is associated to a label, and
This new
the last two regions correspond to the doors. On
step may be introduced in the algorithm 1 with-
the example 4(F) our technique obtains eight
out increase its complexity.
In this paper, the
fuzzy regions, four of them corresponding to the
0.01.
two doors and its frames (gure 4(L)). The num-
come this problem, given a seed point all the seeds of the subset
dP (sv , su ) < C
constant
C
{su }u=1..K
will be eliminated.
has been xed to
ber of seeds was
4
Results
applied to dierent colour images.
respectively.
the results show that our methodology detect
To acquire
the doors without split them in several regions. That reveals that the use of a distance which
connected to the mobile robot Nomad 200 has
consider both colour and topographic informa-
been used (gure 3). the
30
dierent brightness (see the door in image B),
these images, a SONY EVI-401 colour camera
of
and
degradation in the luminance and zones with
The proposed segmentation method has been
Six
9
Although in all the examples there are a
images
used
for
testing
tion improves the results.
our
methodology are showed in gure 4(A-F). To
5
show the results, the segmentation has been defuzzied allocating each pixel to the region for
Conclusions
which it has the highest membership degree.
A new fuzzy methodology to segment colour im-
The examples 4(A-D) show images with a single
ages has been presented. The technique is based
closed door. In all the cases, the proposed algo-
on the growth of regions which are treated as
rithm generates a fuzzy region corresponding to
fuzzy subsets.
the door (the associated crisp region is showed
tion, a distance between pixels has been dened
in blue colour in gure 4(G-J)). The number of
in the HSI colour space.
regions obtained are
5, 10, 4
3
Using that distance
respectively,
and topographic information, the membership
although the number of seeds detected in each
degree of each point to each region has been
case was
12, 34, 14
and
12
and
To manage the colour informa-
respectively.
That
calculated.
Our experiments suggest the com-
reveals the goodness of the method proposed to
bination of the proposed colour distance and
discard seeds during the segmentation process
the growing region process improve the results obtained with the classical segmentation tech-
The examples 4(E-F) correspond to images
niques.
with two doors. Whereas in the rst case both
5
D B C A A
for interactive robots.
G
Proc. IEEE Inter.
Conf. on Intelligent Robots and Systems, 3:2061 2066, 2000. [3] B.M. Cavalho, C.J. Gau, G.T. Herman, and T.Y. Kong. Algorithms for fuzzy segmentation. Proc. Inter. Conf. on Advances
in Pattern Recognition, pages 15463, 1999.
B
H
[4] J.M. Fuertes, M. Lucena, N. Perez de la Blanca,
and J. Chamorro-Martinez.
scheme
of
databases.
colour
image
retrieval
A from
Pattern Recognition Letters,
22:323337, 2001.
C
[5] A. Gillet, L. Macaire, C. Botte-Lococq, and
I
J.G Postaire. Color image segmentation by fuzzy morphological transformation of the 3d color histogram. Proc. 10th IEEE Inter.
Conf. on Fuzzy Systems, 2:824 824, 2001. [6] C.G. Harris and M. Stephens.
D
A com-
bined corner and edge detection. Proc. 4th
J
ALVEY Vision Conference, pages 147151, 1988. [7] A. Moghaddamzadeh and N. Bourbakis. A fuzzy region growing approach for segmentation of color images. Pattern Recognition, 30(6):867881, 1997.
E
K
[8] E Natonek.
Fast range image segmenta-
tion for servicing robots. Proc. IEEE Inter.
Conf. on Robotics and Automation, 1:406 411, 1998. [9] J.C. Russ.
book.
L
F
The Image Processing Hand-
CRC Press and IEEE Press, third
edition, 1999. [10] L. Salgado,
N. Garcia,
and E. Rendon.
J.M. Menendez,
Ecient image segmen-
tation for region-based motion estimation and compensation. Proc. IEEE Trans. on
Circuits and Systems for Video Technology,
Figure 4 : Segmentation results
10(7):1029 1039, 2000. [11] A. Shiji and N. Hamada. Color image seg-
References
mentation method using watershed algorithm and contour information. Proc Inter.
[1] G.A. Borges and M.J. Aldon. A split-and-
Conf. on Image Processing, 4:305 309,
merge segmentation algorithm for line ex-
1999.
traction in 2d range images. Proc. 15th In-
[12] D.X. Zhong and H. Yan. Color image seg-
ter. Conf. on Pattern Recognition, 1:441
mentation using color space analysis and
444, 2000.
fuzzy clustering. [2] J. Bruce, T. Balch, and M. Veloso.
Fast
Proc. IEEE Signal Pro-
cessing Society Workshop, 2:624 633, 2000.
and inexpensive color image segmentation
6