Motif Analysis of Noisy Regular Textures: Gyuhwan Oh, Seungyong Lee
Motif Analysis of Noisy Regular Textures: Gyuhwan Oh, Seungyong Lee
www.elsevier.com/locate/patrec
b,*
Department of Computer Science, Korea Advanced Institute of Science and Technology (KAIST), Taejon 305-701, South Korea
b
Department of Computer Science and Engineering, Pohang University of Science and Technology (POSTECH),
Pohang 790-784, South Korea
Received 25 July 2001
Abstract
A regular texture contains a periodic arrangement of a determinable pattern. Motifs of a regular texture are the
minimal parallelogrammic sub-regions that can reproduce the texture by tiling. A motif extracted from a regular texture
can be used for texture reproduction, texture recognition, and texture compression. However, it is not simple to accurately capture a motif of a regular texture, as the motif may be non-rectangular or arranged in an arbitrary direction.
Moreover, when the texture contains additive noises, such as are created by the scanning process, motif analysis becomes more dicult. In this paper, we present an algorithm to obtain a motif of a noisy regular texture in Omn log mn
time, where m n is the size of the texture. The analysis examples demonstrate that the proposed algorithm can robustly derive motifs of noisy regular textures. 2002 Elsevier Science B.V. All rights reserved.
Keywords: Regular texture; Motif analysis; Translation symmetry; Distance matching function
1. Introduction
A pattern is a general notion that represents an
organic structure. A regular texture is a rectangular image which contains the repetition of a visually recognizable unit pattern. Due to structural
regularity, a regular texture exhibits an ornamental eect. In commercial areas, such as apparel and
interior design, regular textures have been widely
used as a fundamental resource to achieve decorative eects (Porter, 1975; Stevens, 1991; Washburn and Crowe, 1992). In computer graphics,
0167-8655/02/$ - see front matter 2002 Elsevier Science B.V. All rights reserved.
PII: S 0 1 6 7 - 8 6 5 5 ( 0 2 ) 0 0 0 6 4 - 8
1180
In addition to texture production, motif extraction can be used for compression and recognition of regular textures. To save space for storing
a regular texture, we can remove redundant information in the texture by retaining only a motif
of the texture. When we compare two regular
textures, we do not need to compare all pixel information in the textures. Motifs extracted from
the textures contain sucient information for determining the equality of the textures.
In this paper, we propose an algorithm to identify a motif of a regular texture in Omn log mn
time, where m n is the size of the texture. The algorithm can properly handle a noisy regular texture
which preserves a visually regular structure, although its pixel values are not exactly repeated. The
analysis examples demonstrate that the algorithm
robustly derives the motifs of noisy regular textures.
Symmetry group theory provides a mathematical foundation to dene a regular texture and its
motif (Armstrong, 1988; Baglivo and Graver, 1983;
Conners and Harlow, 1980; Martin, 1982). To
analyze the motif of a regular texture, we rst
adopt the properties of a motif from the theory. To
apply the properties to a noisy regular texture, we
use the distance matching function (Oh et al.,
Fig. 1. Repetition of a regular texture: (a) texture; (b) simple repetition; (c) motif; (d) repetition of the motif.
Fig. 2. Regular textures with: (a) non-rectangular; (b) slanted; (c) non-rectangular and slanted motifs.
2. Related work
A texture can be viewed as a two-dimensional
string that contains characters from a nite alphabet. Ecient algorithms (Galil and Park, 1992,
1996), which are based on string matching techniques, have been proposed to determine the motif
of a regular texture. For a texture of size m n, the
algorithms can determine a motif in Omn time.
However, the algorithms are complicated and
dicult to implement. Furthermore, no mechanism was provided to extract a motif from a noisy
regular texture, because the algorithms are based
on the equality test of two alphabets.
Several algorithms based on co-occurrence
matrices are commonly used to detect the periodicity of a noisy texture (Conners and Harlow,
1980; Parkkinen and Selkainaho, 1990; Zucker
and Terzopoulos, 1980). The algorithms rst
compute co-occurrence matrices for certain displacement vectors and then calculate measures
such as v2 statistics, j statistics, and inertias from
those matrices. Computing co-occurrence matrices
for all possible displacement vectors requires
Om2 n2 time, where m n is the size of the texture. However, the algorithms primarily focus on
detecting one-dimensional periodicity and did not
address how to extract a motif from the texture,
which is related to periodicity in two independent
directions.
1181
3. Preliminary
In this section, we briey review symmetry
group theory, which provides mathematical denitions of a regular texture and its motif (Armstrong, 1988; Baglivo and Graver, 1983; Conners
and Harlow, 1980; Martin, 1982).
A texture can be considered as a bivariate
function g. The function value gx; y represents
the gray level at position x; y 2 Z2 , where Z is the
set of integers. We assume that g is axis-aligned in
the two-dimensional plane and 0; 0 is the lower
left corner of the texture.
Let R represent the set of real numbers. A
translation sv by a vector v vx ; vy is a function,
sv : R2 ! R2 , such that sv p p v px vx ;
py vy for a point p px ; py 2 R2 . When a
translation sv is applied to a texture g, it translates
every pixel in g by v. That is, if g is of size m n
and we let g0 sv g, then g0 is a texture of the
same size as g, and g0 x; y gx vx ; y vy for
x vx ; vx 1; . . . ; vx m 1 and y vy ; vy 1;
. . . ; vy n 1.
The composition sv su of two translations su and
sv is the translation suv by the vector u v. For
i; j 2 Z, sjv siu is the i applications of su followed by j
applications of sv . Therefore, for a point p 2 R2 ,
sjv siu p siujv p p iu jv. Two translations
su and sv are said to be independent if the two
vectors u and v are linearly independent.
A texture g is said to have a translation symmetry if there is a translation su such that g is
matched with su g in the non-empty overlapping
region (Stevens, 1991; Armstrong, 1988; Baglivo
and Graver, 1983; Martin, 1982). It is known that
1182
4. Basic approach
In this section, we rst present an approach to
analyze a motif of a given regular texture g. We
Fig. 3. Five lattice types: (a) parallelogram; (b) rectangle; (c) rhombus; (d) square; (e) hexagon.
1183
1184
regular texture f. Next, we present how to determine the threshold T, where the points p such that
df p 6 T are selected. The approximate lattice Lf
is obtained by choosing representative points in
the clusters of the selected points. Finally, we explain three types of errors that may exist in Lf .
2
2
kg sp g sp k :
For a point q in Lg , df q is reduced to
2
k sq k . For texture f to preserve visually
regular structures, the magnitude of should be
small over the entire domain. This implies that
function df would have a small value for each
point q in Lg . Hence, we can approximate lattice
Lg by using the function df .
Let Lf be an approximation of Lg , which may
contain errors. For example, Lf may contain extra
points that do not belong to Lg . Let Vf be the set
of vectors that connect the origin o to other points
in Lf . Because of the errors in Lf , we cannot
derive the basis vectors a and b of g by simply selecting minimum length vectors from Vf . For example, extra points in Lf may introduce vectors to
Vf whose lengths are smaller than those of a and b.
To resolve this problem, we use the Delaunay triangulation (de Berg et al., 1997) of Lf , which is the
dual of the Voronoi diagram of Lf . From the
edges of the Delaunay triangulation, we can obtain
a set of vectors that connect the nearby points in
Lf . The vectors a and b are then determined by
using the most frequent vectors in the set.
In summary, we analyze a motif of a given noisy
regular texture f in two steps: lattice approximation and basis vector approximation. In the rst
step, the approximate lattice Lf of f is obtained by
using the distance matching function df . In the
second step, we determine basis vectors a and b of f
by using the vector set derived from the Delaunay
triangulation of Lf . In Sections 5 and 6, we present the details of the rst and second steps, respectively.
df1 x; y;
>
>
>
: d 2 x; y;
f
x P 0 and P 0;
x 6 0 and y P 0;
x 6 0 and y 6 0;
x P 0 and y 6 0;
where
df1 x; y
1
m xn y
m x 1
X n y 1
X
i0
df2 x; y
jf i; j f x i; y jj ;
j0
1
m xn y
m x 1
X n y 1
X
jf m 1 i; j
i0
j0
2
f m 1 i x; y jj :
As shown in Fig. 5, df p computes the average of
squared dierences of pixel values over the region
where f and sp f overlap.
5. Lattice approximation
In this section, we rst introduce the distance
matching function df (Oh et al., 1999) of a noisy
1185
Q
Q
X
1 X
hd
2
c d
hc
mn c0
mn
d0
Q
Q
1 XX
2
hchdc d :
m2 n2 c0 d0
1186
Sl 1
L0f i0 Si and Si \ Sj ; for all i 6 j.
For all p; q 2 Si , there exists an 8-connected
path in Si from p to q.
The rst condition implies that the set of clusters
Si is a partition of L0f . With the second condition,
each cluster Si is an 8-connected component of
L0f . In each cluster Si , we choose a point qi whose
function value df qi is the minimum among those
of the points in Si . We can consider the set of such
points qi as an approximation of the lattice Lg .
The point set is denoted by Lf and called the
approximate lattice of f:
Lf qi jdf qi 6 df q for all q 2 Si ;
i 0; 1; . . . ; l 1 :
For a given noisy regular texture f of size m n,
the approximate lattice Lf can be obtained in
Omn log mn time, because the evaluation of the
distance matching function df dominates the
computation time. Fig. 7(b) shows the plot of Lf
derived from L0f shown in Fig. 7(a). From Fig.
7(b), we observe that the clustering process eectively eliminates extra points in L0f .
5.3. Possible errors in approximate lattice Lf
Let f be a noisy regular texture and g the underlying regular texture. The approximate lattice
Lf of f may be dierent from the lattice Lg of g.
This is due to three types of errors: perturbation
errors, missing points, and extra points. With a
perturbation error, the position of a point q in Lg
changes slightly in Lf . This error occurs when
point q does not have the minimum value of
function df among the points in the cluster to
which it belongs. A point q in Lg can be missed in
1187
Fig. 8. Delaunay triangulations for ve lattice types: (a) parallelogram; (b) rectangle; (c) rhombus; (d) square; (e) hexagon.
kc2 c1 c03 k :
1188
oerr
2c1 c2 c01 c03 0;
oc1
oerr
c1 2c2 c02 c03 0:
oc2
From the equations, we nally obtain
2c01 c02 c03
;
3
c3 c2 c1 :
c1
c2
As mentioned in Section 5.3, lattice Lf may contain extra points and perturbation errors if we
employed a large threshold T to obtain the
point set L0f . When we determine the vectors ci
from Lf with the above approach, the eects of
the extra points are properly removed by selecting the three largest clusters from the point set
Ef . The perturbation errors are handled by averaging the points in the selected clusters. The leastsquare tting of c1 and c2 further enhances the
robustness of the method against perturbation
errors.
The Delaunay triangulation of a point set with
p points can be constructed in Op log p time (de
Berg et al., 1997). Let m n be the size of a given
noisy regular texture f. Then, lattice Lf contains
at most mn points and the Delaunay triangulation
Df of Lf can be obtained in Omn log mn time.
This implies that we can obtain the three vectors,
c1 ; c2 , and c3 , from Lf in Omn log mn time because the construction of Df dominates the computation time. The basis vectors a and b of f can
be determined from C fc1 ; c2 ; c3 g, as mentioned in Section 6.1.
1189
1190