Sei sulla pagina 1di 6

Statistical Texture Measures

Computed from
Gray Level Run Length Matrices
Fritz Albregtsen
Image Processing Laboratory
Department of Informatics
University of Oslo
November 14, 1995

Abstract
The purpose of the present text is to present the theory and techniques
behind the Gray Level Run Length (GLRL) method, and the state-of-the-art
of the eld, as applied to two dimensional images. It does not present a survey
of practical results.

1 Gray Level Run Length Matrices


In statistical texture analysis, texture features are computed from the statistical
distribution of observed combinations of intensities at specied positions relative to
each other in the image. According to the number of intensity points (pixels) in each
combination, statistics are classied into rst-order, second-order and higher-order
statistics.
The Gray Level Run Length (GLRL) method is a way of extracting higher or-
der statistical texture features. The technique has been described and applied by
Galloway 1975
2] and by Chu et al. 1990
1]
A set of consecutive, pixels with the same gray level, colinear in a given direction,
constitute a gray level run. The run length is the number of pixels in the run, and
the run length value is the number of times such a run occurs in an image.
The Gray Level Run Length Matrix (GLRLM) is a two-dimensional matrix in
which each element ( j ) gives the total number of occurrences of runs of length
p i j 

j at gray level , in a given direction .


i 

1
Albregtsen : Texture Measures Computed from GLRL-Matrices 2

A small (4 4) sub-image with 4 gray levels and its corresponding Gray Level
Run Length Matrices ( j = 0o) is illustrated below.
P i j 

IMAGE

1 2 3 4
1 3 4 4
3 2 2 2
4 1 4 1

gray level run length (j)


i 1 2 3 4
1 4 0 0 0
2 1 0 1 0
3 3 0 0 0
4 3 1 0 0

Figure 1: A small image and its Gray Level Run Length Matrix ( P i j j = 0o).


The number of gray levels in the image is often reduced by re-quantization prior
to the accumulation of the Gray Level Run Length Matrix. Even visually, quan-
tization into 16 gray levels is often sucient for discrimination or degmentation
of textures. Using few levels is equivalent to viewing the image on a coarse scale,
whereas more levels give an image with more detail. However, the performance of
a given GLRL-based feature, as well as the ranking of the features, may depend on
the number of gray levels used.
Figure 2 below illustrates the geometrical relationships of GLRL measurements
made for angles of = 0 4 2 and 3 4 radians.
 = = =

A number of scalar texture features may be computed from the Gray Level Run
Length Matrices. Let
- (
p i j j ) is the ( )th element of the run length matrix for a direction
 i j 

- Gis the number of gray levels


- Ris the longest run
- is the number of pixels in the image.
n

Galloway 1975
2] introduced ve statistical texture features to be extracted from
the Gray Level Run Length matrices:
Albregtsen : Texture Measures Computed from GLRL-Matrices 3

135o y 90o 45o


.... . .
.......... .. .....
............... .
....
.... ......
.....
.............. ........ ........ .....
......
.. ... ... .... ... ...
.. ..... ... . . .... .
. .... ... . . ...
.
.
.... .
.
.

        
.
.
.
.
.
.
.
.
.
.
.

        
.
.
.
.
.
.
.
.
.
.
.

        
.
.
.
.
.
.
.
.
.
.
.

        
.
.
.

0o
.
.
.
.
.
.
.
.

        
.
..
.
. .....
.............................................................................................................................................................................................................................................................................................................
. ........
....
....................

x
. .........
.
.
. ......
.
.
.
.
.
.
.

Figure 2: Geometry for measurement of Gray Level Run Length Matrix for 4 angles.
 Short Runs Emphasis :
X
G X
R ( j ) X
G X
R
= ( j ) (1)
p i j 
S RE
2 = p i j 
i=1 j =1 j
i=1 j =1
By dividing each run length value by the square of its length, short run lengths
are emphasised. The denominator is the total number of runs in the image.
 Long Runs Emphasis :
X
G X R
2 ( j ) XX ( j )
G R
= LRE (2) j p i j  = p i j 
i=1 j =1 i=1 j =1
Here we multiply each run length value by the square of its length, in order to
give higher weight to the long runs.
 Gray Level Non-uniformity :
0R 12 G R
X
G X XX
= @ ( j )A
GLN ( j ) (3) p i j  = p i j 
i=1 j =1 i=1 j =1
High run length values will contribute most to this feature. The GLN feature
will have its lowest value if the runs are evenly distributed over all gray levels.
 Run Length Non-uniformity :
