# Two-Dimensional EspEn: A New Approach to Analyze Image Texture by Irregularity

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Shannon Entropy, SampEn2D, and EspEn Concepts

#### 2.1. Shannon Entropy

_{i}= g/N, where g represents each value of the histogram, and N represents the positions in the matrix.

#### 2.2. SampEn2D Entropy

_{m}(i,j) be the set of pixels that form a square of length m, with column range j to j + m − 1 and row range i to i + m − 1.

_{m}(i,j)) within u that can be generated for both m and m + 1. This can be calculated by Nm = (W − m) × (H − m). Considering a threshold of similarity, r, SampEn2D is defined as follows:

#### 2.3. Espinosa Entropy Proposal (EspEn) for 2D

#### EspEn Algorithm for Two Dimensions

_{m}(i,j) be the set of pixels that form a square window, with column range j to j + m − 1 and row range i to i + m − 1. The window construction would be x

_{m}(i,j) = [u(i,j), u(i, j + 1), …, u(i,j + m − 1), u(i + 1,j), u(i + 1,j + 1), …, u(i + 1,j + m − 1), …, u(i + m − 1,j + m − 1)]. Then, EspEn is defined by the following:

_{m}(i,j) and x

_{m}(a,b) with m = 3 have different gray values. In Figure 1b, we see the distances between x

_{m}(i,j) and x

_{m}(a,b). Moreover,$\phi \left(r\right)$ is calculated by counting the distances within the threshold of similarity r; in the example, there are 8 distances ≤ r. This result is divided by the total number of possibilities (${m}^{2}$); 0.88 is compared to $\rho $ to establish the acceptable similarity between the windows, given by the observer.

## 3. Materials and Methods

#### 3.1. Set of Images

_{2D}in Reference [24], defined as follows:

_{ij}represents the synthetic image, Y

_{ij}is the noise image with normalized random values with amplitude from 0 to 255 at each pixel with uniform distribution, and p represents the degree of contamination: p = 0 (without contamination) and p = 1 (only noise).

_{ij}images were generated with class unit8 and dimensions of 500 × 500 pixels, Figure 2a is based on sinusoidal functions created with the same process described in Reference [24], where X

_{ij}= sin(2πi/48) + sin(2πj/48). Figure 2b is a checkerboard image with 50 black squares (pixels of value 0) and 50 white squares (pixels of value 255) interspersed; the box in the upper left corner is black, and the size of each box on the board is 50 × 50 pixels. Figure 2c represents vertical stripes, which were created by an automatic path in the matrix, each 50 columns, taking all the rows and making a displacement to replace the first 25 columns by pixels with value 255 (white) and pixels with a value of 0 (black) in the remaining 25 columns. This process was repeated until the full dimensions of the image were reached, thus obtaining 10 white stripes and 10 black stripes interspersed (each strip had 500 rows × 25 columns), starting with a white stripe. Figure 2d represents horizontal stripes, which were created through a cycle that ran through the matrix every 50 rows, selecting all the columns and performing an automatic scrolling to replace the first 25 rows by pixels with value 255 (white), and in the remaining 25 rows the pixels with a value of 0 (black). This process was repeated until the full dimensions of the image were reached, thus obtaining 10 white stripes and 10 black stripes arranged interspersed (each strip had 25 rows × 500 columns) and starting from a white strip. In each case, the complement images were considered to expand the set of images. There was a total set of 8 synthetic images.

#### 3.2. Experiment and Parameters

#### 3.2.1. Computational Cost: Shannon Entropy, SampEn2D, and EspEn vs. Image Size

#### 3.2.2. EspEn and Dependence on m, r, and ρ

#### EspEn and Dependence on the Length of the Square Window (m)

#### EspEn and Dependence on the Threshold of Similarity (r)

#### EspEn and Dependence on the Percentage of Acceptable Similarity (ρ)

#### 3.2.3. EspEn (m, r, and ρ) Applied to Images from Normalized Brodatz’s Textures Database

## 4. Results and Discussion

#### 4.1. Computational Cost

^{10}comparison procedures are performed.

#### 4.2. Shannon, SampEn2D, and EspEn Results (All Images)

#### 4.3. EspEn Validation

#### 4.3.1. Dependence of EspEn on the Length of the Square Window (m)

#### 4.3.2. Dependence of EspEn with the Threshold of Similarity (r)

#### 4.3.3. Dependence of EspEn with the Percentage of Acceptable Similarity (ρ)

