# Lacunarity

Figure 1. Basic fractal patterns increasing in lacunarity from left to right.
The same images as above, rotated 90°. Whereas the first two images appear essentially the same as they do above, the third looks different from its unrotated original. This feature is captured in measures of lacunarity listed across the top of the figures, as calculated using standard biological imaging box counting software FracLac, Image.

Lacunarity, from the Latin lacuna, meaning "gap" or "lake", is a specialized term in geometry referring to a measure of how patterns, especially fractals, fill space, where patterns having more or larger gaps generally have higher lacunarity. Beyond being an intuitive measure of gappiness, lacunarity can quantify additional features of patterns such as "rotational invariance" and more generally, heterogeneity.[1][2][3] This is illustrated in Figure 1 showing three fractal patterns. When rotated 90°, the first two fairly homogeneous patterns do not appear to change, but the third more heterogeneous figure does change and has correspondingly higher lacunarity. The earliest reference to the term in geometry is usually attributed to Mandelbrot, who, in 1983 or perhaps as early as 1977, introduced it as, in essence, an adjunct to fractal analysis.[4] Lacunarity analysis is now used to characterize patterns in a wide variety of fields and has application in multifractal analysis[5][6] in particular (see Applications).

## Measuring lacunarity

In many patterns or data sets, lacunarity is not readily perceivable or quantifiable, so computer-aided methods have been developed to calculate it. As a measurable quantity, lacunarity is often denoted in scientific literature by the Greek letters ${\displaystyle \Lambda }$ or ${\displaystyle \lambda }$ but it is important to note that there is no single standard and several different methods exist to assess and interpret lacunarity.

### Box counting lacunarity

Figure 2a. Boxes laid over an image as a fixed grid.
Figure 2b. Boxes slid over an image in an overlapping pattern.

One well-known method of determining lacunarity for patterns extracted from digital images uses box counting, the same essential algorithm typically used for some types of fractal analysis.[1][4] Similar to looking at a slide through a microscope with changing levels of magnification, box counting algorithms look at a digital image from many levels of resolution to examine how certain features change with the size of the element used to inspect the image. Basically, the arrangement of pixels is measured using traditionally square (i.e., box-shaped) elements from an arbitrary set of ${\displaystyle \mathrm {E} }$ sizes, conventionally denoted ${\displaystyle \varepsilon }$s. For each ${\displaystyle \varepsilon }$, the box is placed successively over the entire image, and each time it is laid down, the number of pixels that fall within the box is recorded.[note 1] In standard box counting, the box for each ${\displaystyle \varepsilon }$ in ${\displaystyle \mathrm {E} }$ is placed as though it were part of a grid overlaid on the image so that the box does not overlap itself, but in sliding box algorithms the box is slid over the image so that it overlaps itself and the "Sliding Box Lacunarity" or SLac is calculated.[3][7] Figure 2 illustrates both types of box counting.

#### Calculations from box counting

The data gathered for each ${\displaystyle \varepsilon }$ are manipulated to calculate lacunarity. One measure, denoted here as ${\displaystyle \lambda _{\varepsilon }}$, is found from the coefficient of variation (${\displaystyle {\mathit {CV}}}$), calculated as the standard deviation (${\displaystyle \sigma }$) divided by the mean (${\displaystyle \mu }$), for pixels per box.[1][3][6] Because the way an image is sampled will depend on the arbitrary starting location, for any image sampled at any ${\displaystyle \varepsilon }$ there will be some number (${\displaystyle {\mathit {G}}}$) of possible orientations, each denoted here by ${\displaystyle {\mathit {g}}}$, that the data can be gathered over, which can have varying effects on the measured distribution of pixels.[5][note 2] Equation 1 shows the basic method of calculating ${\displaystyle \lambda _{\varepsilon ,g}}$:

${\displaystyle \lambda _{\varepsilon ,g}=(CV_{\varepsilon ,g})^{2}=\left({\frac {\sigma _{\varepsilon ,g}}{\mu _{\varepsilon ,g}}}\right)^{2}}$

