Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2013/2014
A.A. 2013/2014
TEXTURE ANALYSIS
Texture is characterized by the spatial organization of elementary structures called
texels (TEXture element). The texel is a visual primitive, characterized by the
property of invariance, which is spatially repeated in a given area, although
deformed, rotated, and shifted. Texture provides important information about
the spatial arrangement of the grey levels, then about their relationship with the
surrounding elements.
STRUCTURAL METHODS
They are looking for the primitives at the basis of the weave development,
describing its generation in general terms. This approach is appropriate to the
description of textures characterized by a strong regularity, from which we can
extract precise production rules. As a consequence, this approach is suitable for
the image analysis of artificial objects compared with the description of natural
scenes, for which neither generating primitives nor patterns are uniform and
constant. A grammar is definitely a very powerful method for the description of
the generation rules of a regular texture; the grammar describes how to generate
a pattern by applying production rules, recursively, to a small set of symbols.
Zucker (1976) has postulated that a natural texture can be described through
structural rules, before building an orderly and regular weaving through
patterns and grammars, and then distort it to make it natural, with deterministic
or stochastic rules (Fu, 1974). However, as we have already pointed out, even
with this kind of approach the results of natural textures are usualy
unsatisfactory.
4
STRUCTURAL METHODS
Example
Suppose we have a production rule in the form:
S aS ; a = " replicate to the right "
The production indicates the S form that can be written through the rule a applied
to itself (recursively). If the rule a indicates to replicate the texel (or primitive
element) to the right you can get a pattern of type Texture "A".
Now we suppose to add another production rule:
S bS baS ; b = " replicate in the lower right ";
We'll get a texture of type Texture "B"
Texel
Regola di produzione A
Regola di produzione B
Texture "A"
Texture "B"
STATISTICAL METHODS
Generally a natural texture does not have the characteristics of regularity that
allow you to take full advantage of the potentialities offered by structural
methods. The changes that it reveals cannot be described by more or less
regular forms, but through a classification that uses statistical models. Indeed
statistical parameters related to the structure of the image are used as local
features.
We will see in more detail:
Methods based on first-order statistics;
Methods based on filters;
Methods based on transforms;
Methods based on second-order statistics;
Fractal geometry
First-order analysis
PARAMETERS BASED ON THE HISTOGRAM
Some features can be extracted by analysing the histogram (statistical description
of grey level occurrencies).
Statistical analysis of a distribution is usually carried out by using the moments of
order k.
Let us define l the grey level index and p(l) the related probabilitymaxof occurrence.
The first-order absolute moment, i.e., the mean value, is
The central moment of order k is:
max
k l m p(l )
l 0
m l p(l )
l 0
First-order analysis
PARAMETERS BASED ON THE HISTOGRAM
Useful first-order statistical parameters are:
max
MEAN (m)
k l m p(l )
k
l 0
First-order analysis
PARAMETERS BASED ON THE HISTOGRAM
ENTROPY () indicates the disorder degree of the distribution; the maximum value
is related to the uniform distribution.
Entropia log 2 p (l ) p (l )
l
First-order features can be computed for the whole image or on small windows
(local parameters).
First-order analysis
PARAMETERS BASED ON THE HISTOGRAM
Original SIDNEY
10
First-order analysis
PARAMETERS BASED ON THE HISTOGRAM
mean
11
variance
12
14
15
f ( x, y )e
j ( ux vy )
dxdy
16
FOURIER ANALYSIS
The radial features Vr1,r2 are defined as:
V (r1 , r2 ) | F (u , v) |dudv
where the integral is performed on the ring between the two rays r1 and r2 that is:
r12 v 2 u 2 r22 ; 0 u,v n 1
Thus we extract a features vector V , using different values of rl and r2.
u
17
FOURIER ANALYSIS
If an image is a quite smooth surface, not wrinkled, the spatial frequencies willbe
very low, and we'll find that for small r1 and r2 radius the vector V components
will be large values.
18
FOURIER ANALYSIS
The angular spectral features related with the aspect of the structure directionality:
Z (1 , 2 ) | F (u , v) |dudv
The integral is executed in the circular sector region included between the two
angles 1 and 2 that is:
1
1 tan ( v / u) 2 0 u, v n 1
As above, well have a feature vector Z defined for various values of the angles.
With this measure we discriminate the spatial frequencies in different directions. If
a weaving has many lines or edges perpendicular to the direction given by , the
u
corresponding value of Z will be very high.
19
FOURIER ANALYSIS
Original image
20
DFT Magnitude
Second-order analysis:
CO-OCCURRENCE MATRICES
M , i, j Pr
21
P2 P1 y
2 1 x
CO-OCCURRENCE MATRICES
P2
P1
22
=1, =135
CO-OCCURRENCE MATRICES
Example
1
M
=
1,0 24
4
2
1
0
2
4
0
0
1
0
6
1
2 1 3
1 1 2 1
M
=
1,135 18 3 1 0
0 0 2
23
0
0
1
2
0
0
0
0
2
2
1
1
2
3
1
1
2
6 0 2
1 0 4 2
M
=
1,90 24 2 2 2
0 0 2
0
0
1 1
M
=
1,45 18 0
0
0
1
2
2
0
0
2
4
1
CO-OCCURRENCE MATRICES
The size of matrix M depends on the numbers of grey levels in the
image. In order to avoid too large matrices, sometimes is suggested
to reduce the grey levels quantization and/or to make a histogram
equalization in order to reduce the number of occurrences.
In the following some parameters are introduced to describe
several texture properties in function of the parameters , and the
window size (it controls the trade-off between spatial resolution
and reliability of statistics); for example the maximum likelihood
max{pij}.
24
CO-OCCURRENCE MATRICES
Examples of parameters:
CONTRAST:
(i j )2 p(i, j )
i, j
p (i, j )
HOMOGENEITY: i , j 1 i j
ENTROPY:
ENERGY:
log 2 p(i,(from
j ) pthe
(i,co-occurrence
j)
matrix)
i, j
i, j
p( i, j )
CO-OCCURRENCE MATRICES
EXAMPLE:
When a co-occurence matrix has predominant elements on the
main diagonal we say that the texture is compact in the given
direction and distance. It indicates that the texture is
characterized by a repetitiveness with step along the direction
(the contrast gives information about texture repetitiveness,
instead entropy is in relation to the directional anisotropy).
26
CO-OCCURRENCE MATRICES
Sydney IKONOS
27
Contrast
CO-OCCURRENCE MATRICES
Homogeneity
28
CO-OCCURRENCE MATRICES
Entropy
29
CO-OCCURRENCE MATRICES
Energy
30
CO-OCCURRENCE MATRICES
Correlation
31
FRACTAL ANALYSIS
32
Length = L
Area = 0
Volume = 0
33
Surface
Length = +
Area = A
Volume = 0
Volume
Length = +
Area = +
Volume = V
To calculate the various values (length, area, etc.) we can proceed in this way :
N ( ) min N :
= 1 cm N() = 13
34
B ( )
i
i 0
=0.5 cm N() = 27
L lim N ( )
- Length:
0
- Area:
- Volume:
A lim 2 N ( )
0
V lim 3 N ( )
0
Md lim d N ( )
0
There are some finite sets (curve, surfaces, etc.) which are so folded back on
themselves that does not exist a finite and not null dimension of them
(length, area, etc.).
35
Topological
Dimension
Dt
Fractal
Dimension
1.5
Df
Definition:
D lim
36
Example:
The Koch square curve
It is a curve, then it belongs to a one-dimensional Euclidean space, with an unlimited
length and a null area.
a) We start from a unit-length-segment
b) We replace the previous segment with 8 segments with a length of 1/4 as in figure.
c) Recursive repetition of step b) on the generated segments
Passo 1
37
Passo 2
Passo 3
L=1
L = 8*1/4 = 2
L = 8*8*1/16 = 4 ...
L = 8k * 4-k = 23k * 2-2k = 2k
A( ) N ( ) 2
V ( ) 3 N ( ) 26 k 23 k 23 k
When k goes to infinit they tend to zero.
Its fractal dimension is:
D lim
0
38
log N ( )
log( )
lim
k
log 23k
2 k
log(2 )
15
.
D = 2.10
D = 2.50
40
Quadrato di lato
Blanket method
By using the given formula for area and volume, we have that a surface with fractal
dimension D has a volume going to zero, with the following trend:
V( ) = k (3-D) = 3 N( )
To estimate the volume of the image function f(x,y) the blanket method is used which
requires calculation of a superior surface U(x,y,) and inferior surface L(x,y,)
defined as:
U(x,y,) = {set of the points above f(x,y) whose maximum distance from f(x,y) is }
L(x,y,) = {set of the points under f(x,y) whose maximum distance from f(x,y) is }
L(x,y,) < f(x,y) < U(x,y,)
These two surfaces could be easily extracted by applying the morphological
operators of dilation (we obtain U(x,y,)) and erosion (L(x,y,)).
The value of D is estimate in the two-logarithmic plane.
42
BLANKET ALGORITHM
D estimate for a dicretized surface (image):
a)
We consider a set of possible scale dk (ex. From 30 to 5 pixel, d1 = 30, d2 = 25,
d3 = 20, ..., dn = 5)
b)
For each k:
We expand the image with an element of width d k, we elevate the function
of dk obtaining U(x,y,k)
We calculate V(dk)=V(k)
V (k ) U x, y , k L x, y, k
x, y
c)
43