#### 4.4. Application of the EspEn Algorithm in the Images of Normalized Brodatz’s Texture Database

#### 4.5. Summary Characteristics of EspEn (u, m, r, $\rho $)

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Sparavigna, A.C. Entropy in Image Analysis. Entropy
**2019**, 21, 502. [Google Scholar] [CrossRef][Green Version] - Prabaharan, T.; Periasamy, P.; Mugendiran, V.; Ramanan. Studies on application of image processing in various fields: An overview. IOP Conf. Ser. Mater. Sci. Eng.
**2020**, 961, 012006. [Google Scholar] [CrossRef] - Humeau-Heurtier, A. Texture Feature Extraction Methods: A Survey. IEEE Access
**2019**, 7, 8975–9000. [Google Scholar] [CrossRef] - Hung, C.C.; Song, E.; Lan, Y. Image Texture Analysis: Foundations, Models and Algorithms, 1st ed.; Springer Nature: Cham, Switzerland, 2019. [Google Scholar] [CrossRef]
- Nixon, A.S.; Aguado, A.S. Feature Extraction & Image Processing for Computer Vision, 3rd ed.; Academic Press: London, UK, 2012. [Google Scholar] [CrossRef]
- Fadaei, S.; Amirfattahi, R.; Ahmadzadeh, M.R. Local derivative radial patterns: A new texture descriptor for content-based image retrieval. Signal Process.
**2017**, 137, 274–286. [Google Scholar] [CrossRef] - Zhu, Z.; You, X.; Yu, S.; Zou, J.; Zhao, H. Dynamic texture modeling and synthesis using multi-kernel Gaussian process dynamic model. Signal Process.
**2016**, 124, 63–71. [Google Scholar] [CrossRef] - De Mesquita Sa, J.J., Jr.; Cortez, P.C.; Backes, A.R. Color texture classification using shortest paths in graphs. IEEE Trans. Image Process.
**2014**, 23, 3751–3761. [Google Scholar] [CrossRef] [PubMed] - Wang, T.Y.; Su, H.; Huang, Q.; Guibas, L.; Mitra, N. Unsupervised texture transfer from images to model collections. ACM Trans. Graph
**2016**, 35, 1–13. [Google Scholar] [CrossRef] - Armi, L.; Fekri-Ershad, S. Texture image analysis and texture classification methods-A review. Int. Online J. Image Process. Pattern Recognit.
**2019**, 2, 1–29. [Google Scholar] - Depeursinge, A.; Al-Kadi, O.S.; Mitchell, J.R. Biomedical Texture Analysis: Fundamentals, Tools and Challenges, 1st ed.; Mara Conner-Academic Press: Cambridge, MA, USA, 2017; ISBN 9780128123218. [Google Scholar]
- Chatterjee, S.; Dey, D.; Munshi, S. Optimal selection of features using wavelet fractal descriptors and automatic correlation bias reduction for classifying skin lesions. Biomed. Signal Process. Control
**2018**, 40, 252–262. [Google Scholar] [CrossRef] - Breslavets, A.; Breslavets, M.; Shear, N.H. Quantification of randomness (Entropy) as a clinical tool to assess the severity of skin disease. Med. Hypotheses
**2019**, 132, 109311. [Google Scholar] [CrossRef] - Elshaikh, B.G.; Garelnabi, M.E.M.; Omer, H.; Sulieman, A.; Habeeballa, B.; Tabeidi, R.S. Recognition of brain tumors in MRI images using texture analysis. Saudi J. Biol. Sci.
**2021**, 28, 2381–2387. [Google Scholar] [CrossRef] [PubMed] - Nardi, C.; Tomei, M.; Pietragalla, M.; Calistri, L.; Landini, N.; Bonomo, P.; Mannelli, G.; Mungai, F.; Bonasera, L.; Colagrande, S. Texture analysis in the characterization of parotid salivary gland lesions: A study on MR diffusion weighted imaging. Eur. J. Radiol.
**2021**, 136, 109529. [Google Scholar] [CrossRef] [PubMed] - Costa, A.L.F.; De Souza Carreira, B.; Fardim, K.A.C.; Nussi, A.D.; Da Silva Lima, V.C.; Miguel, M.M.V.; Jardini, M.A.N.; Santamaria, M.P.; De Castro Lopes, S.L.P. Texture analysis of cone beam computed tomography images reveals dental implant stability. Int. J. Oral. Maxillofac. Surg.
**2021**, 1–8. [Google Scholar] [CrossRef] - Haralick, R.M. Statistical and Structural Approaches to Texture. Proc. IEEE
**1979**, 67, 786–804. [Google Scholar] [CrossRef] - Cagnoni, S. Evolutionary Image Analysis and Signal Processing, 10th ed.; Springer: Berlin/Heidelberg, Germany, 2009; pp. 6–8. [Google Scholar] [CrossRef]
- Mryka, H.-B. A Tutorial v. 3.0 March 2017; University of Calgary: Calgary, AL, Canada, 2017. [Google Scholar] [CrossRef]
- Haralick, R.M.; Shanmugam, K.; Dinstein, I. Textural Features for Image Classification. IEEE Trans. Syst. Man Cybern. Syst.
**1973**, 6, 610–621. [Google Scholar] [CrossRef][Green Version] - Tsallis, C. Possible Generalization of Boltzmann-Gibbs Statistics. J. Stat. Phys.
**1988**, 52, 479–487. [Google Scholar] [CrossRef] - Kapur, J.N.; Sahoo, P.K.; Wong, A.K.C. A New Method for Gray-Level Picture Thresholding Using the Entropy of the Histogram. Comput. Gr. Image Process.
**1985**, 29, 273–285. [Google Scholar] [CrossRef] - Da Silva, L.E.; Senra Filho, A.C.; Fazan, V.P.; Felipe, J.C.; Murta, L.O., Jr. Two-dimensional sample entropy analysis of rat sural nerve aging. In Proceedings of the 2014 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA, 26–30 August 2014; pp. 3345–3348. [Google Scholar] [CrossRef]
- Da Silva, L.E.; Senra Filho, A.C.; Fazan, V.P.; Felipe, J.C.; Murta, L.O., Jr. Two-dimensional sample entropy: Assessing image texture through irregularity. Biomed. Phys. Eng. Express.
**2016**, 2, 1–11. [Google Scholar] [CrossRef] - Shannon, C.E. A Mathematical Theory of Communication. Bell Syst. Tech.
**1948**, 27, 379–423. [Google Scholar] [CrossRef][Green Version] - Wu, Y.; Zhou, Y.; Saveriades, G.; Agaian, S.; Noonan, J.P.; Natarajan, P. Local Shannon entropy measure with statistical tests for image randomness. Inf. Sci.
**2013**, 222, 323–342. [Google Scholar] [CrossRef][Green Version] - Tsui, P.-H.; Wan, Y.-L. Effects of Fatty Infiltration of the Liver on the Shannon Entropy of Ultrasound Backscattered Signals. Entropy
**2016**, 18, 341. [Google Scholar] [CrossRef][Green Version] - Lin, Y.-H.; Liao, Y.-Y.; Yeh, C.-K.; Yang, K.-C.; Tsui, P.-H. Ultrasound Entropy Imaging of Nonalcoholic Fatty Liver Disease: Association with Metabolic Syndrome. Entropy
**2018**, 20, 893. [Google Scholar] [CrossRef] [PubMed][Green Version] - Mello Román, J.C.; Vázquez Noguera, J.L.; Legal-Ayala, H.; Pinto-Roa, D.P.; Gomez-Guerrero, S.; García Torres, M. Entropy and Contrast Enhancement of Infrared Thermal Images Using the Multiscale Top-Hat Transform. Entropy
**2019**, 21, 244. [Google Scholar] [CrossRef] [PubMed][Green Version] - Huachun, W.; Jian, Z.; Chunhu, X.; Jiyang, Z.; Yiming, H. Two-dimensional time series sample entropy algorithm: Applications to rotor axis orbit feature identification. MSSP
**2021**, 147, 107123. [Google Scholar] [CrossRef] - Da Silva Senra Filho, A.C.; Duque, J.J.; Silva, L.E.V.; Felipe, J.C.; Fazan, V.P.S.; Junior, L.O.M. Automatic Diabetes Detection from Histological Images of Rats Phrenic Nerve Using Two-Dimensional Sample Entropy. J. Med. Biol. Eng.
**2019**, 39, 70–75. [Google Scholar] [CrossRef] - Kim, I. Multiscale Sample Entropy of Two-Dimensional Decaying Turbulence. Entropy
**2021**, 23, 245. [Google Scholar] [CrossRef] - Hilal, M.; Berthin, C.; Martin, L.; Humeau-Heurtier, A. Skin Alterations in Pseudoxanthoma Elasticum Patients Highlighted by the Bi-Dimensional Sample Entropy Algorithm. In Proceedings of the 2018 International Conference BIOMDLORE, Bialystok, Poland, 28–30 June 2018; pp. 1–6. [Google Scholar] [CrossRef]
- Silva, L.E.V.; Duque, J.J.; Felipe, J.C.; Murta, L.O., Jr.; Humeau-Heurtier, A. Two-dimensional multiscale entropy analysis: Applications to image texture evaluation. Signal Process.
**2018**, 147, 224–232. [Google Scholar] [CrossRef] - Abdelmounaime, S.; Dong-Chen, H. New Brodatz-based image databases for grayscale color and multiband texture analysis. Int. Sch. Res. Not.
**2013**, 2013, 1–14. [Google Scholar] [CrossRef] - Pham, T.D. Measure of texture dynamics with fuzzy metric entropy. In Proceedings of the 12th International Conference on Fuzzy Systems and Knowledge Discovery (FSKD), Zhangjiajie, China, 15–17 August 2015; pp. 385–390. [Google Scholar] [CrossRef]
- Zunino, L.; Ribeiro, H.V. Discriminating image textures with the multiscale two-dimensional complexity-entropy causality plane. Chaos Solitons Fractals
**2016**, 91, 679–688. [Google Scholar] [CrossRef][Green Version]

