Keywords

1 Introduction

Fractal dimension (FD) is a term used in fractal geometry to evaluate surface roughness of complex objects found in nature like cloud, mountain, and coastlines. However, most of the objects residing in nature are irregular pattern and complex in nature and that cannot be characterized by Euclidean geometry reported in [1, 2]. In order to describe these complex objects, fractal dimension comes into existence and it was initially presented by Mandelbrot [3]. Nowadays fractal dimension becomes most popular in many kinds of applications such as pattern recognition, texture analysis, medical signal analysis, and image segmentation reported in [4]. Many researchers contributed their effort in the area of fractal geometry. Thus, different techniques have different results. Voss described and partitioned these techniques into three key concepts such as box-counting, variance, and spectral method reported in [5]. The box-counting is one of the most successful and widely used techniques for estimating FD in various fields of application due to its simplicity and easy implementation [6]. In this regard, many box-counting techniques and their improved versions come into existence and found in many literatures [7,8,9,10,11,12]. Sarkar and Chaudhuri [8] proposed most appropriate algorithm like differential box-counting (DBC) for digital images by taking maximum and minimum intensity point described in many literatures [13,14,15,16,17]. Jin et al. [10] presented relative DBC by adopting a convenient process for computing roughness. Biswas et al. [18] presented the modified version of DBC by taking a parallel algorithm for efficient estimation. Chen et al. [1] presented another approach similar to RDBC called shifting DBC by using the concept of shift operation. The improved box-counting (IBC) technique was described by Li et al. [11] based on three major issues such as selection of the height of box, box-number computation, and partitioning of the surface. Liu et al. [12] presented another improved version of DBC approach called improved DBC (IDBC) by adopting three concepts such as revising box-counting approach, shifting box in spatial coordinate, and choosing suitable size of the grid for better FD estimation.

2 Related Background Work

The FD is a major characteristic of fractal geometry to estimate surface roughness of whole image. The basic rules behind this estimation are based on the concept of self-similarity. From the property of self-similarity, we can say a fractal is normally an irregular shape. When a large fractal object is divided into smaller parts and each part is same as whole object. While in this regard, many techniques have been projected for better estimation of FD, still the precise roughness calculation of complex objects is a great challenge. The following subsections describe the existing well-liked methods which we have taken into consideration for our experimental analysis purpose. Fractal dimension of digital images is evaluated based on the (Eq. 1), which as follows:

$$D = \log (N)/\log (1/r)$$
(1)

2.1 Principle of DBC Algorithm

Sarkar et al. [8] projected the differential box-counting (DBC) method for evaluation of FD of digital images. In order to implement this algorithm, they represent grayscale image in \(3D\) space, where \(2D\) space like \((x,y)\) represents an image plane, and third coordinates like \(z\) represents the gray level. Consider the image of size as \(M \times M\) and partitioned into \(L \times L\) grids. Each and every grid comprises a stake of boxes of size \(L \times L \times H\), where H indicates the height of an every box and this height can be calculated in terms of \(L \times G/M\), where G represents the total number of gray levels. Let the maximum and minimum gray values of \((i,j)\) grid fall in L and K box, respectively, then the box count \(n_{r} (i,j)\) can be calculated (Eq. 2) as follows:

$$n_{r} (i,j) = L - K + 1$$
(2)

By taking involvement from all blocks, \(N_{r}\) is counting for different values of L based on (Eq. 3).

$$N_{r} = \sum\limits_{i,j} {n_{r} (i,j)}$$
(3)

2.2 Principle of RDBC Algorithm

Based on original DBC, Jin et al. [10] presented an improved version of DBC called relative DBC (RDBC) by adopting same maximum and minimum intensity point on the grid and taking the scale limit such as upper and lower limits of scale ranges for accurate FD estimation of texture images. Finally, \(N_{r}\) is evaluated (Eq. 4) as follows:

$$N_{r} = \sum\limits_{i,j} {ceil[k*((K - L)/L^{\prime})]}$$
(4)

where k represents the coefficient in z-direction and ceil (.) is used to set the nearest integer.

2.3 Principle of IBC Algorithm

Similar to DBC and RDBC, Li et al. [11] presented another improved DBC mechanism by adopting three major parameters like selection of height of the box, estimation of box number, and partition of intensity surface. They are selecting box height by using the formula (Eq. 5) as follows:

$$r^{\prime} = \frac{L}{1 + 2a\sigma }$$
(5)

where \(a\) is a positive integer and set the appropriate value \(a\) as 3, \(\sigma\) represents standard deviation, and \(2a\sigma\) represents image roughness. Finally \(n_{r} (i,j)\) can be evaluated (Eq. 6) as follows:

