Computer Graphics & Geometry

Method of p-adic Resonance in Textures Analysis

Vladimir M. Chernov
Image Processing Systems Institute of RAS
Russia,Samara  51 Molodogvardejskaya St., IPSI RAS, 443001

Phone: +7(8462)322994.
Fax:    +7(8462)322763
vche@smr.ru


Contents
Abstract

A method of extracting primitives from textures of the particular kind is considered. The extracted primitives are associated with ''spheres'' of a fixed diameter in different non-Archimedean norms of Q2. The obtained primitive textures are invariant under certain p -adic isometries, they form a representative set of features for solving particular tasks of texture analysis.

Keywords: Texture, Primitive extraction, p-adic numbers.

1  INTRODUCTION

It is stated in contemporary papers that almost all effective methods of texture classification or segmentation are based either on statistical or structural approaches [1]. Statistical methods, such as using co-occurrence matrices and autoregression models, describe texture by using statistics obtained from local image features (e.g. [2], [3]). Generally speaking, such methods are suitable for processing irregular textures with random distribution of brightness function of picture elements. A specific lack of the direct statistical approach is disregarding structural (or geometrical) image properties, which is inherent to a wide range of textures.

Structural methods assume that texture is a set of periodical fragments. It is claimed in papers [1], [4], [5] that a wide class of textures has a concealed periodical ''quasilinear'' structure with unknown parameters of the periodicity. On the other hand, some metrically invariant objects on the discrete plane have visually the same ''quasilinear'' structure.

The authors do not intend to discuss advantages and disadvantages of alternative approaches to solving particular tasks of texture analysis. We shall note that these geometric (metric ones included) characteristics of an image do not have to be described adequately in terms of conventional Euclidean geometry. Moreover, while solving pattern recognition and computer vision tasks, it may turn out that the most informative features can be obtained from the analysis of metric image properties which cannot be interpreted clearly in terms of ''ordinary'' concepts of distance, closeness, etc. (see [6]). Therefore, first of all, the purpose of this paper is to illustrate the possibilities of mathematical techniques relatively new for the Computer Science - the theory of non-Archimedean (p-adic) normalized spaces (e.g. [7], [8]), - in tasks of forming the features space. Textures are a convenient testing ground for demonstration of such possibilities.

With respect to the statistical and structural approaches mentioned above, the method suggested in this paper is considered to be intermediate. On the one hand, the proposed algorithm of extracting primitives is purposed to reveal ''hidden'' quasi-periodic components of a texture image. On the other hand, we use ''stochastic'' (or ''random'') properties of some functions and objects associated with prime numbers in conjunction with spectral methods. The latter is common for the statistical approach.

In concept, the principal ideas of the method being described are not absolutely new. Formation of features on the base of different algebraic image invariants is one of the main techniques in pattern recognition [9] . Different metric structures associated with textures of particular classes has been a subject in paper [10], etc.

In the papers [11], [12] the authors proposed the method of extracting components associated with specific plane metrics (the so-called non-Archimedean or p-adic metrics). From here on we shall call this method a method of p-adic resonance. The novelty of the approach of this paper is applying non-Archimedean (p-adic) norms - and their extensions onto the discrete plane - to extacting metric invariants of textures. As shown below, these invariants are some binary images (primitives) associated with some set of primes and also metrics connected with them. These primitives can be used directly for recognition by experts or forming numerical characteristics and, consequently, features space. The possibility is at the basis of the method that one can (in a parallel way) extract one or several components from a texture image, each of them has geometric properties which can be easily distinguished visually or analysed numerically.

In this paper we continue their work on developing combined geometric and statistical methods of texture analysis. In particular, we describe examples of practical applications of this method to solving some tasks of texture analysis, i.e. segmentation and detection of texture defects.

2  JUSTIFICATION OF THE METHOD

2.1  Some Properties of Non-Archimedean Metrics