XR X G !2 X G XR
= RLN( j ) ( j ) (4) p i j  = p i j 
j =1 i=1 i=1 j =1
The RLN feature will have its lowest value if the runs are evenly distributed
over all run lengths.
Albregtsen : Texture Measures Computed from GLRL-Matrices 4

 Run Percentage :
X
G X
R
RP =1 (
p i j j )
 (5)
n
i=1 j =1
This feature is the ratio between the total number of observed runs in the
image and the total number of possible runs if all runs had a length of one.
Chu et al. (1990)
1] introduced two additional features, namely Low Gray Level
Emphasis (LGRE) and High Gray Level Emphasis (HGRE). These features make
use of the gray levels of the runs, and are introduced in order to distinguish textures
that are similar according to their SRE and LRE features, but dier in gray level
distribution of the runs.
 Low Gray level Runs Emphasis :
XG XR ( j ) X G XR
LGRE = 2
p i j
( j ) 
= (6) p i j 
i=1 j =1 i
i=1 j =1

 High Gray level Runs Emphasis :


X
G X
R
2 X
G X
R
H GRE = i p i j ( j )  = (
p i j j )  (7)
i=1 j =1 i=1 j =1

Now we may simplify the above equations by letting the variables ( j ) and r j 

( j )
g i 

XG
( j )= ( j )
r j  p i j (8) 
i=1
XR
( j )=
g i  (
p i j j )  (9)
j =1
represent the number of runs of length and the number of runs of gray scale ,
j i

respectively, as illustrated in Figure 3 .


We also let be the total number of runs in the image
S

XG X R X
G XR
S = ( j )= ( j )= ( j )
p i j  g i (10)  r j 
i=1 j =1 i=1 j =1
The equations may then be written as follows:
1 XG XR ( j ) 1X R ( j )
S RE= = p i j
2
 r j
2

(11)
S
i=1 j =1 j S
j =1 j
Albregtsen : Texture Measures Computed from GLRL-Matrices 5

gray level run length, j


i 1 2 3 4 ( j )
g i 

1 4 0 0 0 4
2 1 0 1 0 2
3 3 0 0 0 3
4 3 1 0 0 4
( j )
r j  11 1 1 0 S=13

Figure 3: Gray Level Run Length Matrix ( j = 0o) for the image above,P i j 

together with ( j ) and ( j ), i.e. the number of runs of length and the
r j  g i  j

number of runs of gray level value . i

X
G X
R X
R
LRE =1 2 (
j p i j j )= 1
 r j ( j )  j
2 (12)
S
i=1 j =1 S
j =1
0R
12
XG X 1X G
GLN =1 @ ( j )A = ( j )2
p i j  g i  (13)
i=1 j =1
S
i=1 S

X 
R X G ! 2 XR
RLN = 1 ( j ) =1 ( j )2
p i j  r j  (14)
S
j =1 i=1 S
j =1
1X G XR 1X
R
RP = (
p i j j )=
 ( j )
r j  (15)
n
i=1 j =1 j =1 n

LGRE =
1XG X
j j )
R p(i
= 1X G g (i j  )
(16)
2 2
S
i=1 j =1 i S
i=1 i

H GRE =
1X G X R
2
i p (i j j  ) =
1X G
2
i g (i j  ) (17)
S
i=1 j =1 S
i=1
We note that all features may be calculated without actually accumulating a
two-dimensional GLRL matrix. Only the two arrays ( j ) and ( j ), i.e. the r j  g i 

number of runs of length and the number of runs of gray level value , have to be
j i

accumulated.
We also note that
 Before the run length matrices are accumulated, the gray levels may be quan-
tized into levels (e.g. = 8 16 32 ).
M M :::

 The run lengths may also be grouped into ranges, e.g. 1, 2-3, 4-7, 8-15, 16-31,
etc.
Albregtsen : Texture Measures Computed from GLRL-Matrices 6

References

1] A. Chu, C.M. Sehgal and J.F. Greenleaf,


"Use of gray value distribution of run lengths for texture analysis",
Pattern Recognitin Letters, Vol. 11, pp. 415-420, 1990.

2] RM.M. Galloway,
"Texture Analysis Using Gray Level Run Lengths",
Computer Graphics and Image Processing, Vol. 4, pp. 172-179, 1975.

Potrebbero piacerti anche