(1)

##### Probability distributions

Alternatively, some methods sort the numbers of pixels counted into a probability distribution having ${\displaystyle B}$ bins, and use the bin sizes (masses, ${\displaystyle m}$) and their corresponding probabilities (${\displaystyle p}$) to calculate ${\displaystyle \lambda _{\varepsilon ,g}}$ according to Equations 2 through 5:

${\displaystyle \mu _{\varepsilon }=\sum _{i=1}^{B}{m_{i,\varepsilon }p_{i,\varepsilon }}}$

(2)

${\displaystyle {\mathit {v}}_{\varepsilon }=\sum _{i-1}^{B}{\left(m_{i,\varepsilon }-\mu _{\varepsilon }\right)^{2}p_{i,\varepsilon }}}$

(3)

${\displaystyle \sigma _{\varepsilon }={\sqrt {{\mathit {v}}_{\varepsilon }}}=\sum _{i=1}^{B}{m_{i,\varepsilon }^{2}p_{i,\varepsilon }-\mu _{\varepsilon }^{2}}}$

(4)

${\displaystyle \lambda _{\varepsilon }={\frac {\sum _{i=1}^{B}{m_{i,\varepsilon }^{2}p_{i,\varepsilon }-\mu _{\varepsilon }^{2}}}{\mu _{\varepsilon }^{2}}}={\frac {\sigma _{\varepsilon }^{2}}{\mu _{\varepsilon }^{2}}}}$

(5)

#### Interpreting λ

Lacunarity based on ${\displaystyle \lambda _{\varepsilon ,g}}$ has been assessed in several ways including by using the variation in or the average value of ${\displaystyle \lambda _{\varepsilon ,g}}$ for each ${\displaystyle \varepsilon }$ (see Equation 6) and by using the variation in or average over all grids (see Equation 7).[1][5][7][8]

${\displaystyle {\overline {\lambda _{\varepsilon ,g}}}={\frac {\sum _{\varepsilon =1}^{\mathrm {E} }\lambda _{\varepsilon ,g}}{\mathrm {E} }}}$

(6)

${\displaystyle \Lambda _{\mathit {g}}={\frac {\sum _{{\mathit {g}}=1}^{\mathit {G}}{\overline {\lambda _{\varepsilon ,g}}}}{\mathit {G}}}}$

(7)

##### Relationship to the fractal dimension

Lacunarity analyses using the types of values discussed above have shown that data sets extracted from dense fractals, from patterns that change little when rotated, or from patterns that are homogeneous, have low lacunarity, but as these features increase,[clarification needed] so generally does lacunarity. In some instances, it has been demonstrated that fractal dimensions and values of lacunarity were correlated,[1] but more recent research has shown that this relationship does not hold for all types of patterns and measures of lacunarity.[5] Indeed, as Mandelbrot originally proposed, lacunarity has been shown to be useful in discerning amongst patterns (e.g., fractals, textures, etc.) that share or have similar fractal dimensions in a variety of scientific fields including neuroscience.[8]

#### Graphical lacunarity

Other methods of assessing lacunarity from box counting data use the relationship between values of lacunarity (e.g., ${\displaystyle \lambda _{\varepsilon ,g}}$) and ${\displaystyle \varepsilon }$ in different ways from the ones noted above. One such method looks at the ${\displaystyle \ln }$ vs ${\displaystyle \ln }$ plot of these values. According to this method, the curve itself can be analyzed visually, or the slope at ${\displaystyle {\mathit {g}}}$ can be calculated from the ${\displaystyle \ln }$ vs ${\displaystyle \ln }$ regression line.[3][7] Because they tend to behave in certain ways for respectively mono-, multi-, and non-fractal patterns, ${\displaystyle \ln }$ vs ${\displaystyle \ln }$ lacunarity plots have been used to supplement methods of classifying such patterns.[5][8]

