**4.1 Lacunarity Analysis (Lac)**

Lacunarity (Lac) was introduced by Mandelbrot (Mandelbrot, 1993) as a fractal property, counterpart to fractal dimension (Mandelbrot, 1982), that describes the texture of a fractal. *Fractal dimension* is a measure of how much space is filled without consideration about the space-filling characteristics of data. In other words, two datasets with identical fractal dimensions can have distinct patterns with great differences in appearance. The introduction of Lac addressed this issue. Lac analyzes *how space is filled and consequently, can discriminate textures and natural surfaces that share the same fractal dimension*. In this direction, Lac has been used as a general technique to analyze patterns of spatial dispersion (Plotnick *et al.,* 1996). The term "lacunarity" has been used to evaluate and describe the distribution of gap sizes along datasets. A set with gaps of widely disparate sizes is considered heterogeneous and is characterized by high Lac, while a homogeneous set, with uniform gap sizes, exhibits lower Lac. It should be highlighted that homogeneous sets at large scales can be quite heterogeneous when examined at smaller scales and vice versa. From this perspective, Lac can be considered as a scale dependent tool to measure the heterogeneity or texture of an object (Gefen *et al.*, 1983).

Various algorithms have been proposed to calculate and quantify Lac, but the most popular are based on the "gliding box algorithm" (GBA) (Allain & Coitre, 1991) that is straightforward and computationally simple. GBA is applicable on binary datasets, although it can be extended to real datasets by converting the numerical data to dyadic by thresholding (Plotnick *et al.,* 1996).

#### **4.2 Differential Lacunarity Analysis (DLac)**

Most real life, image analysis applications need to extract texture information from either grayscale or color images without the option of thresholding. To this end, Dong (Dong, 2000) introduced a new version of Lac, namely Differential Lacunarity (DLac), suitable for grayscale image analysis. DLac is calculated by a differential box counting method. This algorithm employs a gliding box *r* of size *r* x *r* pixels and a gliding window *w* of size *w* x *w* pixels with *r*<*w*. Window *w* is initially positioned at the up left corner of the image and, by moving one by one columns to the left, scans the whole image. For every position of the window *w*, box r is placed inside the window at the up left corner and scans the image pixels bounded by the window (Fig. 6a) in order to calculate a value called "box mass". In other words, window *w* designates a region of the image (different each time until the entire image is covered) on which box mass is calculated with the aid of box *r*. According to the pixel values included in the box (*r* x *r* neighborhood) a column of more than one cubes of size (*r* x *r* x *r*) may be needed to cover the image intensity surface (Fig 6b). Numbers 1, 2, ... are assigned to the cubes from bottom to top and the differential height of the column *n(i,j)* is calculated (*i*, *j* is the position of the box). Let the minimum and maximum pixel values reside in the cubes u and v, respectively. The differential height of the column is defined as

$$\mathbf{m(i,j)} = \mathbf{v} \cdot \mathbf{u} \cdot \mathbf{1}.\tag{2}$$

(3)

Enhanced Ulcer Recognition from Capsule Endoscopic Images Using Texture Analysis 197

is the box mass of the window *w* at a specific place. Let n(M,r) be the number of windows *w* with box mass M calculated by a box *r*. The probability function Q(M,r) is obtained by dividing n(M,r) by the total number of windows. The DLac of the image at scale *r* given a

> <sup>M</sup> Q(M,r) [∑<sup>M</sup> MQ(M,r)]

This section presents our proposed approach for color-texture-based automatic discrimination between ulcer and healthy tissue from WCE images. The color-texture concept was motivated by gastroenterologists' clinical practice, where the colour and texture properties of WCE images are utilized for reaching a diagnosis. More specifically, our scheme, named AR-DLac, combines BEEMD analysis to achieve adaptive image refinement (AR) with DLac analysis for efficient extraction of ulcer texture information. BEEMD-DLac combination for WCE image analysis was firstly introduced in (Charisis *et al.*, 2010b). The

Each pixel in an image is characterized by a 3D color vector, i.e. three values that determine the color of the pixel. Various colour spaces exist to represent colour information. One of the most common color spaces is the hardware-oriented RGB (Red-Green-Blue). The majority of digital cameras, including the camera of a WCE system, utilize image sensors that capture colour images on the basis of the RGB model. In RGB, each colour is determined by the amount of red (R), green (G) and blue (B) present in the colour. In this context, a coloured WCE image comprises from three monochromatic components, one for each colour (R, G

<sup>2</sup>. (4)

Λ(r) = <sup>∑</sup> <sup>M</sup><sup>2</sup>

**5. The proposed automated ulcer tissue identification scheme** 

overall structure of the propose scheme is depicted in Fig. 7.

and B), whose combination provides the final colourful image.

Fig. 7. The proposed AR-DLac scheme.