$$n_{r} (i,j) = \left\{ {\begin{array}{*{20}l} {ceil(\frac{K - L}{{r^{\prime}}})} \hfill & {if\,\,K \ne L} \hfill \\ 1 \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(6)

\(N_{r}\) can be calculated by taking the contribution of all grids based on (Eq. 3).

2.4 Principle of IDBC Algorithm

Liu et al. [12] proposed another improved version of DBC called improved differential box-counting method (IDBC) for estimating FD of grayscale image. In their proposed method, three modifications have been done such as concepts such as revising box-counting approach, shifting box in spatial coordinate, and choosing suitable size of the grid and nr calculated by taking maximum contribution from (Eq. 2) and (Eq. 7).

$$n_{r} (i,j) = \left\{ {\begin{array}{*{20}l} {ceil(\frac{{\mathop I\nolimits_{{\max }} - \mathop I\nolimits_{{\min }} + 1}}{{s^{{\prime }} }})} \hfill & {I_{{{\text{max}}}} \ne I_{{{\text{min}}}} } \hfill \\ 1 \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(7)

\(N_{r}\) can be calculated by taking the contribution of all grids, and final FD can be evaluated by means of least square regression line of \(\log (N_{r} )\) verses \(\log (1/r)\).

3 Proposed Methodology

After analyzing original DBC and its improved version in terms of fitting error, we conclude that no proper box-counting methods are presented to estimate fractal dimension accurately. Therefore, this chapter presents an extended version of original DBC approach to provide wider range of fractal dimension by using slope of the linear fit \(\log (N_{r} )\) verses \(\log (1/r)\) as well as provides smallest error fit not only in the average value but also to every image.

Our proposed methodology took an image of size \(M \times M\) which has scaled down into smaller size of \(L \times L\), where L indicates the individual box size ranging between 2 and \(M/2\). The image can be represented in 3D spatial space, where \((x,y)\) representing 2D spatial space and 3rd coordinate \(Z\) representing gray level G. To evaluate this proposed method, we estimate the mean of each box size L × L. Then, this mean value of each block size compared with each corresponding pixel of block. If the pixel value is greater than the mean value, then count of max (MA) is accumulated otherwise, and it can be accumulated as min (MI). As the fractal dimension varies from 2 to 3 for grayscale images. In this case, we have multiplied 3 with maximum and 2 with minimum intensity point for better estimation. For calculation of \(n_{r} (i,j)\), DBC uses the (Eq. 2), RDBC uses (Eq. 4), IBC uses (Eq. 6), and IDBC uses (Eq. 7). For more reasonable our proposed method \(n_{r} (i,j)\) is calculated on (Eq. 8). However, if \(L^{\prime} = L \times G/M\) is less than one, then \(n_{r}\) should be larger than one. Therefore, \(n_{r}\) should be defined as one box when maximum intensity value is not equal to minimum intensity value. Then, \(n_{r} (i,j)\) can be evaluated as follows:

$$n_{r} (i,j) = \left\{ {\begin{array}{*{20}l} {\frac{3 \times MA \times \hbox{max} (i,j) - 2 \times MI \times \hbox{min} (i,j)}{{L^{\prime} \times L}}} \hfill & {if\hbox{max} (i,j) \ne \hbox{min} (i,j)} \hfill \\ 1 \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(8)

\(N_{r}\) can be calculated by taking the contribution of all grids, and final FD can be computed by using slope of the linear fit \(\log (N_{r} )\) verses \(\log (1/r)\).

4 Result and Discussion

This section describes the performance of our proposed method in terms of fitting error. The experiments are carried out on a system with a MATLAB14(a) in windows 8, 64 bit operating system, Intel (R) i7—4770 CPU @ 3.40 GHz. In this experimental analysis, we have considered four well-liked methods such as DBC, RDBC, IBC, and IDBC and finally compared with proposed method through one experiment, which have a set of standard original fourteen real Brodatz images [19] represented in Fig. 1.

Fig. 1
figure 1

Fourteen real Brodatz texture images

4.1 Tests on Real Brodatz Texture Images

In this section, we are using a set of 14 real texture images [19] of size 256 × 256 from Brodatz database for our experimental analysis which is represented in Fig. 1. For this study, we used four existing well-liked algorithms like DBC, RDBC, IBC, and IDBC along with our proposed method. However, fractal dimension can be calculated using linear fit straight line verses \(\log (N_{r} )\) and \(\log (1/r)\). Then, the error fit can be estimated from the root mean square distance of the data points from the line by using (Eq. 9). Their corresponding FD and error fit are listed on Table 1 and Table 2, and there corresponding graphical comparison figures are presented on Fig. 2 and Fig. 3, respectively. The FD generated from DBC technique falls within the range between 2.20 and 2.61; similarly the other measures like RDBC, IBC, IDBC, and proposed methods ranging from 2.28 to 2.68, 2.29 to 2.69, 2.31 to 2.67, and 2.32 to 2.76, respectively, are listed in Table 1, and individual error fit of Brodatz images using five methods is listed in Table 2. The average error fit is estimated from each method like DBC, RDBC, IBC, IDBC, and PROPOSED are 0.060, 0.063, 0.064, 0.052 and 0.045, respectively, are listed in Table 3, and presented on Fig. 4. The lower error fit indicates higher accuracy. We have seen from this experimental analysis that only proposed method provides smallest error fit not only in the average value but also to every image. Hence, it is crystal clear that the proposed method accurately estimates fractal dimension with less fit error because this method counted accurate number of boxes as compared to other existing method; hence, resulted error fit is quite less as compared to DBC, RDBC, IBC, and IDBC.

Table 1 Computational FD of the Brodatz images presented in Fig. 1
Table 2 Computational error fit of the Brodatz images presented in Fig. 1
Fig. 2
figure 2

Computational FD of the images in Fig. 1, by different approach

Fig. 3
figure 3

Computational error fit of the images in Fig. 1, by different approach

Table 3 Computational average error fit
Fig. 4
figure 4

Computational average error fit

$$errorfit = \frac{1}{n}\sqrt {\sum\limits_{i = 1}^{n} {\frac{{\left( {dx_{i} + c - y_{i} } \right)}}{{1 + d^{2} }}} }$$
(9)

5 Conclusion

In this study, we have proposed an extended version of DBC method; the improvement is based on the changing the means of the number of counting boxes in the box of block. In order to evaluate proposed method, we have carried out our experiment work with standard Brodatz database images and compared with original DBC and other improved DBC methods. The result illustrates that the proposed method has better performance in terms of less fit error as compared to other methods like DBC, RDBC, IBC, and IDBC. It is a robust and more precise method. Further systematic validation is needed on more kinds of images to analyze fractal dimension on specific objects.