**Figure 2.**Synthetic images contaminated with different noise levels: (

**a**) images based on sinusoidal functions, (

**b**) chessboard, (

**c**) vertical stripes, and (

**d**) horizontal stripes.

**Figure 5.**Dependence of EspEn on the parameters: (

**a**) square window length (m), (

**b**) threshold of similarity (r), and (

**c**) percentage of similarity ($\rho $).

**Figure 6.**Database of Normalized Brodatz textures. The EspEn algorithm was applied to the images from https://multibandtexture.recherche.usherbrooke.ca/normalized_brodatz_more.html (accessed on 23 September 2021), and 5 images were taken as an example. The last column specifies the entropy value range obtained with EspEn for the images in the corresponding row. Each row can be interpreted as a degree of irregularity.

p Significance | |||||
---|---|---|---|---|---|

MIX Pairwise Comparisons | m = 1 | m = 2 | m = 3 | m = 4 | m = 5 |

MIX(0)–MIX(0.33) | 0.260 | 0.392 | 0.108 | 0.085 | 0.023 |

MIX(0)–MIX(0.66) | 0.024 | 0.007 | 0.001 | 0.001 | 0.000 |

MIX(0)–MIX(1) | 0.000 | 0.000 | 0.000 | 0.000 | 0.023 |