It is well-known that prime numbers form the multiplicative basis of the natural numbers semigroup: each natural number can be presented as a product of degrees of prime numbers. On the other hand, the tasks concerned with analysis of additive properties of primes (e.g. their distribution in the positive integers) are quite difficult (e.g. see [13], [14]). It is clear: additive properties of the multiplicative objects are hard to analyze. ''Irregular behavior'' of primes leads to the idea about some ''independence'' of the features associated with different primes. ''The prime numbers play games of chance'' wrote Kac [15]. Some approaches to formalization of the naive understanding of prime numbers independence are described in this book with argumentation convincing enough.

First of all, in texture analysis tasks the researcher is interested in geometric properties of an image. Therefore we shall consider image properties in specific geometries associated with prime numbers.

Let p be a prime. Let us assume np(a) to be the p-adic exponent of an integer number a, that is the largest nonnegative number m for which

a º 0 ( mod pm).

For a rational number x = [a/b] the exponent np(x) is assumed to be

np(x) = np(a)-np(b).

Let us define a p-adic (non-Archimedean) norm on the set of rational numbers by means of the relation

||x||p = ì
í
î
p-n p(x),    if    x ¹ 0;
0,    if    x = 0.
.
(1)

Similarly to the fact that the completion of the field Q with respect to the usual norm ||x||¥ = |x| leads to the forming of real numbers field, its completion with respect to the norm ||x||p leads to the forming of p-adic numbers field Qp . In a standard way, a metric rp(x,y) is induced by the norm:

rp(x,y) = ||x-y||p, x,y Î Qp.

In particular, two integers are ''close'' if their difference is divided by a high degree of the given prime p.

Similarly to the fact that the norm ||·||¥ can be supplemented onto Q2, the norm ||·||p can be also supplemented onto Q2 in a number of ways.

 Proposition 1. Let d be an integer free of squares. Let z = (x,y) Î Q2g = 1,...,p-1, then the functions

Yp,d(1)(z) =
Ö
 

p-np(x2-y2d)
 
=
Ö
 

||x2-dy2||p
 
,
(2)
Yp,g(2)(z) = p-np(x+yg) = ||x+gy||p
(3)
extend norm ||·||p from Q onto Q2.

Remark 1. The norms Yp,*(j)(z) are connected directly with p-adic valuations on quadratic fields

Q(
Ö
 

d
 
) = {z = x+y
Ö
 

d
 
;       x,y Î Q}:
 let d be an integer free of squares, p be a prime, z = x+yÖ{d}. Then:

 Proposition 2. Linear operators A: Q2® Q2 with the following matrices:

æ
ç
è
a
pb
pc
a+pd
ö
÷
ø
,    np(a) = 0,    a,b,c,d Î Z;
(4)
preserve the norms (2) and (3), that is, A are linear isometric operators.

The form of the operators considered in Proposition 2 does not depend on non-residue d and integer g. It is defined by five integer coefficients {p;a,b,c,d} of the A matrix only.

2.2  Primitive Textures and Some of Their Properties

Let a real-valued non-negative function x(n1,n2) = x(n) is defined on the set

W = {n = (n1,n2):0 £ n1,n2 £ N-1} Í Z2
and extended N-periodically onto Z2 .

Definition 1. Let us call Yp,*(j)(n)-primitive texture (or p-primitive) functions x(n), which have a constant non-zero value for n that belong to the full sphere with center in the origin of Z2 and Yp,*(j)(n)-diameters less or equal to p-1:

x(n) = ì
í
î
l = const, if Yp,*(j)(n) £ p-1;
0,                otherwise.

Remark 2. Independently of d and g, p-primitives are invariant with respect to action of any operator of linear isometry considered in Proposition 2.

Examples of images composed from some Yp,*(j)-primitives for different p, d and g are shown in Figs.1a-1b.

1A 1B

 

Figure1: Examples of images composed from several p-adic primitives.

Examples of textures obtained from images in Figs. 1a-1b by using some distorting operator (namely, gaussian blur and additive noise) are shown in Figs. 2a-2b. Fig. 3 shows typical Brodatz textures [16].

 

2A 2B

Figure2: Synthesized textures.
Similarity of the synthesized and Brodatz textures allows to expect that methods of primitives extraction from synthesized textures associated with Yp,*(j)-isometries will be also working well for ''real'' (Brodatz) textures.

In contrast with a real texture, primitive textures have a formalized description and are easier to analyze.

 

