Application of The Ring Theory in The Se 2
Application of The Ring Theory in The Se 2
4, November 2014
ABSTRACT
Ring theory is one of the branches of the abstract algebra that has been broadly used in images. However,
similarity among images using ℤ rings and the entropy function. This new index was applied as a new
ring theory has not been very related with image segmentation. In this paper, we propose a new index of
stopping criterion to the Mean Shift Iterative Algorithm with the goal to reach a better segmentation. An
analysis on the performance of the algorithm with this new stopping criterion is carried out. The obtained
results proved that the new index is a suitable tool to compare images.
KEYWORDS
Image processing, similarity index, entropy, ring theory.
1. INTRODUCTION
Many techniques and algorithms have been proposed for digital image segmentation. Traditional
segmentation such as thresholding, histograms or other conventional operations are rigid
methods. Automation of these classical approximations is difficult due to the complexity in shape
and variability within each individual object in the image.
The mean shift is a non-parametric procedure that has demonstrated to be an extremely versatile
tool for feature analysis. It can provide reliable solutions for many computer vision tasks [2].
Mean shift method was proposed in 1975 by Fukunaga and Hostetler [5]. It was largely forgotten
until Cheng's paper retook interest on it [1]. Segmentation by means of the Mean Shift Method
carries out as a first step a smoothing filter before segmentation is performed [2, 3].
Entropy is an essential function in information theory and this has had a special uses for images
data, e.g., restoring images, detecting contours, segmenting images and many other applications
increased if the images are defined in ℤ rings. The inclusion of the ring theory to the spatial
[12, 15]. However, in the field of images the range of properties of this function could be
ring ℤ . From this point of view, the images present cyclical properties associated to gray level
analysis is achieved considering images as a matrix in which the elements belong to the cyclic
values.
Ring Theory has been well-used in cryptography and many others computer vision tasks [18].
image like a matrix in which the elements belong to finite cyclic ring ℤ . The ring theory for the
The inclusion of ring theory to the spatial analysis of digital images, it is achieved considering the
Mean Shift Iterative Algorithm was employed by defining images in a ring ℤ . A good
performance of this algorithm was achieved. Therefore, the use of the ring theory could be a good
DOI : 10.14810/ijscmc.2014.3405 69
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
structure when one desire to compare images, due to that the digital images present cyclical
properties associated with the pixel values. This property will allow to increase or to diminish the
difference among pixels values, and will make possible to find the edges in the analyzed images.
In this paper, a new similarity index among images is defined, and some interesting properties
based on this index are proposed. We compare also the instability of the iterative mean shift
algorithm ( ) by using this new stopping criterion with regard to the stopping criterion used
in [8-11]. Furthermore, we make an extension of [7], and we expand the theoretical aspects by
studying in depth the cyclical properties of rings applied to images. For this purpose, and in order
to mark the difference of this paper with regard to [7], some issues are pointed out below:
Important elements of the ring × (ℤ )(+,∙) are given: neutral, unitary, and inverse. In
• Revision of the mean shift theory.
•
particular, the inverse element was used so much to the theoretical proofs as well as
practical aspects.
• Explanation of strong equivalent images by using histograms.
• Definition of equivalence classes.
• Quotient space. Definition and existence.
• Natural Entropy Distance ( ) definition.
• Configuration of the algorithm with the distance.
The remainder of the paper is organized as follows. In Section 2, the more significant theoretical
consequences for entropy function and the significance of the cyclic ring ℤ for images. Also, it is
aspects of the mean shift and entropy are given. Section 3 describes the similarity index, its
defined the quotient space of strongly equivalent images and some properties of entropy are
proved. The experimental results, comparisons and discussion are presented in Section 4. Finally,
in Section 5 the conclusions are given.
2. THEORETICAL ASPECTS
One of the most popular nonparametric density estimators is kernel density estimation.
Mathematically, the general multivariate kernel density estimate at the point , is defined by:
1 −
( )= ,
(1)
ℎ ℎ
!
$( ) = | |&!⁄' ) *,
&!⁄' (2)
where (+) is the , − -./ .01 kernel function with compact support satisfying the regularity
constraints as described in [16], and is a symmetric positive definite bandwidth matrix.
23.0 .4/4.00 61 domain and the /. 71/6848/ domain. We map a pixel to a multidimensional
For image segmentation, the feature space is composed of two independent domains: the
feature point which includes the 3 dimensional spatial lattice (3 = 2 for image) and :
70
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
dimensional color (: = 1 for gray scale images and : = 3 for color image and : > 3 for
the product of two different radially symmetric kernels (subscript 2 is refer to the spatial domain
multispectral image). Due to the different natures of the domains, the kernel is usually broken into
6 ' '
=> ,=? ( )= DE E F DE E F,
(ℎ@ )A (ℎB )C
(3)
@
ℎ@ B
ℎB
where is a pixel, @ and B are the profiles used in the two respective domains, ℎ@ and ℎB are
employed bandwidths in 23.0 .4//. 71 domains and 6 is the normalization constant. Using the
equation (3), the kernel density estimator is:
6 − ' − '
G( ) = DE E F DE E F.
(4)
(ℎ@ )A (ℎB )C @
ℎ@ B
ℎB
!
The 3. 16ℎ 8- function is chosen as the kernel function in this work, this function is
defined as:
1 &!
(, + 2)(1 − ‖ ‖' ), ‖ ‖ < 1O
( ) = J2 6 .
(5)
I
0, 80ℎ1/N 21
1 −
Q ( ) = ∇R
∇ ( )= Q
(6)
ℎ ℎ
!
1 ,+2
Q I( ) =
∇ ( − )
(ℎ 6 ) ℎ'
ST ∈VW (S)
(7)
,+2 1
= ( − ),
S
(ℎ 6 ) ℎ' S
ST ∈VW (S)
1 1
=,X ( )= ( − )=e f−
(8)
YZ
S
ZTZ
S ZZ[Z
∈V W (S) ZZZZ\
S
YZZZZZ[ZZZZZ\
ST ∈VW (S)
]^_ @= `a b_cd^@ ]^_ @= `a
71
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
g
is the kernel density estimate j
X ( ) where k means the uniform kernel)
)=h ih *
The quantity
computed with the hyper sphere =( ), and thus we can write the expression (7) as:
,+2
Q I ( ) = fQm ( )
∇ =,X ( )
ℎ'
(9)
ℎ' ∇Q I( )
Which yields,
=,X ( )= .
, + 2 fQm ( )
(10)
Expression (10) shows that an estimate of the normalized gradient can be obtained by computing
the sample mean shift in a uniform kernel centered on . In addition, the mean shift has the
gradient direction of the density estimate at point . Since the mean shift vector always points
towards the direction of the maximum density increase, it can define a path leading to a local
density maximum; that is, toward the density mode.
A generalization to others kernels is achieved using profile definition and shadow kernel
vector = ( ) and the one used for the probability density function [1]. Profile and shadow
definition. Moreover, a direct relationship settles down between the kernel used for mean shift
kernels are two suitable definitions to prove important and relevant properties for kernels and
mean shift vector.
In [2], it was proved that the obtained mean shift procedure by the following steps, guarantees the
convergence:
=( ).
2. Translating the window = ( ) by = ).
(
1. Computing the mean shift vector
2.2. Entropy
Entropy is a measure of unpredictability or information content. In the space of the digital images
the entropy is defined as:
'o &!
(n) = 3S 487' 3S , (11)
S p
where q is the total quantity of bits of the digitized image n and 3( ) is the probability of
occurrence of a gray-level value.
By agreement log2(0) = 0 [13]. Within a totally uniform region, entropy reaches the minimum
value. Theoretically speaking, the probability of occurrence of the gray-level value, within a
uniform region is always one. In practice, when one works with real images the entropy value
does not reach, in general, the zero value. This is due to the existent noise in the image.
72
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
Therefore, if we consider entropy as a measure of the disorder within a system, it could be used as
a good stopping criterion for an iterative process, by using . More goodness on entropy
applied to image segmentation algorithm can be seen in [9, 15].
In recent works [8-11], the entropy has been an important point in order to define a similarity
index to compute the difference between two images. One of the most common criterion is shown
where (∙) is the function of entropy and the algorithm is stopped when (nu , nu&!) ≤ w. Here w
and are respectively the threshold to stop the iterations and the number of iterations.
Definition 2 (Weak Equivalence in Images): Two images n and q are weakly equivalents if
(n) = (q). We denote the weak equivalence between n and q using n ≍ q.
Figure 1 show two different images of 64 × 64 bits. A reasonable similarity index should present
a big difference between Figure 1(a) and Figure 1(b). However, by using the expression (12), we
The similarity index in (12) never considers the spatial information between the images n and q.
For this reason, it is possible to have two very different images and to obtain a small value by
using (12). This is a strong reason to consider that the similarity index (12) is not appropriated to
estimate the distance between two images.
Taking into account the issues raised above, it is necessary consider a new similarity index based
on the following conditions:
The two following subsections have been dedicated to how face this problem by means of the
employment of the ring theory.
It is natural to think that two images are similar if their subtraction is close to zero. The problem
of this idea is that, in general, when the subtraction gives negative values many authors consider
truncate to zero these elements. This consideration, in general, it not describe the difference
between two images, and in some cases, it is possible to lose important information. For this
73
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
reason, it is necessary to define a structure such that the operations between two images are
intern.
Definition 3 (ℤ ring): The ‚ ring is the partition of ℤ (set of integer numbers) in which the
elements are related by the congruence module .
Consequently ℤ = ‹„p , „! , … , „ &! Œ. We use the structure of the ℤ ring in the set of the images
of size × where the pixel values are integers belonging to [0, − 1] and we denote this set as
u×] (ℤ ). We obtain the next result.
Theorem 1: The set u×] (ℤ )(+,∙), where (+) and (∙) are respectively the pixel-by-pixel
addition and multiplication in ℤ , has a ring structure.
Proof: As the pixels of the image are in ℤ , they satisfy the ring axioms. The operation between
two images was defined pixel by pixel, and then it is trivial that u×] (ℤ ) under the operations
(+,∙) of the ℤ ring inherits the ring structure.
u×] (ℤ )(+,∙).
The following observations are important in order to understand the main features of the ring
by •.
• The neutral element for the sum is the image with all pixels have zero value, it is denoted
• Note that the image with all pixel values are equal to one (•) is the neutral element
respect to the multiplication, (observe that the multiplication between two images was
u×] (ℤ )(+,∙).
•
Working with images with coefficients in ℤ , one has a better way to analyze images, and the
cyclical effect opens a new way that largely reflects the resemblance of a gray level of a pixel
with regarding its neighbors.
Definition 4 (Strong equivalence in images): Two images n, q ∈ u×] (ℤ )(+,∙) are strongly
n = + q,
equivalents if
Theorem 2: If two images n and q are strongly equivalents then they are weakly equivalents.
Proof: If n and q are strongly equivalents then n = + q where is a scalar image. Then
(n) = ( + q) but is a scalar image and for this reason the sum + q only change in q
74
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
frequency of each intensity in the image. Then, ( + q) = (q). Finally we obtain that
the intensity of each pixel, but this does not change the number of different intensities or the
that two images strongly equivalents have the same histogram of frequency, except for one
uniform translation of all gray levels.
Consider the next example to see the importance of the ring theory in the operations among
images. The image in Figure 2(a) has a histogram of frequency that is shown in Figure 2(b). If it
pixels equal to 100), using the ring theory are obtained the histograms of frequency that are
is compute the addition and subtraction of the Figure 2(a) by a scalar image (where has all
Note that the effect of this operation only changes the value of the pixels but do not changes the
frequency or the number of gray levels. In fact, graphically it is possible to see that the addition or
subtraction in the ring only generates a shift in the frequency histogram, so, the images with the
frequency histogram in Figure 2(c) and Figure 2(d), have the same properties and information that
the original image in Figure 2(a). On the other hand, if we consider the classic addition and
subtraction among images, it is easy to see in Figure 2(e) and Figure 2(f) that important
have been accumulated in 255 in the addition case and in 0 in the subtraction case (see Figures
information is lost due to the effect of truncation. In fact, this effect causes that high frequencies
Based on the above aspects, it is interesting to define the equivalence classes among images based
on the concept of strong equivalence. This definition is necessary because the strong equivalent
images have the same information, but from the point of view of intensity pixel, they do not have
to be identically equal. In such sense, we will define the quotient group containing images in
equivalent classes.
75
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
Definition 5 (Equivalence classes): Given an image n, we said that the image q is in the class of
n if and only if n and q are strongly equivalents. We denote the equivalence class of n as „™ .
It is natural to consider the definition of the similarity index using the quotient space of the
images by using strong equivalent images, considering the given equivalence classes above. For
this reason, it is necessary to proof that the quotient space exists. More precisely, as strong
equivalent images have been defined by the addition operation, the quotient group will be built on
this operation.
Theorem 3: The set = ‹ ∈ u×] (ℤ )(+,∙), 2 . 26.4./ .71Œ is a normal (or invariant)
subgroup of u×] (ℤ )(+,∙).
Proof: First we will show that the set is a subgroup of u×] (ℤ )(+,∙).
2. Neutral element: The neutral element (•) in the group is the image with all pixels equals
.
element 2 ›,ž in ℤ . Considering the image › with all elements equal to 2 ›,ž , we obtain that
+ › = •, then › is the inverse of .
We have probed that is a subgroup of u×] (ℤ )(+,∙), only remains to prove that is normal.
For this purpose we use that is a normal subgroup of if ∀7 ∈ , 7 + = + 7 (see [17-
19] for more details).
£ (ℤ )(§,∙)
Let n ∈ ¤×¥ ¨¦ and ∈ , let us define q = n + where ƒ ,ž = . ,ž + 2 ,ž , ∀ , œ. But, we
know that ℤ is abelian, therefore u×] (ℤ )(+,∙) is abelian too, so, ƒ ,ž = 2 ,ž + . ,ž , ∀ , œ ⇒
q = + n. Finally n + = + n.
With the last result, it was proved that the quotient space is well defined, and it will be denoted by
£¤×¥ (ℤ¦ )(§,∙)
¨
.
Remember that the elements of this quotient space are the equivalence classes. Now,
it does not matter which element of the class is chosen to carry out the operation, since any of
these images are a representative element of its respective equivalence class.
Definition 6 (Natural entropy distance): Let „™ and „© be two elements in the quotient space
£¤×¥ (ℤ¦ )(§,∙)
, n!
∈ „™ . , q! ∈ „© are images. The natural entropy distance (
¨
n! . , q! is defined by:
) between
The “Natural Entropy Distance” have the following properties related with the axioms of
distance:
• Non Negativity (-ª(n! , q! ) ≥ 0): Since entropy function is always positive, then
76
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
⇔ n! + (−q! ) = , ∈
⇔ q! ∈ „™
⇔ „™ = „© .
Reflexivity )-ª(n! , q! ) = -ª(q! , n! )*:
-ª(n! , q! ) = )n! + (−q! )*
•
= −)q! + (−n! )*
= )q! + (−n! )*
= -ª(q! , n! ).
If it is considered the images of Figure 1, applying the natural entropy distance the result shows
that:
With this result, one can appreciate that have been differentiated images, including the spatial
information too. The similarity index that was proposed in (13) is very simple and
computationally efficient.
Taking in consideration the good properties that, in general, the definition has, one sees
logical to take this new similarity index as the new stopping criterion of . Explicitly, the
new stopping criterion is:
where w and are respectively the threshold to stop the iterations and the number of iterations.
more homogenous as the algorithm advances. It is intuitive that comparing a resultant image nu
Since is an iterative algorithm, we obtain a sequence that the processed image becomes
at a given iteration with the previous image nu&! of the corresponding sequence, give us a
measure about how much these images look like each other. The Algorithm 1 shows the general
structure of the with as stopping criterion. We denote this algorithm as ¨I° ,
and ±I when the similarity index (12) is used as stopping criterion.
1- Initialize: q! = n . , 1//.ƒ2 = ∞.
Data: Original Image (n); Threshold to stop (w).
b. Calculate using (14) the difference between q! and q' , 1//.ƒ2 = -ª(q! , q' );
c. Update the images, q! = q' .
Result: q! is the segmented image.
77
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
The principal goal of this section is to evaluate the new stopping criterion in the and to
illustrate that, in general, with this new stopping criterion the algorithm has better stability in the
segmentation process. For this aim, we used three different images for the experiments, which
have been chosen according to the differences among their respective levels of high and low
frequencies. The first image (“Bird”) has low frequencies, the second (“Baboon”) has high
frequencies and in the image (“Montage”) has mixture low and high frequencies.
All segmentation experiments were carried out by using a uniform kernel. In order to be effective
same value of ℎB and ℎ@ in (ℎB = 12, ℎ@ = 15). The value of ℎ@ is related to the spatial
the comparison between the old stopping criterion and the new stopping criterion, we use the
resolution of the analysis, while the value ℎB defines the range resolution. In the case of the new
stopping criterion, we use the stopping threshold w = 0.9 and when the old stopping criterion was
used w = 0.01.
Figure 4 shows the segmentation of the three images. Observe that, in all cases, the had
better result when the new stopping criterion was used.
Figure 4. Segmentation of the experimental images. In the first row are shown the segmentation using the
new stopping criterion and in the second row are the segmented images using the old stopping criterion.
When one compares Figures 4(a) and 4(d), in the part corresponding to the face or breast of the
bird, more homogeneous area, with the new stopping criterion was obtained (see arrows in Figure
4(d)). Observe that, with the old stopping criterion the segmentation gives regions where different
78
International Journal of Soft Comp
puting, Mathematics and Control (IJSCMC), Vol. 3, No. 4, Nove
vember 2014
Figure 5 shows the profile of thehe obtained segmented images by using the two stopp pping criterion.
The plates that appear in Figure
ure 5(b) and 5(d) are indicative of equal intensity le levels. In both
graphics the abrupt falls of inte tensity to other represent the different regions in the th segmented
image. Note that, in Figure 5(b)b) exists, in the same region of the segmentation, leas ast variation of
the pixel intensities with regardd to Figure 5(d). This illustrates that, in this case thee segmentation
was better when the new stoppinging criterion was used.
(a) New Criterion (b) Profile (c) Old Criterion (d) Profile
le
Figure 6 shows the performance ce of the two stopping criterion in the experimentall im
images. In the
“ ” axis appears the iterations ofo and in the “·” axis is shown the obtained values by the
stopping criterion in each iteratio
tion of the algorithm.
79
International Journal of Soft Computing, Mathematics and Control (IJSCMC), Vol. 3, No. 4, November 2014
The graphics of iterations of the new stopping criterion (Figure 6(a), 6(b), 6(c)) show a smoother
behavior; that is, the new stopping criterion has a stable performance through the . The new
stopping criterion not only has good theoretical properties, but also, in the practice, has very good
behavior.
On the other hand, if we analyze the old stopping criterion in the experimental images (Figure
6(d), 6(e), 6(f)), one can see that the performance in the is unstable. In general, we have
this type of situation when the stopping criterion defined in (12) is used. This can originate bad
segmented images.
5. CONCLUSIONS
In this work, a new stopping criterion, for the iterative , based on the Ring Theory was
proposed. The new stopping criterion establishes a new measure for the comparison of two
images based on the use of the entropy concept and the spatial information. The quotient space
was defined using the equivalent classes of images, to be able of selecting any element of the
class. Through the obtained theoretical and practical results, it was possible to prove that the new
stopping criterion had very good performance in the algorithm , and was more stable that
the old criterion.
REFERENCES
[1] Y. Cheng, “Mean Shift, Mode Seeking, and Clustering”, iEEE Trans. on Pattern Analysis and
Machine Intelligence, Ph. D. Thesis, New York University, 17 (8) (1995), pp. 790-799.
[2] D. I. Comaniciu, “Nonparametric Robust Method for Computer Vision”, Ph. D. Thesis, Rutgers, The
State University of New Jersey, (2000).
[3] D. Comaniciu, P. Meer, “Mean Shift: A Robust Approach toward Feature Space Analysis”, IEEE
Trans. on Pattern Analysis and Machine Intelligence Ph. D. Thesis, New York University, 24 (5)
(1974).
[4] D. Dominguez and R. Rodriguez, “Convergence of the Mean Shift using the Infinity Norm in Image
Segmentation”, International Journal of Pattern Recognition Research, 1 (2011) pp. 3-4.
[5] K. Fukunaga and L. D. Hostetler, “The Estimation of the Gradient of a Density Function”, IEEE
Trans. on Information Theory, IT-21(1) (1975) pp. 32-40.
[6] T. Grenier, C. Revol-Muller, F. Davignon, and G. Gimenez, “Hybrid Approach for Multiparametric
Mean Shift Filtering”, IEEE Image Processing, International Conference, Atlanta, GA, 17(8) (2006)
pp. 8-11.
[7] Y. Garcés, E. Torres, O. Pereira, C. Perez, R. Rodriguez: Stopping Criterion for the Mean Shift
Iterative Algorithm, Springer, Progress in Pattern Recognition, Image Analysis, Computer Vision, and
Applications, Lecture Notes in Computer Science, Vol. 8258, pp. 383-390, 2013.
[8] R. Rodriguez, E. Torres, and J. H. Sossa, “Image Segmentation based on an Iterative Computation of
the Mean Shift Filtering for different values of window sizes”, International Journal of Imaging and
Robotics, 6 (2011), pp. 1-19.
[9] R. Rodriguez, A. G. Suarez, and J. H. Sossa, “A Segmentation Algorithm based on an Iterative
Computation of the Mean Shift Filtering”, Journal Intelligent & Robotic System, 63(3-4) (2011), pp.
447-463.
[10] R. Rodriguez, E. Torres, and J. H. Sossa, “Image Segmentation via an Iterative Algorithm of the
Mean Shift Filtering for Different Values of the Stopping Threshold”, International Journal of
Imaging and Robotics, 63 (2012), pp. 1-19.
[11] R. Rodriguez, “Binarization of medical images based on the recursive application of mean shift
filtering: Another algorithm”, Journal of Advanced and Applications in Bioinformatics and
Chemistry, Dove Medical Press, I (2008) pp. 1-12.
80
International Journal of Soft Comp
puting, Mathematics and Control (IJSCMC), Vol. 3, No. 4, Nove
vember 2014
Authors
Yasel Garcés Suárez, received hi his bachelor degree in Mathematics from the Havana
University in 2011 and the Master er degree in 2014. Since 2011, he is part of the Digital
Signal Processing Group of thee Institute of Cybernetics, Mathematics and Physics
(ICIMAF). His research interests sts include segmentation, restoration, visual pattern
recognition, and analysis of imaages. He has published more than 10 articles in
international journals and has part
articipated in many international conferences. He has
received more of five national prizes
es.
Esley Torres García, received his bachelor degree in Mathematics from the Havana
University in 2009. Since 2011, hee is part of the Digital Signal Processing Group of the
Institute of Cybernetics, Mathemaatics and Physics (ICIMAF). His research interests
include segmentation, restoration,, visual pattern recognition, and analysis of images.
Since 2009, he teaches mathematic tics at Superior Polytechnic University José Antonio
Echavarría (ISPJAE). He has publishished more than 12 articles in international journals and
has participated in many internationa
nal conferences. He has received one national prize.
Roberto Rodríguez M. received his diploma in Physic from the Physics Faculty, Havana
University in 1978 and the PhD degree
de from Technical University of Havana, in 1995.
Since 1998, he is the head of thee Digital Signal Processing Group of the Institute of
Cybernetics, Mathematics & Phhysics (ICIMAF). His research interests include
Segmentation, Restoration, Mathe hematical Morphology, Visual pattern recognition,
Analysis and Interpretation of imagages, Theoretical studies of Gaussian Scale-Space and
Mean shift. He has published more re than 100 articles in international journals and in man
any international
conferences. He has two publishe hed books and three written chapters in other related bbooks with the
specialist. He has received more off ten
t prizes national e international.
81