**5.1 Color information** 

window *w* is defined as

As the box glides inside the window, the sum

M = � n(i,j), i,j

Fig. 6. (a) gliding box (green) and gliding window (black) movement throughout the image, (b) differential box counting method for box mass calculation (box size r=3, window size w=9, differential height of the column n=3-1-1=1).

is the box mass of the window *w* at a specific place. Let n(M,r) be the number of windows *w* with box mass M calculated by a box *r*. The probability function Q(M,r) is obtained by dividing n(M,r) by the total number of windows. The DLac of the image at scale *r* given a window *w* is defined as

$$\Lambda(\mathbf{r}) = \frac{\Sigma\_{\mathbf{M}} \mathbf{M}^2 \mathbf{Q}(\mathbf{M}, \mathbf{r})}{\left[\Sigma\_{\mathbf{M}} \mathbf{M} \mathbf{Q}(\mathbf{M}, \mathbf{r})\right]^2}. \tag{4}$$

#### **5. The proposed automated ulcer tissue identification scheme**

This section presents our proposed approach for color-texture-based automatic discrimination between ulcer and healthy tissue from WCE images. The color-texture concept was motivated by gastroenterologists' clinical practice, where the colour and texture properties of WCE images are utilized for reaching a diagnosis. More specifically, our scheme, named AR-DLac, combines BEEMD analysis to achieve adaptive image refinement (AR) with DLac analysis for efficient extraction of ulcer texture information. BEEMD-DLac combination for WCE image analysis was firstly introduced in (Charisis *et al.*, 2010b). The overall structure of the propose scheme is depicted in Fig. 7.

Fig. 7. The proposed AR-DLac scheme.

#### **5.1 Color information**

196 New Advances in the Basic and Clinical Gastroenterology

straightforward and computationally simple. GBA is applicable on binary datasets, although it can be extended to real datasets by converting the numerical data to dyadic by

Most real life, image analysis applications need to extract texture information from either grayscale or color images without the option of thresholding. To this end, Dong (Dong, 2000) introduced a new version of Lac, namely Differential Lacunarity (DLac), suitable for grayscale image analysis. DLac is calculated by a differential box counting method. This algorithm employs a gliding box *r* of size *r* x *r* pixels and a gliding window *w* of size *w* x *w* pixels with *r*<*w*. Window *w* is initially positioned at the up left corner of the image and, by moving one by one columns to the left, scans the whole image. For every position of the window *w*, box r is placed inside the window at the up left corner and scans the image pixels bounded by the window (Fig. 6a) in order to calculate a value called "box mass". In other words, window *w* designates a region of the image (different each time until the entire image is covered) on which box mass is calculated with the aid of box *r*. According to the pixel values included in the box (*r* x *r* neighborhood) a column of more than one cubes of size (*r* x *r* x *r*) may be needed to cover the image intensity surface (Fig 6b). Numbers 1, 2, ... are assigned to the cubes from bottom to top and the differential height of the column *n(i,j)* is calculated (*i*, *j* is the position of the box). Let the minimum and maximum pixel values reside in the cubes u and v, respectively. The differential height of the column is defined as

M = � n(i,j), i,j

(a) (b)

Fig. 6. (a) gliding box (green) and gliding window (black) movement throughout the image, (b) differential box counting method for box mass calculation (box size r=3, window size

n(i,j) = v - u - 1. (2)

(3)

thresholding (Plotnick *et al.,* 1996).

**4.2 Differential Lacunarity Analysis (DLac)** 

As the box glides inside the window, the sum

w=9, differential height of the column n=3-1-1=1).

Each pixel in an image is characterized by a 3D color vector, i.e. three values that determine the color of the pixel. Various colour spaces exist to represent colour information. One of the most common color spaces is the hardware-oriented RGB (Red-Green-Blue). The majority of digital cameras, including the camera of a WCE system, utilize image sensors that capture colour images on the basis of the RGB model. In RGB, each colour is determined by the amount of red (R), green (G) and blue (B) present in the colour. In this context, a coloured WCE image comprises from three monochromatic components, one for each colour (R, G and B), whose combination provides the final colourful image.

Enhanced Ulcer Recognition from Capsule Endoscopic Images Using Texture Analysis 199

noise reduction would be achieved by extracting three or four IMFs only. However, we opted for eight, since our target is to decompose the image to its components towards examining how intestinal information is distributed on a broad range of frequency scales and create a

