Professional Documents
Culture Documents
Fuzzy Min-Max NN For Image Segmentation
Fuzzy Min-Max NN For Image Segmentation
Image Segmentation
Pablo A. Estévez, Gonzalo A. Ruz and Claudio A. Perez
Department of Electrical Engineering
University of Chile
Casilla 412-3, Santiago, Chile
Abstract- In this work a new fuzzy min-max neural color video camera, a frame grabber and a
network for color image segmentation, called FMMIS microcomputer was developed, and applied to defect
neural network, is proposed. The FMMIS algorithm uses classification in radiata pine boards. The best overall
seed pixels to grow hyperboxes, and a criterion of off-line performance obtained on a test set was 74.5%
homogeneity for controlling the size of these hyperboxes. of correct classifications with 10 defect categories plus
The algorithm has been implemented for 2D images and clearwood (area free of defects). In this system, the
tested on the segmentation of live and dead knots in image segmentation was performed by histogram-based
images of wood boards. On a test set, all knots were multiple thresholding combined with edge detection.
correctly detected and most of them were precisely Thresholds were adjusted to get a high defect detection
segmented (the area recognition rate was 91%). The rate (95%), but this was achieved at the expense of
method is very fast and may be applied on real-time visual segmenting dark grain lines as defects. Ideally the
inspection systems. segmentation algorithm should divide the image into
clearwood and defects. In radiata pine boards some
knot pixels are of the same color and intensity as grain
I. Introduction patterns. If a high histogram threshold were used to
fully segment knots, many grain patterns would be
Fuzzy min-max (FMM) neural networks were first segmented too. If a low threshold were used to avoid
introduced by Simpson, oriented to classification [6] detecting grain patterns, knots would be partially
and clustering [7] tasks. In FMM neural networks, segmented only. Both situations are undesirable, and
fuzzy set hyperboxes are defined by pairs of min-max usually there is a tradeoff between the rate of true
points, and a membership function is defined with positives and false positives. In this work, we propose a
respect to these points. The pattern classes or clusters new image segmentation method based on FMM neural
are represented by fuzzy set hyperboxes. The min-max networks. The new model is called FMMIS (Fuzzy
points are learned by placing and adjusting hyperboxes Min-Max for Image Segmentation) neural network. The
in the pattern space. The learning algorithm is a three- performance of this method is evaluated on the
step expansion-contraction process, which has the segmentation of knots in images of wood boards.
ability to learn online and in a few passes through the
data. In [4] an extension of the FMM model is
developed, which is called the general fuzzy min-max II. FMMIS Algorithm
(GFMM) neural network. In GFMM the hyperbox
membership function and the hyperbox expansion A. FMMIS Basic Characteristics
constraint have been modified. In a survey on image 1. The input patterns are the spatial coordinates of the
processing with neural networks [2], no applications of pixels, with each dimension normalized in the range
FMM neural networks were reported. Recently the [0,1]. Let X be a P × 2 input matrix, where
original FMM clustering algorithm has been used to P = M × N is the number of pixels in the image I m .
locate clusters of skin color pixels within the Hue- The position of the hth pixel in the image is represented
Saturation-Value color space, and applied to the by the vector X h = (x h1 , x h 2 ) ∈ I 2 , where the first
segmentation of faces [8]. component indicates the column and the second
component indicates the row of the image. To obtain a
In [5] a review of methods for automated grading and fast segmentation method only a few input pixels,
detection of defects on wood boards was presented. A called seeds, are used to grow hyperboxes. For the knot
defect is considered to be any characteristic which segmentation problem the seeds are automatically
makes wood unsuitable for a given use, e.g. knots. In determined before applying the FMMIS algorithm, as it
[3] a low-cost machine vision system composed of a is explained later in the methods section.
2. The hyperbox membership function defined in i. Expand the hyperbox B j (if needed) to include
GFMM [4] is used. Let each hyperbox fuzzy set, B j ,
X h , by adjusting the min and max points,
be defined by the ordered set
{
B j = X h , V j , Wj , b j ( X h , V j , Wj ) } (1) v new
ji = min v old (
ji , x hi , ) for i = 1,2.
w new = max (
w old , x hi ,) for i = 1,2.
( )
ji ji
where V j = v j1 , v j 2 is the min-point and
(
Wj = w j1 , w j 2 ) is the max-point. The membership The expanded hyperbox will contain a new image
function for the jth hyperbox b j ( X h ), 0 ≤ b j ( X h ) ≤ 1 , region I new
j . Before the expansion the
measures the degree to which the hth input pattern fall hyperbox B j contained the region I old
j .
outside of the hyperbox B j , i.e. the min-max bounds of
the hyperbox. As bj approaches 1, the point is more ii. Calculate the mean intensity of the pixels
contained by the hyperbox, with the value 1 contained within image regions I new
j and I old
j , for
representing complete hyperbox containment. The
membership function is: the red (R), green (G) and blue (B) color channels,
( ([ ( )] [
b j (Xh ) = min min 1− f x hi − w ji , γ i , 1 − f (v ji − xhi , γ i ])) (
j (t )
µ told = mean I old ) for t = R, G, B.
= mean(I (t )) for t = R, G, B.
i =1,2
µ tnew new
j
(2)
where
iii. Verify if the following expansion criterion is met
1 if rγ > 1
or not,
f (r , ) f (r ) rγ if 0 ≤ rγ ≤ 1
γ = γ = (3)
0 if rγ < 0 ,
∑µ
t = R ,G , B
old
t − µ tnew ≤ η , (5)
{ }
I j = X k b j ( X k ) = 1 , for all X k ∈ I m .
Case 2: v ki < v ji < wki < w ji
Case 3: v ji < v ki ≤ wki < w ji
The size of the hyperbox is regulated by controlling the Case 4: v ki < v ji ≤ w ji < wki .
degree of homogeneity of the image region I j . The
procedure for the hyperbox expansion is as follows:
4. Hyperbox Contraction: If the hyperboxes B j and
B k are overlapping, both hyperboxes are contracted in
every dimension. The hyperbox contraction rules
depend on the four cases previously described, as
follows:
ji + wki
v old old
v new
ji = wkinew =
2
.
l
( )
Case 2: while max v max jt (l ) ≤ u t and w j1 ≤ N
Case 3: v ji < v ki ≤ wki < w ji ,
j1 = w j1 + 1
{ w new old
v new
ji = wkiold , if wki − v ji < w ji − v ki
update vmax jt using w new
j1 } (6b)
w new
ji = v kiold , if wki − v ji ≥ w ji − v ki .
Case 4: v ki < v ji ≤ w ji < wki ,
( )
Case 3: while max h min jt (l ) ≤ u t and v j 2 ≥ 1
l
same assignments as in Case 3.
j 2 = v j2 −1
{ v new old
ukp unp
ARR = 1 − − × 100% , (7)
tp tp
B. Experimental Results
Fig. 2 illustrates the different steps of the FMMIS
algorithm. Figure 2(a) shows a sample image with two
live knots. Figure 2(b) shows the seed pixels in white,
which were automatically determined using the same
thresholds for all the images. In average 38 pixels per
image were used as seeds on the test set, i.e. 0.03% of
the total number of pixels in an entire image. Figure
Fig. 2. Example showing the different steps of the FMMIS
2(c) depicts the two hyperboxes found by the FMMIS algorithm: (a) original image containing two knots, (b) seed pixels are
algorithm after a single pass through all the seed pixels. shown in white, (c) two hyperboxes (rectangles) determined by the
Figure 2(d) illustrates the results obtained after the fine- FMMIS algorithm after a single pass through all the seed pixels, and
tuning hyperbox expansion process. (d) the two hyperboxes after the fine-tuning expansion process.
5. Conclusions References
A new FMM neural network for image segmentation, [1] R. Adams and L. Bischof, “Seeded region growing”, IEEE
called FMMIS neural network, has been proposed. As Trans. Pattern Anal. Machine Intell., vol. 16, pp. 641-647,
1994.
in seeded region growing techniques [1], the FMMIS [2] M. Egmont-Petersen, D. de Ridder and H. Handels, “Image
algorithm uses seeds and a criterion of homogeneity for processing with neural networks – a review”, Pattern
controlling the region sizes. In contrast with region Recognition, vol. 35, pp. 2279-2301, 2002.
growing methods, the FMMIS algorithm grows [3] P. A. Estévez, C. A. Perez and E. Goles, “Genetic input
selection to a neural classifier for defect classification of
hyperboxes using only the seed pixels as inputs. If the radiata pine boards”, Forest Prod. J., in press.
homogeneity criterion is satisfied, a hyperbox could be [4] B. Gabrys and A. Bargiela, “General fuzzy min-max neural
expanded from a given size to any other size by network for clustering and classification”, IEEE Trans. Neural
Networks, Vol. 11, No. 3, pp. 769-783, 2000.
including a new seed pixel. This feature allows in [5] D. T. Pham and R. J. Alcock, “Automated grading and defect
principle a faster segmentation than region-based detection: A review”, Forest Prod. J., vol. 48, No. 4, pp. 34-
methods, where the seed pixels are compared with all 42, 1998.
[6] P. K. Simpson, “Fuzzy min-max neural networks – Part 1:
their neighboring pixels. In the knot segmentation Classification”, IEEE Trans. Neural Networks, Vol. 3, No. 5,
problem all knots were correctly detected and most of pp. 776-786, 1992.
them were precisely segmented. This was achieved with [7] P. K. Simpson, “Fuzzy min-max neural networks – Part 2:
Clustering”, IEEE Trans. Fuzzy Systems, Vol. 1, No. 1, pp. 32-
a very low-rate detection of grain patterns as compared
45, 1993.
to previous work [3]. The method proposed is very fast [8] J. Wachs, H. Stern and M. Last, “Color face segmentation
and may be applied on real-time visual inspection using a fuzzy min-max neural network”, Int. J. Image and
systems. The algorithm has been implemented for 2D Graphics, Vol. 2, No. 4, pp. 587-601, 2002.
images but it can be easily expanded to 3D images.
Acknowledgments
This work was supported in part by Conicyt-Chile,
under grant Fondecyt 1030924.