**3. Spatial grey level co-occurrence matrices**

The SGLCM aspect of texture is concerned with the spatial distribution and spatial dependence among the grey levels in a local area. This concept was first used by Julesz [9] in texture discrimination experiments. Being one of the most successful methods for texture discrimination at present, we have investigated its effectiveness for use with MRI images in the present work. This method is based on the estimation of the second order joint conditional probability density function [10]

$$f(i, j \mid d, \theta) \tag{1}$$

where *θ* = 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°.Each *f(i,j|d,θ) i*s the probability of going from grey level *i* to grey level *j*, given that the inter-sample spacing is *d* and the direction is given by the angle *θ*. The estimated value for these probability density functions can thus be written in matrix form [11]

$$\Phi(d,\Theta) = \left\{ f(i,j,|d,\Theta) \right\}.\tag{2}$$

Characterization of Hepatic Lesions

correlation.

windows,

Using Grid Computing (Globus) and Neural Networks 271

effective [4-7]. There are eleven general second-order statistic measurements, as illustrated in [12], which include energy, entropy, contrast, correlation, homogeneity, inverse different moment, inertia, skewness, kurtosis, angular second moment and cluster tendency. The second-order statistical measurements commonly used in most texture classification cases for hepatic tissues using SGLCM are energy, entropy, homogeneity, inertia, contrast and

Entropy is a notoriously difficult term to understand shown as follows[10].

levels in the image from which the SGLCM matrices are extracted.

1 1

*H(S (d)) S (i, j,d)logS (i, j,d)* 

where *S (i,j,d)* is the *(i, j)*th entry in a co-occurrence matrix, *NG* is the number of grey

The concept of entropy comes from thermodynamics, referring to the quantity of energy that is permanently lost to heat ("chaos") every time a reaction or a physical transformation occurs. Entropy cannot be recovered to do useful work. Because of this, the term is used in non-technical speech to mean irremediable chaos or disorder. Also, as with Angular Second Moment [11], the equation used to calculate physical entropy is very similar to the one used for the texture measure. In image processing, entropy measures the disorder or randomness in an image. The smaller the value of entropy, *H(S (d))* , the less common is the occurrence of the pixel combinations [12]. Entropy measures the randomness of the elements of the matrix when all elements of the matrix are maximally random, entropy has its highest value.

<sup>2</sup> 1 1

2

(6)

1

0 0

The energy of a texture describes the uniformity of the texture. In a homogeneous image there are very few dominant grey-tone transitions, hence the co-occurrence matrix of this image will have fewer entries of large magnitude. So, the energy of an image is high when the image is homogeneous. In that sense, it represents orderliness. Thus, energy is useful for

Homogeneity is the dissimilarity and contrast result in larger numbers for more contrasty

*L(S (d)) S (i,j,d) (i j)*

If weights decrease away from the diagonal, the result will be larger for images with little contrast. Homogeneity weights values by the inverse of the contrast weight, with weights decreasing exponentially away from the diagonal. When there is a large amount of contrast, weights are created in SGLCM so that the calculation results in a larger figure. Values on the

1

1 1

 

*NG NG*

*i j*

0 0

*NG NG*

*i j E(S (d)) [S (i, j)d]* 

(4)

(5)

*NG NG*

*i j*

So, a homogeneous image has lower entropy than an inhomogeneous image.

Energy, the opposite of entropy, is, in this context denoted by.

measuring the texture orderness in the image.

SGLCM diagonal show contrast as follows,

0 0

Fig. 1. Component of Gridway in Globus

For computing these probability distribution functions, scanning of the image in four directions has been carried out in this work, with *θ* = 0°, 45°, 90° and 135° sufficient, since the probability density matrix for the rest of the directions can be computed from these four basic directions, as denoted in the following [11]

$$
\phi(d,0) = \phi^\dagger(\text{d}, 180)
$$

$$
\phi(d, 45) = \phi^\dagger(\text{d}, 225)
$$

$$
\phi(d, 90) = \phi^\dagger(\text{d}, 270)
$$

$$
\phi(d, 135) = \phi^\dagger(\text{d}, 315)
\tag{3}
$$

where d, *<sup>t</sup> ( )* denotes the transpose of the matrix for the inter-sample spacing *d*, and direction, *θ*.

#### **3.1 Second-order statistical measurements**

Findings by other researchers on SGLCM second-order feature extraction for use in statistical classification using neural networks (NN) has been shown to be efficient and very 270 Grid Computing – Technology and Applications, Widespread Coverage and New Horizons

For computing these probability distribution functions, scanning of the image in four directions has been carried out in this work, with *θ* = 0°, 45°, 90° and 135° sufficient, since the probability density matrix for the rest of the directions can be computed from these four

**Execution Services** 

**WS GRA** **MD S2** 

**Execution Manager** 

**RFT Pre-**

**WS** 

**Dispatch Manager** 

Job Termination Resource Discovery

**Request Manager** 

> **Information Manager**

Resource Monitoring

Job Submission Job Monitoring Job Control Job Migration

> **MD S2**