MIX(0.33)–MIX(0.66) | 0.260 | 0.069 | 0.077 | 0.085 | -- |

MIX(0.33)–MIX(1) | 0.001 | 0.000 | 0.001 | 0.001 | -- |

MIX(0.66)–MIX(1) | 0.021 | 0.054 | 0.087 | 0.085 | -- |

p Significance | ||||||
---|---|---|---|---|---|---|

MIX Pairwise Comparisons | r = 5 | r = 15 | r = 25 | r = 35 | r = 45 | r = 55 |

MIX(0)–MIX(0.33) | 0.083 | 0.134 | 0.392 | 0.392 | 0.392 | 0.392 |

MIX(0)–MIX(0.66) | 0.000 | 0.001 | 0.003 | 0.003 | 0.007 | 0.007 |

MIX(0)–MIX(1) | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |

MIX(0.33)–MIX(0.66) | 0.051 | 0.069 | 0.032 | 0.032 | 0.069 | 0.069 |

MIX(0.33)–MIX(1) | 0.001 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |

MIX(0.66)–MIX(1) | 0.193 | 0.087 | 0.087 | 0.087 | 0.054 | 0.054 |

p Significance | ||||||
---|---|---|---|---|---|---|

MIX Pairwise Comparisons | ρ = 0.5 | ρ = 0.6 | ρ = 0.7 | ρ = 0.8 | ρ = 0.9 | ρ = 1 |

MIX(0)–MIX(0.33) | 0.454 | 0.392 | 0.108 | 0.087 | 0.085 | 0.085 |

MIX(0)–MIX(0.66) | 0.005 | 0.003 | 0.001 | 0.001 | 0.001 | 0.001 |

MIX(0)–MIX(1) | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |

MIX(0.33)–MIX(0.66) | 0.042 | 0.032 | 0.077 | 0.087 | 0.085 | 0.085 |