To make the plots for this type of analysis, the data from box counting first have to be transformed as in Equation 9:

${\displaystyle f\lambda _{\varepsilon ,g}=\lambda _{\varepsilon ,g}+1}$

(9)

This transformation avoids undefined values, which is important because homogeneous images will have ${\displaystyle \sigma }$ at some ${\displaystyle \varepsilon }$ equal to 0 so that the slope of the ${\displaystyle \ln }$ vs ${\displaystyle \ln }$ regression line would be impossible to find. With ${\displaystyle f\lambda _{\varepsilon ,g}}$, homogeneous images have a slope of 0, corresponding intuitively to the idea of no rotational or translational invariance and no gaps.[9]

One box counting technique using a "gliding" box calculates lacunarity according to:

${\displaystyle {\mathcal {L}}(r)={\frac {\sum _{i=1}^{r^{2}}S_{i}^{2}Q(S_{i},r)}{\left(\sum _{i=1}^{r^{2}}S_{i}Q(S_{i},r)\right)^{2}}}.}$

(10)

${\displaystyle S_{i}}$ is the number of filled data points in the box and ${\displaystyle Q(S_{i},r)}$ the normalized frequency distribution of ${\displaystyle S_{i}}$ for different box sizes.

#### Prefactor lacunarity

Another proposed way of assessing lacunarity using box counting, the Prefactor method, is based on the value obtained from box counting for the fractal dimension (${\displaystyle D_{B}}$). This statistic uses the variable ${\displaystyle A}$ from the scaling rule ${\displaystyle N=A\varepsilon ^{D_{B}}}$, where ${\displaystyle A}$ is calculated from the y-intercept (${\displaystyle {\mathit {y}}}$) of the ln-ln regression line for ${\displaystyle \varepsilon }$ and either the count (${\displaystyle N}$) of boxes that had any pixels at all in them or else ${\displaystyle m}$ at ${\displaystyle g}$. ${\displaystyle A}$ is particularly affected by image size and the way data are gathered, especially by the lower limit of ${\displaystyle \varepsilon }$s used. The final measure is calculated as shown in Equations 11 through 13:[1][4]

${\displaystyle A_{g}={\frac {1}{e^{{\mathit {y}}_{g}}}}}$

(11)

${\displaystyle {\overline {A}}={\frac {\sum _{g=1}^{G}A_{g}}{G}}}$

(12)

${\displaystyle P\Lambda ={\frac {\sum _{g=1}^{G}{\left({\frac {A_{g}}{\overline {A}}}-1\right)^{2}}}{G}}}$

(13)

## Applications

Below is a list of some fields where lacunarity plays an important role, along with links to relevant research illustrating practical uses of lacunarity.

## Notes

1. ^ This contrasts with box counting fractal analysis where the total number of boxes that contained any pixels is counted to determine a fractal dimension.
2. ^ See FracLac, Box Counting for an explanation of methods to address variation with grid location

## References