**Information Services** 

**MD S4** 

**Scheduler** 

0 d,180 *<sup>t</sup> (d, ) ( )*

45 d,225 *<sup>t</sup> (d, ) ( )*

90 d,270 *<sup>t</sup> (d, ) ( )*

135 d,315 *<sup>t</sup> (d, ) ( )* (3)

where d, *<sup>t</sup> ( )* denotes the transpose of the matrix for the inter-sample spacing *d*, and

Findings by other researchers on SGLCM second-order feature extraction for use in statistical classification using neural networks (NN) has been shown to be efficient and very

Fig. 1. Component of Gridway in Globus

direction, *θ*.

basic directions, as denoted in the following [11]

**Transfer Manager** 

Job Preparation

**GridF TP** 

**File Transfer Services** 

**Host Pool** 

**DRMAA library CLI** 

**GridWay Core** 

**3.1 Second-order statistical measurements** 

effective [4-7]. There are eleven general second-order statistic measurements, as illustrated in [12], which include energy, entropy, contrast, correlation, homogeneity, inverse different moment, inertia, skewness, kurtosis, angular second moment and cluster tendency. The second-order statistical measurements commonly used in most texture classification cases for hepatic tissues using SGLCM are energy, entropy, homogeneity, inertia, contrast and correlation.

Entropy is a notoriously difficult term to understand shown as follows[10].

$$H(S\_0(d)) = \sum\_{i=0}^{\text{NG}-1} \sum\_{j=0}^{\text{NG}-1} S\_0(i, j, d) \log S\_0(i, j, d) \tag{4}$$

where *S (i,j,d)* is the *(i, j)*th entry in a co-occurrence matrix, *NG* is the number of grey levels in the image from which the SGLCM matrices are extracted.

The concept of entropy comes from thermodynamics, referring to the quantity of energy that is permanently lost to heat ("chaos") every time a reaction or a physical transformation occurs. Entropy cannot be recovered to do useful work. Because of this, the term is used in non-technical speech to mean irremediable chaos or disorder. Also, as with Angular Second Moment [11], the equation used to calculate physical entropy is very similar to the one used for the texture measure. In image processing, entropy measures the disorder or randomness in an image. The smaller the value of entropy, *H(S (d))* , the less common is the occurrence of the pixel combinations [12]. Entropy measures the randomness of the elements of the matrix when all elements of the matrix are maximally random, entropy has its highest value. So, a homogeneous image has lower entropy than an inhomogeneous image.

Energy, the opposite of entropy, is, in this context denoted by.

$$E(S\_0(d)) = \sum\_{i=0}^{NG-1} \sum\_{j=0}^{NG-1} \left\{ S\_0(i,j)d \right\}^2 \tag{5}$$

The energy of a texture describes the uniformity of the texture. In a homogeneous image there are very few dominant grey-tone transitions, hence the co-occurrence matrix of this image will have fewer entries of large magnitude. So, the energy of an image is high when the image is homogeneous. In that sense, it represents orderliness. Thus, energy is useful for measuring the texture orderness in the image.

Homogeneity is the dissimilarity and contrast result in larger numbers for more contrasty windows,

$$L(S\_0(d)) = \sum\_{i=0}^{\text{NG}-1} \sum\_{j=0}^{\text{NG}-1} \frac{1}{1 + (i-j)^2} S\_0(i, j, d) \tag{6}$$

If weights decrease away from the diagonal, the result will be larger for images with little contrast. Homogeneity weights values by the inverse of the contrast weight, with weights decreasing exponentially away from the diagonal. When there is a large amount of contrast, weights are created in SGLCM so that the calculation results in a larger figure. Values on the SGLCM diagonal show contrast as follows,

$$\text{Con}(S\_0(d)) = \sum\_{i=0}^{\text{NG}-1} \sum\_{j=0}^{\text{NG}-1} (i-j)^2 S\_0(i, j, d, \Theta) \tag{7}$$

Characterization of Hepatic Lesions

texture areas of cyst and liver tumor, respectively.

**region of interest** 

Using Grid Computing (Globus) and Neural Networks 273

*S(S (d)) (i ) ( j ) S (i,j,d)*

In constructing the sparse coding for SGLCM, the reduction of the number of intensity levels by quantizing the image to fewer levels of intensity [13] helps increase the speed of computation, with some loss of textural information. An interactive graphical user interface (GUI) region drawing tool was developed for image block size flexibility. Inter-sample distance of *d* = 1, image block size of 12 x 12 pixels and direction *θ*= 0°, 45°, 90° and 135°, were used in the experiment. Fig. 2 shows an ROI drawn on healthy liver texture for NN training. Fig. 3 and Fig. 4 show the ROI image block of 12 x 12 pixels drawn on suspected

**4. Implementation of SGLCM, globus for hepatic lesions detection using** 

3 3

(13)

*i j*

1 1

*NG NG*

*i j*

0 0

When cluster shade and cluster prominence are high, the image is asymmetric.

Fig. 2. 12 x 12 ROI block drawn on healthy liver in a MR image of the abdomen.