MIX(0.33)–MIX(1) | 0.000 | 0.000 | 0.001 | 0.001 | 0.001 | 0.001 |

MIX(0.66)–MIX(1) | 0.069 | 0.087 | 0.087 | 0.087 | 0.085 | 0.085 |

**Table 4.**Entropy values EspEn obtained from the application of the algorithm EspEn in the images of Normalized Brodatz’s texture database.

Image | EspEn | Image | EspEn | Image | EspEn | Image | EspEn | Image | EspEn | Image | EspEn | Image | EspEn |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

D91 | 3.2809 | D61 | 5.6415 | D53 | 6.3611 | D20 | 6.7323 | D6 | 7.6567 | D100 | 8.3514 | D87 | 9.0954 |

D48 | 3.3013 | D89 | 5.6994 | D1 | 6.3648 | D71 | 6.7439 | D109 | 7.6722 | D19 | 8.3903 | D80 | 9.1871 |

D59 | 3.4067 | D25 | 5.7179 | D94 | 6.4086 | D70 | 6.9054 | D52 | 7.7059 | D78 | 8.4588 | D82 | 9.2503 |

D30 | 3.7778 | D51 | 5.7569 | D72 | 6.4134 | D63 | 6.9277 | D105 | 7.7110 | D104 | 8.4685 | D15 | 9.2758 |

D90 | 4.2005 | D75 | 5.8065 | D66 | 6.5300 | D73 | 6.9387 | D97 | 7.7605 | D85 | 8.4740 | D10 | 9.2975 |

D49 | 4.3454 | D46 | 5.8070 | D102 | 6.5414 | D96 | 6.9952 | D17 | 7.8667 | D54 | 8.4931 | D16 | 9.3094 |

D31 | 4.4261 | D23 | 5.8098 | D13 | 6.5729 | D74 | 7.0016 | D14 | 7.8877 | D5 | 8.5038 | D84 | 9.3123 |

D39 | 4.4927 | D34 | 5.9653 | D95 | 6.5874 | D65 | 7.0283 | D55 | 7.9221 | D28 | 8.5315 | D3 | 9.4322 |

D88 | 4.6406 | D47 | 5.9830 | D68 | 6.5995 | D45 | 7.0507 | D12 | 7.9348 | D22 | 8.6267 | D110 | 9.5855 |

D62 | 4.9174 | D43 | 5.9947 | D64 | 6.6246 | D37 | 7.1197 | D79 | 7.9453 | D81 | 8.6805 | D92 | 9.6326 |

D99 | 4.9702 | D56 | 6.0135 | D26 | 6.6279 | D18 | 7.2808 | D103 | 7.9758 | D83 | 8.6998 | D9 | 9.7136 |

D8 | 4.9785 | D7 | 6.1287 | D67 | 6.6363 | D40 | 7.2836 | D108 | 8.0863 | D36 | 8.7392 | D24 | 9.7185 |

D21 | 5.0191 | D2 | 6.2263 | D98 | 6.6713 | D106 | 7.3473 | D35 | 8.1938 | D41 | 8.8204 | D57 | 9.7451 |

D58 | 5.3044 | D50 | 6.2309 | D42 | 6.6808 | D107 | 7.4336 | D112 | 8.2544 | D93 | 8.8927 | D29 | 9.8173 |

D38 | 5.3089 | D69 | 6.2565 | D60 | 6.7170 | D76 | 7.4341 | D77 | 8.3207 | D111 | 9.0168 | D4 | 9.8291 |

D44 | 5.5531 | D27 | 6.2585 | D101 | 6.7309 | D86 | 7.4523 | D11 | 8.3302 | D33 | 9.0535 | D32 | 9.8896 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Espinosa, R.; Bailón, R.; Laguna, P. Two-Dimensional EspEn: A New Approach to Analyze Image Texture by Irregularity. *Entropy* **2021**, *23*, 1261.
https://doi.org/10.3390/e23101261

**AMA Style**

Espinosa R, Bailón R, Laguna P. Two-Dimensional EspEn: A New Approach to Analyze Image Texture by Irregularity. *Entropy*. 2021; 23(10):1261.
https://doi.org/10.3390/e23101261

**Chicago/Turabian Style**

Espinosa, Ricardo, Raquel Bailón, and Pablo Laguna. 2021. "Two-Dimensional EspEn: A New Approach to Analyze Image Texture by Irregularity" *Entropy* 23, no. 10: 1261.
https://doi.org/10.3390/e23101261