3A 3B

Figure3: Brodatz textures.
We shall note one important spectral property of Yp,*(j)- primitives.

Prposition 3. Let w = exp{[(2pi)/(pr)]}, p be a prime,

Wr = {n = (n1,n2): 0 £ n1,n2 £ pr-1 £ N} Í W.
Let x(n) be a Yp,*(j)-primitive texture; [x](m) be DFT- spectrum:
^
x
 
(m) =
å
n Î Wr 
x(n)exp{ 2pi
pr
(m1n1+m2n2)},    m Î Wr.
(5)
Then [x](m) can be non-zero only under the conditions 
ì
ï
ï
ï
í
ï
ï
ï
î
m1,m2 º 0 (mod pr-1)
for the norm Yp,d(1);
m1,m2 º 0 (mod pr-1), m2-gm1 º 0 (mod pr)
 for the norm Yp,g(2).
(6)

Congruencies (6) define Yp,*(j)-neighborhoods of the zero with the diameters less than or equal to p-r+1. Therefore, taking into account the Parseval equality, we can conclude that the spectrum power is localized inside the neighborhood of the zero with a little Yp,*(j)-diameter. In case of a real texture image, this localization is obviously not so noticeable. But by choosing a ''good'' norm, the main part of the spectrum power is concentrated around the zero.

2.3  Extraction of the Yp,*(j)-primitive Components from Real Textures

Let b be a subset of primes, h be a subset of norms Yp,*(j) for p Î b . Let an image (a texture) x(n) be presented in the form:

x(n) = xinv(n)+xnon(n),
(7)
where xinv(n) is a function (''signal'') which is invariant over Yp,*(j)-isometries for p Î h . We shall interpret the function xnon(n) as a ''noise''.

Let Is(hp) be a subset of Yp,*(j)-isometries (4) for hp, Card(Is(hp)) be its cardinality. We shall consider an action of the averaging operator Mp on an image (7):