1. Smith, T. G.; Lange, G. D.; Marks, W. B. (1996). "Fractal methods and results in cellular morphology — dimensions, lacunarity and multifractals". Journal of Neuroscience Methods. 69 (2): 123–136. doi:10.1016/S0165-0270(96)00080-5. PMID 8946315. S2CID 20175299.
2. ^ a b Plotnick, R. E.; Gardner, R. H.; Hargrove, W. W.; Prestegaard, K.; Perlmutter, M. (1996). "Lacunarity analysis: A general technique for the analysis of spatial patterns". Physical Review E. 53 (5): 5461–8. Bibcode:1996PhRvE..53.5461P. doi:10.1103/physreve.53.5461. PMID 9964879.
3. ^ a b c d Plotnick, R. E.; Gardner, R. H.; O'Neill, R. V. (1993). "Lacunarity indices as measures of landscape texture". Landscape Ecology. 8 (3): 201. doi:10.1007/BF00125351. S2CID 7112365.
4. ^ a b c
5. Karperien (2004). "Chapter 8 Multifractality and Lacunarity". Defining Microglial Morphology: Form, Function, and Fractal Dimension. Charles Sturt University.
6. ^ a b c Al-Kadi, O.S.; Watson, D. (2008). "Texture Analysis of Aggressive and non-Aggressive Lung Tumor CE CT Images" (PDF). IEEE Transactions on Biomedical Engineering. 55 (7): 1822–30. doi:10.1109/TBME.2008.919735. PMID 18595800. S2CID 14784161. Archived from the original (PDF) on 2014-04-13. Retrieved 2014-04-10.
7. ^ a b c McIntyre, N. E.; Wiens, J. A. (2000). "A novel use of the lacunarity index to discern landscape function". Landscape Ecology. 15 (4): 313. doi:10.1023/A:1008148514268. S2CID 18644861.
8. ^ a b c Jelinek, Herbert; Karperien, Audrey; Milosevic, Nebojsa (June 2011). "Lacunarity Analysis and Classification of Microglia in Neuroscience". 8th European Conference on Mathematical and Theoretical Biology, Kraków.
9. ^ Karperien (2002). "Interpreting Lacunarity". FracLac.
10. ^ Tolle, C. (2003). "Lacunarity definition for ramified data sets based on optimal cover". Physica D: Nonlinear Phenomena. 179 (3–4): 129–201. Bibcode:2003PhyD..179..129T. doi:10.1016/S0167-2789(03)00029-0.
11. ^ Stevens, N. E.; Harro, D. R.; Hicklin, A. (2010). "Practical quantitative lithic use-wear analysis using multiple classifiers". Journal of Archaeological Science. 37 (10): 2671. doi:10.1016/j.jas.2010.06.004.
12. ^ Rievra-Virtudazo, R.V.; Tapia, A.K.G; Valenzuela, J.F.B.; Cruz, L.D.; Mendoza, H.D.; Castriciones, E.V. (23 November 2008). "47. Lacunarity analysis of TEM Images of Heat-Treated Hybrid Organosilica Materials". In Sener, Bilge (ed.). Innovations in Chemical Biology. Springer. pp. 397–404. ISBN 978-1-4020-6955-0.
13. ^ Filho, M.B.; Sobreira, F. (2008). "Accuracy of Lacunarity Algorithms in Texture Classification of High Spatial Resolution Images from Urban Areas" (PDF). The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences. XXXVII (Part B3b).
14. ^ Gorsich, D. J.; Tolle, C. R.; Karlsen, R. E.; Gerhart, G. R. (1996). "Wavelet and fractal analysis of ground-vehicle images". In Unser, Michael A; Aldroubi, Akram; Laine, Andrew F (eds.). Wavelet Applications in Signal and Image Processing IV. Wavelet Applications in Signal and Image Processing IV. 2825. pp. 109–119. doi:10.1117/12.255224. S2CID 121560110.
15. ^ Vannucchi, P.; Leoni, L. (30 October 2007). "Structural characterization of the Costa Rica decollement: Evidence for seismically-induced fluid pulsing". Earth and Planetary Science Letters. 262 (3–4): 413–428. Bibcode:2007E&PSL.262..413V. doi:10.1016/j.epsl.2007.07.056. hdl:2158/257208.
16. ^ Yaşar, F.; Akgünlü, F. (2005). "Fractal dimension and lacunarity analysis of dental radiographs". Dentomaxillofacial Radiology. 34 (5): 261–267. doi:10.1259/dmfr/85149245. PMID 16120874.
17. ^ Valous, N.A.; Sun, D.-W.; Allen, P.; Mendoza, F. (January 2010). "The use of lacunarity for visual texture characterization of pre-sliced cooked pork ham surface intensities Food Research International". 43 (1): 387–395. doi:10.1016/j.foodres.2009.10.018. Cite journal requires |journal= (help)