The motive for using BEEMD instead of other denoising techniques, such as Gaussian filter or wavelets, lies on the characteristics of the WCE images and the properties of BEEMD. The spatial characteristics of noise in WCE images and the spatial-frequency information representation of BEEMD, combined with its adaptive-to-the-data nature, provides a great advantage over a simple Gaussian filter. Moreover, ulcer regions are characterized by many and varying appearances and irregular shapes and sizes and do not have strong directional elements. Consequently, a tool, free from directional limitations, that permits multi-scale analysis is essential. Wavelet analysis has poor orientation selectivity (horizontal, vertical,

In order to follow the WCE image characteristics and focus upon the ones that mostly relate to ulcer, an AR approach was developed. The aforementioned capabilities of EMD were exploited by developing a new DLac-based approach for the optimized selection of IMFs that correspond to ulcer characteristics of a WCE image. Towards this direction, DLac analysis is applied to every IMF of a decomposed image. The selected IMFs are used either to reconstruct a new image (R-case), or provide separate images (NR-case) that represent specific modes of oscillations coexisting in the initial WCE image. Apart from the optimal IMF selection, we are able to investigate how ulcer texture information are distributed

The great advantage of DLac is the ability to perform texture analysis in various scales. The coarseness of the scale is primarily determined by the size of window *w*, which designates the size of the neighbourhood for box mass calculation; the greater the window, the coarser the analysis scale. In the case of ulcer tissue recognition, a multi-scale texture analysis is required considering the great variability in size and appearance of ulcer regions. In this context, DLac is calculated for a variety of window sizes, given a constant, relative small box size *r*, in order to achieve pattern analysis at different scales, while identifying slight variations in neighbouring pixels (due to small value of *r*). An example of DLac-w (*r*=3, *w*=4-30) curves that correspond to images b, d, e and f from Fig. 1 is given in Fig. 9a. The curves are distinct, however, obvious discrimination is not achieved. To deliver greater differentiation between the curves an identical reference level has to be secured (Hadjileontiadis, 2009). Thus, DLac-w curves are normalized to the DLac value that corresponds to the smallest *w*. The resulting curves (Fig. 9b) provide quite clear discrimination between the four patterns. From now on,

The selection of optimum IMFs is based on the characteristics of DLac-w curve of each IMF. The motive for such an approach lies in the concept that IMFs with possible useful texture

new, reconstructed image that reveals more efficiently ulcer texture information.

diagonal) rendering BEEMD as a more efficient option.

across the frequency scales of WCE images.

any reference to DLac-w curves implies normalized curves.

**5.3.1 Proposed DLac analysis** 

**5.3.2 Optimized IMF selection** 

**5.3 AR-DLac scheme** 

Previous studies (Charisis *et al.*, 2010a, 2011) have shown that RGB is the most efficient space for WCE image analysis (compared to other colour spaces, i.e., HSV and CIE Lab). More specifically, the majority of ulcer texture information resides in green component of the RGB space. This conclusion coincides with the yellow-greenish appearance of ulcer regions. Thus, the proposed AR-DLac scheme is applied on the green channel extracted from each image.

#### **5.2 Image denoising**

The next step of our approach includes image purification by applying a denoising procedure. In order to facilitate texture-pattern extraction, the images need to be refined and smoothed by eliminating any distorting information. Endoscopic images from a WCE examination are prone to misleading content. Hardware limitations (quality of the image sensor and lens, non-adjustable light source) and adverse filming conditions (non-uniform lighting, reflections of the light on intestinal juices and lens cover, peptic content) are likely to cause high levels of noise to reside in total or part of the image (e.g., underexposed). To address this issue, we apply BEEMD analysis and each image is decomposed in eight 2D IMFs and residue. The first two IMFs contain the high frequency components of the image, i.e., the noise that may exist. Therefore, they are discarded and not utilized in the subsequent analysis and for image reconstruction. Figure 8 presents a worst case scenario, where artificial high level noise was added to an ulcer image. The distorted image is decomposed with BEEMD into eight IMFs and residue. The result (reconstructed image) proves that BEEMD is capable of dealing successfully with extreme cases of noise. Sheer

Fig. 8. Ulcer image with high-level, artificial noise decomposed in 8 IMFs plus residue and purified by BEEMD analysis.

noise reduction would be achieved by extracting three or four IMFs only. However, we opted for eight, since our target is to decompose the image to its components towards examining how intestinal information is distributed on a broad range of frequency scales and create a new, reconstructed image that reveals more efficiently ulcer texture information.

The motive for using BEEMD instead of other denoising techniques, such as Gaussian filter or wavelets, lies on the characteristics of the WCE images and the properties of BEEMD. The spatial characteristics of noise in WCE images and the spatial-frequency information representation of BEEMD, combined with its adaptive-to-the-data nature, provides a great advantage over a simple Gaussian filter. Moreover, ulcer regions are characterized by many and varying appearances and irregular shapes and sizes and do not have strong directional elements. Consequently, a tool, free from directional limitations, that permits multi-scale analysis is essential. Wavelet analysis has poor orientation selectivity (horizontal, vertical, diagonal) rendering BEEMD as a more efficient option.