Mpx(n) = Card(Is(hp)-1
å
J Î Is(h p) 
x(J(n)).
(8)

Taking into account the quite general assumptions about statistical independence of values of the function xnon(n), the signal/noise ratio for the averaged image is larger than for the image xnon(n). Certainly, accurate numerical estimations can be obtained only for the artificially synthesized images. For real textures the correctness of this assumption can be confirmed experimentally.

Let us choose a class h = Èhp (p Î b) of norms Yp,*(j) that is representative enough. For each p and Yp,*(j) we shall define a finite set of isometries, and consider averaged images Mpx(n). After the thresholding and the binarization, we shall receive a set of primitive textures. These primitive textures and/or their numerical characteristics can be considered as features of real textures, and the convenient pattern recognition methods can be applied.

Really, invariant properties of a real texture with respect to Yp,*(j)-isometries are unknown a priori, however, ''prime numbers play games of chance'', don't they?

3  ALGORITHM OF PRIMITIVE TEXTURES EXTRACTION

Step 1. Let (N×N) be the size of the image x(n) = x(n1,n2) being processed. We shall choose a subset b of prime numbers p, and consider a set of norms

h=
È
p Î b 
hphp = {Yp,*(j)}.

Step 2. For each p Î b we shall calculate DFT of the image of size Np×Np, where Np = pr £ N.

Step 3. Let J be some operator of isometry (4), detJ = 1 and [x]J(m) be the DFT-spectrum of signal x(Jn), < n,m > = n1m1+n2m2.

Then J induces the dual operator J* acting on pairs of indexes of the spectral components (5):

^
x
 

J 
(m)
=

å
Jn Î Wr 
x(Jn)exp{ 2pi
pr
< Jn,m > }
=

å
n Î Wr 
x(n)exp{ 2pi
pr
< n,J*m > } = ^
x
 
(J*m),
where operator J* is dual to J. Then J induces the dual operator J* acting on pairs of indexes of the spectral components (5). So a linear Yp,*(j)-isometry of an image induces the linear spectra transform. Therefore, under each p Î b and Yp,*(j) Î hp we shall find averaged spectra
Mp ^
x
 
(m) = Card(Is(hp))-1
å
J Î Is(hp) 
^
x
 
(J*(n)).
(9)

For the chosen e we shall find a set b0 Ì \b of ''good'' prime numbers subject to the condition:

p Î b0Û $Y = Yp,*(j) Î \frakNp:   
å
Y(m) ³ p1-r 
Mp ^
x
 
(m)\mid 2 £ e.
(10)

Step 4. For all the primes p Î b0 and for Y Îhp we shall define functions

^
y
 

p 
(m) = ì
ï
í
ï
î
Mp ^
x
 
(m),  if Y(m) £ p-r+1;
0,              if Y(m) > p-r+1,
(11)
and calculate inverse DFT [y]p(m)® yp(n) and binarization:
yp(n)® Yp(n) = ì
í
î
1,
if  | yp(n)| ³ c;
0,
otherwise,
where c is a chosen threshold.

We consider the set of images Yp(n) as distorted primitive textures (''Yp,*(j)-components of a real texture'') associated with ''good'' norms Yp,*(j) under the condition (10). The obtained images can be used for visual qualitative analysis of the significant components of the given texture. Fig. 4 shows the original test texture as well as primitives extracted for ''good'' primes.

 

4A 4B

4C

Figure 4: (a) Fragment of synthesized texture.

(b)-(c) Two extracted primitive (resonant components). 

4  EXPERIMENTAL RESULTS

4.1  Statistical Properties of p-adic Primitives

The most obvious characteristic which distincts significantly resonance and non-resonance cases is a histogram of texture. Fig. 5 shows an example of synthesized texture.

(a)

(b)

(c)

Figure 5: (a) Typical histogram of texture.
(b) Histogram of the averaged image (resonant case: p = 13).
(c) Histogram of the averaged image (non-resonant case: p = 17).

One can see that histogram on Fig. 5c are similar to Gaussian distributions. Histogram on Fig. 5b is trimodal that indicates that a primitive exists.

4.2  Primitives Extraction

Figs. 6a-6c shows fragments of primitives extracted with the described method from Brodatz texture. The average in (8) for primes p = 2,...,29 was calculated under

Card(Is(hp)) = 15.

We shall note peculiarities of the realization of the proposed method. In [17] an algorithm of 2-D DFT (''DFT with a multicovering'') is described. Its structure is obviously associated with a covering of summation area with neighborhoods of decreasing Yp,g(2)-diameters for all g at once. This allows to find the set while calculating the DFT.

 

6A

6A 6C

Figure6: Primitives extraction from Brodatz texture.  

4.3  Texture Segmentation

Let us take an image which consists of several different textures, and separate them applying the proposed method. We shall extract primitives using the sliding window method. Several parallel branches of the algorithm will correspond to several prime numbers, the vector of features will consist of numerical characteristics obtained for every prime number.

Fig. 7a-7b show results of separating the features space into two classes.

 

7A 7B

Figure 7: Results of separation the features space into two classes.

(a) Original texture. (b) Segmetation result.


In this example we considered local mean value and local empirical coefficient of correlation to be features.

4.4  Detection of Structural Defects

Fig. 8a-8d show results of detecting borders of texture defects on the base of estimating modular moments

mij(p) =
å
(n1,n2) Î Wp 
n1in2jx(n1,n2)  ( mod Q),  Q = pk  
of 1st and 2nd order.

 

8A 8B

Synthesized texture, p = 13.

8C 8D

  Brodatz texture, p = 11.


Figure 8: Results of detecting borders of texture defects.

5  CONCLUSION

So the proposed method of p-adic resonance is a subsequent realization of the following closely interrelated ideas.

1. If an image is invariant over some group G of all transforms of the (discrete) plane, the relation (8) gives an image that coincides with the original image.

2. If x(n) is represented as a sum of G-invariant signal and non-invariant component (see (7)), the signal-noise ratio for ( 8) is higher than for x(n).

3. Since it is very difficult to describe the group G of all transforms for the real image x(n), we extract from x(n) components invariant over well-known groups with the simple structures. These components and/or their numerical characteristics are considered to be features of the image x(n), and the standard methods of pattern recognition can be applied.

4. The metrics (2) and (3) are extensions of p-adic metric of the field Qp onto Z2 . We consider group G to be a group of p-adic isometries whith matrices (4).

5. Applying the transform (8) to the image for some set of primes p followed by thresholding enables either to extract a ''hidden'' p-adic invariant component for the given p, or to state that it is not present. The binary vector for the specified set of primes can be presented to experts for identifying the texture. More accurate analysis can be performed using numerical characteristics (features) obtained.

In author's opinion, the capabilities of the ''resonance'' approach described in the paper are not limited to the applications considered above. In particular, in [] the author used similar approach to the visual extraction of binary primitives with predetermined geometric configuration (e.g. with local-symmertic properties).

6  ACKNOWLEDGEMENTS

The work was supported by the Russian Foundation for Basic Research (Grant No. 00-01-00600).

I would like to thank my joung colleague, Andrew Shabashew, for interesting experimental results.

References

[1]
Haralick, R., Statistical and Structural Approaches to Textures. IEEE Proceedings, No 67, 1979, pp.610-621.

[2]
Song, K.Y., Petrou, M., Kittler, J. Texture Defect Detection: A Review. SPIE Application of Artificial Intelligence X / Machine Vision and Robotics. No 1708, , 1992, pp.99-106.

[3]
Zarita, R., Lelandais, S. Wavelets and High Order Statistics for Texture Classifications. In: Proc. of 10th Scandinavian Conf. on Image Analysis, Lappeenranta, Finland, V.1, 1997, pp. 95-102.

[4]
Eichmann, G., Kasparis, T., 1988. Topological Invariant Texture Description. Computer Graphics and Image Processing No 41, 1988, pp. 267-281.

[5]
Chetverikov, D. Pattern Orientation and Texture Symmetry. In: Hlavác, V., Sára, R. (Eds.), Computer Analysis of Images and Pattern, LNCS 1296, 1995, Springer Verlag, pp.162-166.

[6]
Lenz, R., Granlund, G.If I Had a Fisheye I Would Not Need SO(1,n) or, is Hyperbolic Geometry Useful in Image Processing? In: Proc. SSAB Symposium, Uppsala, Sweden, 1998, pp.9-12.

[7]
 van der Waerden, B. L., Modern Algebra, Frederick Ungar Publishing Co., New York. 1949.

[8]
Bayod, J.M., De Grande-De Kimpe, N., Martinez-Mauriec, J. P-adic Functional Analysis. Marsel Dekker, Inc.

[9]
Lenz, R., 1990, Group Theoretical Methods in Image Processing. LNCS 413, Springer Verlag, 1992.

[10]
Smith, G., Lovell, B. Metrics for Texture Classification. In: Algorithms, Proc. Digital Image Comp.: Techniques and Appl. Brisbane, 1995, pp. 223-227.

[11]
V. M. Chernov, A.V. Shabashev. Non-Archimedean Normalized Fields in Texture Analysis Tasks. In: Proc. CAIP'97, LNCS 1296, Springer, 1997, pp. 154-161.

[12]
Chernov V.M., Shabashev A.V. Selection of p-adic features from texture images. Pattern.Recognition and Image Analysis. - V.8, No 2, 1998, pp.276- 279.

[13]
Prachar, K. Primzahlverteilung. Springer Verlag, 1997.

[14]
Ireland, K., Rosen, M. A Classical Introduction to Modern Number Theory. Springer Verlag, 1982.

[15]
Kac, M. Statistical Indenpendece in Probability, Analysis and Number Theory. The Math. Ass. of America, 1959.

[16]
Brodatz, P. Textures: A Photographic Album for Artists and Designers. Reinhold, NY, 1986.

[17]
Chernov, V.M. A Metric Unified Treatment of Two-Dimensional FFT. In: Proceedings of the 13th International Conference on Pattern recognition. Vienna, Track B, 1996, 662-669.

[18]
Chernov V.M. Spectral method of algebraic primitives extracting based on multidimensional image representation. In: D.Chetverikov, T.Sziranyi (Eds), Fundamental Structural Properties in Image and Pattern Analysis. Schriftenreihe der Oesterreichischen Computer Gesellschaft, B.130, 1999, pp.169-179


Computer Graphics & Geometry