Fig. 3. 12 x 12 ROI block drawn on suspected liver tumor in a MR image of the abdomen.

Co-occurrence matrices for the *θ* = 0° and *θ* = 90° are calculated as illustrated in Fig. 5 and Fig. 6, respectively. A test image of 4 x 4 pixels was used as the input to illustrate the sparse matrix construction. As observed in Fig. 4, each pixel within the test image window becomes

Liver tumor has irregular shape and has multiple growths tissue.

For non-square matrices, the correlation function computes the linear Pearson correlation coefficient of two vectors or the correlation matrix of an *i* x *j* array,

$$\text{C}(\text{S}\_{0}(d)) = \frac{\sum\_{i=0}^{\text{NG}-1} \sum\_{j=0}^{\text{NG}-1} (i - \mu\_{i})(j - \mu\_{j})\text{S}\_{0}(i, j, d, \Theta)}{\mu\_{i}\mu\_{j}} \tag{8}$$

where refers to the mean intensity value of the image in the x and y directions, respectively,

$$\mu\_i = \sum\_{i=0}^{\text{NG}-1} i \sum\_{j=0}^{\text{NG}-1} S\_0(i, j) \tag{9}$$

$$\mu\_j = \sum\_{i=0}^{NG-1} j \sum\_{j=0}^{NG-1} S\_0(i, j) \tag{10}$$

When correlation is high, the image will be more complex than when correlation is low. If vectors of unequal lengths are specified, the longer vector is truncated to the length of the shorter vector and a single correlation coefficient is returned. If an *i* x *j* array is specified, the result will be an *i* x *j* array of linear Pearson correlation coefficients, with the element *i,j* corresponding to correlation of the *i*th rows and *j*th column of the input array.

The inverse difference moment is defined as ,

$$IDM(S\_0(d)) = \sum\_{i=0}^{NG-1} \sum\_{j=0}^{NG-1} \frac{1}{1 + (i-j)^2} S\_0(i, j, d, \mathbf{0}) \tag{11}$$

It has a relatively high value when the high values of the matrix are near the main diagonal because the squared difference (*i*, *j*)² is then smaller, which increases the value of 2 1 <sup>1</sup> *(i j)* .

The feature inertia defined as

$$I(S\_0(d)) = \sum\_{i=0}^{N \gets 1} \sum\_{j=0}^{N \gets 1} (i - j)^2 S\_0(i, j, d, \Theta) \tag{12}$$

which gives the opposite effect as the inverse difference moment does; when the high values of the matrix are further away from the main diagonal, the value of inertia becomes higher.

So inertia and the inverse difference moment are measures for the distribution of grey values in the image.

The skewness feature, also known as cluster shade and cluster prominence, is the measure of the skewness of the matrix [10]

272 Grid Computing – Technology and Applications, Widespread Coverage and New Horizons

2

*i j*

*(i )( j )S (i, j,d, )*

(9)

(10)

(11)

(12)

*i j*

*i S (i,j)*

*j S (i,j)*

2

1

2

1

*IDM(S (d)) S (i,j,d, ) (i j)* 

It has a relatively high value when the high values of the matrix are near the main diagonal

because the squared difference (*i*, *j*)² is then smaller, which increases the value of 2

1 1

*I(S (d)) (i j) S (i,j,d, )* 

which gives the opposite effect as the inverse difference moment does; when the high values of the matrix are further away from the main diagonal, the value of inertia becomes higher. So inertia and the inverse difference moment are measures for the distribution of grey

The skewness feature, also known as cluster shade and cluster prominence, is the measure

*NG NG*

*i j*

0 0

(7)

(8)

1 <sup>1</sup> *(i j)* .

1 1

*NG NG*

*i j Con(S (d)) (i j) S (i,j,d, )* 

1 1

*NG NG*

*i j*

*i*

*j*

corresponding to correlation of the *i*th rows and *j*th column of the input array.

0 0

coefficient of two vectors or the correlation matrix of an *i* x *j* array,

*C(S (d))*

The inverse difference moment is defined as ,

The feature inertia defined as

values in the image.

of the skewness of the matrix [10]

respectively,

0 0

For non-square matrices, the correlation function computes the linear Pearson correlation

where refers to the mean intensity value of the image in the x and y directions,

1 1

*NG NG*

*i j*

*NG NG*

*i j*

1 1

*NG NG*

*i j*

0 0

0 0

1 1

0 0

When correlation is high, the image will be more complex than when correlation is low. If vectors of unequal lengths are specified, the longer vector is truncated to the length of the shorter vector and a single correlation coefficient is returned. If an *i* x *j* array is specified, the result will be an *i* x *j* array of linear Pearson correlation coefficients, with the element *i,j*

$$S(S\_0(d)) = \sum\_{i=0}^{\text{NG}-1} \sum\_{j=0}^{\text{NG}-1} (i - \mu\_i)^3 (j - \mu\_j)^3 S\_0(i, j, d) \tag{13}$$

When cluster shade and cluster prominence are high, the image is asymmetric.
