# Spherical Box-Counting: Combining 360° Panoramas with Fractal Analysis

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Aesthetic Qualities, Fractal Geometry, and Architecture

#### 1.2. Architecture and Fractals

#### 1.3. Spherical Perspective Systems

## 2. Materials and Methods

#### 2.1. Box-Counting Method and Complexity

#### 2.1.1. Standard Box-Counting and Influences on the Method

#### 2.1.2. Differential and Improved Differential Box-Counting

- $M=m$ × $\epsilon $ and $N=n$ × $\epsilon $, indicating an even partitioning in the x- and y-directions;
- $M>m$ × $\epsilon $ and $N=n$ × $\epsilon $, indicating an uneven partitioning in the x-direction;
- $M=m$ × $\epsilon $ and $N>n$ × $\epsilon $, indicating an uneven partitioning in the y-direction;
- $M>m$ × $\epsilon $ and $N>n$ × $\epsilon $, indicating an uneven partitioning in the x- and y-directions.

#### 2.1.3. Differential Box-Counting for Color Images

#### 2.1.4. Implementation

#### Grayscale Images

- Grayscale DBX M × M (m × m): The original photograph is reduced and cropped to a section of 512 × 512 pixels ($M$ × $M$). In the case of a rectangular original image, the section can be freely selected in one direction using a slider. Because the original image is a square of 512 × 512 side lengths, the boxes of the grid are also square ($m$ × $m$).
- Grayscale DBX M × N (m × n): With this method, the original photograph is scaled to an image with a maximum side length of 512 pixels while maintaining the aspect ratio ($M$ × $N$) and portion. Box sizes are based on the shorter side of the image. The longer side is divided by this box size and rounded down to get an integer number of boxes. The aspect ratio of a box in the grid can then also be rectangular ($m$ × $n$) and not square.
- Grayscale DBX M × N (m × n) (shifting boxes): This method is the same as number 2 but with moved stacks of cubes.
- Grayscale DBX M × N (m × m) (shifting boxes) (images will be distorted to 512 × 256): This method was developed in the year 2022 to meet the requirements of measuring spherical images. Here, the original image is adjusted to a rectangle of 512 × 256 pixels ($M$ × $N$; this corresponds exactly to the aspect ratio of 1:2 of a spherical image). The box sizes, in turn, are square ($m$ × $m$).

#### Color Images

- Color DBX M × M (m × m) (shifting boxes): Analogously to method 3 of the grayscale images, a square section ($M$ × $M$) is examined with a square grid ($m$ × $m$).
- Color DBX M × N (m × n) (shifting boxes): Analogously to method 4 of the grayscale images, the aspect ratio of the original image is preserved ($M$ × $N$) and examined with a rectangular grid ($m$ × $n$).
- Color DBX M × N (m × m) (shifting boxes) (images will be distorted to 512 × 256): Analogously to method 5 of the greyscale images, the original image is deformed to a size of 512 × 256 pixels and examined with a square mesh.

#### 2.1.5. Surroundings and Vegetation

#### 2.2. Spherical Representation

#### 2.3. Special Implications of the Method

## 3. Results

#### 3.1. Test Cases

#### 3.1.1. Simple Parametrical CAD Models

#### 3.1.2. Spherical Photographs

- Figure 12a: “Chicago Skyline” with a large portion of greenery, ${D}_{B}=2.340$;
- Figure 12b: Federal Center Plaza in Chicago with the “Flamingo” by Alexander Calder from 1974, with a large portion of a uniform-colored plaza and a red colored sculpture in the foreground, ${D}_{B}=2.375$;
- Figure 12j: the Wingspread or Herbert F. Johnson House by Frank Lloyd Wright from 1937 in Wind Point, Wisconsin, with a considerable amount of greenery, ${D}_{B}=2.361$;
- Figure 12l: Quadracci Pavilion by Santiago Calatrava from 2001 in the Milwaukee Art Museum, Wisconsin, with a large portion of uniform floor design and similarly colored building areas, ${D}_{B}=2.338$;
- Figure 12m: the same white-colored building with a large portion of blue sky and uniform floor design, ${D}_{B}=2.338$.

## 4. Discussion

## 5. Conclusions and Outlook

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Lorenz, W.E.; Wurzer, G. FRACAM: A 2.5D Fractal Analysis Method for Facades Test Environment for a Cell Phone Application to Measure Box-counting Dimension. In Proceedings of the eCAADe 2020, Berlin, Germany, 16–18 September 2020; pp. 495–504. [Google Scholar] [CrossRef]
- Mandelbrot, B.B. Scalebound or scaling shapes: A useful distinction in the visual arts and in the natural sciences. Leonardo
**1981**, 14, 45–47. [Google Scholar] [CrossRef] - Mandelbrot, B.B. The Fractal Geometry of Nature; W.H. Freeman: San Francisco, CA, USA, 1982. [Google Scholar]
- Jencks, C. The Architecture of the Jumping Universe; Wiley & Sons: Chichester, UK, 1995. [Google Scholar]
- Lorenz, W.E. Fractals and Fractal Architecture. Master’s Thesis, TU Wien (Vienna University of Technology), Vienna, Austria, 2003. [Google Scholar]
- Franck, G.; Franck, D. Architektonische Qualität; Hanser: München, Germany, 2008. [Google Scholar]
- Salingaros, N.A. A Theory of Architecture; Umbau Verlag: Solingen, Germany, 2006. [Google Scholar]
- Lorenz, W.E.; Andres, J.; Franck, G. Fractal Aesthetics in Architecture. Appl. Math. Inf. Sci.
**2017**, 11, 971–981. [Google Scholar] [CrossRef] - Peitgen, H.-O.; Jürgens, H.; Saupe, D. Chaos and Fractals—New Frontiers of Science; Springer: New York, NY, USA, 1992. [Google Scholar]
- Corbit, J.D.; Garbary, D.J. Fractal dimension as a quantitative measure of complexity in plant development. Proc. R. Soc. Lond. B
**1995**, 262, 1–6. [Google Scholar] [CrossRef] - Foroutan-pour, K.; Dutilleul, P.; Smith, D.L. Advances in the implementation of the box-counting method of fractal dimension estimation. Appl. Math. Comput.
**1999**, 105, 195–210. [Google Scholar] [CrossRef] - Ostwald, M.J.; Vaughan, J. The Fractal Dimension of Architecture; Birkhäuser: Basel, Switzerland, 2016. [Google Scholar]
- Lorenz, W.E.; Kulcke, M. Multilayered Complexity Analysis in Architectural Design: Two Measurement Methods Evaluating Self-Similarity and Complexity. Fractal Fract.
**2021**, 5, 244. [Google Scholar] [CrossRef] - Vaughan, J.; Ostwald, M.J. The comparative numerical analysis of nature and architecture: A new framework. Int. J. Des. Nat. Ecodyn.
**2017**, 12, 156–166. [Google Scholar] [CrossRef] - Alberti, L.B. The Ten Books of Architecture: The 1755 Leoni Edition; Dover: New York, NY, USA, 1986. [Google Scholar]
- Von Goethe, J.W. Zur Farbenlehre; der J. G. Cotta’schen Buchhandlung: Tübingen, Germany, 1810. [Google Scholar]
- Itten, J. Kunst der Farbe: Subjektives Erleben und Objektives Erkennen als Wege zur Kunst; Otto Maier Verlag: Ravensburg, Germany, 1961. [Google Scholar]
- Wittkower, R. Architectural Principles in the Age of Humanism; Tiranti: London, UK, 1962. [Google Scholar]
- Corbusier, L. Towards a New Architecture; J. Rodker: London, UK, 1931. [Google Scholar]
- Mandelbrot, B.B. Les Objets Fractals: Forme Hasard Et Dimension; Flammarion: Paris, France, 1975. [Google Scholar]
- Batty, M.; Longley, P. Fractal Cities; Academic Press Inc.: London, UK, 1994. [Google Scholar]
- Bunde, A. Fractals in Science: With a MS-DOS Program Diskette; Springer: Berlin, Germany, 1994. [Google Scholar]
- Zebari, D.A.; Ibrahim, D.A.; Zeebaree, D.Q.; Mohammed, M.A.; Haron, H.; Zebari, N.A.; Damaševičius, R.; Maskeliūnas, R. Breast Cancer Detection Using Mammogram Images with Improved Multi-Fractal Dimension Approach and Feature Fusion. Appl. Sci.
**2021**, 11, 12122. [Google Scholar] [CrossRef] - Huang, P.; Li, D.; Zhao, H. An Improved Robust Fractal Image Compression Based on M-Estimator. Appl. Sci.
**2022**, 12, 7533. [Google Scholar] [CrossRef] - Mandelbrot, B.B. Fractals: Form Chance and Dimension; W.H. Freeman: San Francisco, CA, USA, 1977. [Google Scholar]
- Mandelbrot, B.B. Fractals and an Art for the Sake of Science. Leonardo
**1989**, 2, 21–24. [Google Scholar] [CrossRef] - Ryu, K.; Jung, M. Agent-based fractal architecture and modelling for developing distributed manufacturing systems. Int. J. Prod. Res.
**2003**, 41, 4233–4255. [Google Scholar] [CrossRef] - Baldini, G.; Amerini, I. Online Distributed Denial of Service (DDoS) intrusion detection based on adaptive sliding window and morphological fractal dimension. Comput. Netw.
**2022**, 210, 108923. [Google Scholar] [CrossRef] - Mandelbrot, B.B. How long is the coast of Britain? Statistical self-similarity and fractional dimension. Science
**1967**, 156, 636–638. [Google Scholar] [CrossRef] [PubMed] - Jiang, B.; Yin, J. Ht-Index for Quantifying the Fractal or Scaling Structure of Geographic Features. Ann. Assoc. Am. Geogr.
**2014**, 104, 530–540. [Google Scholar] [CrossRef] - Bateson, G. Mind and Nature: A Necessary Unity; Bantam Books: New York, NY, USA, 1988. [Google Scholar]
- Misra, R.P.; Ramesh, A. Fundamentals of Cartography, 2nd ed.; Concept Publishing Company: New Delhi, India, 1989. [Google Scholar]
- Arnheim, R. Kunst und Sehen: Eine Psychologie des Schöpferischen Auges; De Gruyter: Berlin, Germany; Boston, MA, USA, 2000. [Google Scholar] [CrossRef]
- Kulcke, M. Spherical Perspective in Design Education. FME Trans. J.
**2019**, 47, 343–348. [Google Scholar] [CrossRef] - Nelson, M.; Gaily, J.L. The Data Compression Book, 2nd ed.; M&T Books: New York, NY, USA, 1996. [Google Scholar]
- Bovill, C. Fractal Geometry in Architecture and Design; Birkhäuser: Boston, MA, USA, 1996. [Google Scholar]
- Vaughan, J.; Ostwald, M.J. Refining the Computational Method for the Evaluation of Visual Complexity in Architectural Images—Significant Lines in the Early Architecture of Le Corbusier. In Proceedings of the eCAADe 2009, Computation: The New Realm of Architectural Design, Istanbul, Turkey, 16–19 September 2009; pp. 686–696. [Google Scholar] [CrossRef]
- Falconer, K.J. Fractal Geometry: Mathematical Foundations and Applications; Wiley: New York, NY, USA, 2003. [Google Scholar]
- Ostwald, M.J. The Fractal Analysis of Architecture: Calibrating the Box-Counting Method Using Scaling Coefficient and Grid Disposition Variables. Environ. Plan. B Plan. Des.
**2013**, 40, 644–663. [Google Scholar] [CrossRef] - Sarker, N.; Chaudhuri, B.B. An efficient differential box-counting approach to compute fractal dimension of image. IEEE Trans. Syst. Man Cybern.
**1994**, 24, 115–120. [Google Scholar] [CrossRef] - Liu, Y.; Chen, L.; Wang, H.; Jiang, L.; Zhang, Y.; Zhao, J.; Wang, D.; Zhao, Y.; Song, Y. An improved differential box-counting method to estimate fractal dimensions of gray-level images. J. Vis. Commun. Image Represent.
**2014**, 25, 1102–1111. [Google Scholar] [CrossRef] - Long, M.; Peng, F. A Box-Counting Method with Adaptable Box Height for Measuring the Fractal Feature of Images. Radioengineering
**2013**, 22, 208–213. [Google Scholar] - Nayak, S.R.; Mishra, J. On Calculation of Fractal Dimension of Color Images. Int. J. Image Graph. Signal Process. (IJIGSP)
**2017**, 9, 33–40. [Google Scholar] [CrossRef] - Kanan, C.; Cottrell, G.W. Color-to-Grayscale: Does the Method Matter in Image Recognition? PLoS ONE
**2012**, 7, e29740. [Google Scholar] [CrossRef] - Weizsäcker, V.V. Der Gestaltkreis. Theorie der Einheit von Wahrnehmen und Bewegen; Suhrkamp Verlag: Frankfurt am Main, Germany, 1973. [Google Scholar]
- Sardenberg, V.; Becker, M. Computational Quantitative Aesthetics Evaluation: Evaluating architectural images using computer vision, machine learning and social media. In Proceedings of the eCAADe 2022, Ghent, Belgium, 13–16 September 2022; Volume 2, pp. 567–574. [Google Scholar]
- Eroğlu, R.; Gül, L.F. Architectural Form Explorations through Generative Adversarial Networks—Predicting the potentials of StyleGAN. In Proceedings of the eCAADe 2022, Ghent, Belgium, 13–16 September 2022; Volume 2, pp. 575–582. [Google Scholar]
- Lorenz, W.E.; Faller, A. (Eds.) Exkursion Chicago 2019; TU Wien E259-01 Architekturwissenschaften—Digitale Architektur und Raumplanung: Vienna, Austria, 2019. [Google Scholar]
- Hoffmann, D. Robie House; Dover Publications: New York, NY, USA, 1984. [Google Scholar]
- Birkhoff, G.D. Aesthetic Measure; Harvard University Press: Cambridge, MA, USA, 1933. [Google Scholar]
- Bense, M. Zeichen und Design—Semiotische Ästhetik; Agis-Verlag: Baden Baden, Germany, 1971. [Google Scholar]

**Figure 1.**Partial spherical grid produced on the basis of Formula (1) [34].

**Figure 3.**Four straight–linear perspectives calculated in GoPro

^{®}VR player 3.0.5 software on the basis of a 360-degree spherical perspective image created with Blender

^{®}3.3.0 software.

**Figure 4.**Differential box-counting method for grayscale images. The yellow highlighted stack of cubes shows the difference between the brightest and darkest pixel for one specific cell (i;j) of a certain grid size.

**Figure 5.**Differential box-counting of the web application “FRACAM”, showing the castle of Ghent, Belgium. (

**Left top**,

**left middle**): results, with ${D}_{Red}$ = 0.471, ${D}_{Green}$ = 0.470, and ${D}_{Blue}$ = 0.466; with ${Correlation}_{Red}$ = 0.471, ${Correlation}_{Green}$ = 0.999949, and ${Correlation}_{Blue}$ = 0.999921; ${D}_{Average}$ = 2.469; ${D}_{col}$ = 3.408; (

**left bottom**): used box sizes; (

**right side**): RGB separation.

**Figure 6.**Spherical perspective rendering produced in Blender with an overlay of curves representing the first and third dimensions according to the formula in [34] (cylindrical roll-out) and the second dimension in vertical lines according to the torus-like roll-out of the grid in this direction.

**Figure 7.**Checkerboard measurement with the “Grayscale DBX M × M (m × m)” method. (

**Left**): Image section with a matching grid (${D}_{B}=2$ with a correlation of 1.0). (

**Right**): Image section that was moved relative to the grid (${D}_{B}=2.028$ with a correlation of 0.999983).

**Figure 8.**Measurement method “Grayscale DBX M × N (m × m) (shifting boxes)” with the grayscale conversion adapted to the perception of brightness (see Formula (13)) applied to a red-tinted (

**left**; ${D}_{B}=2.391$ with a correlation of 0.998568), green-tinted (

**center**; ${D}_{B}=2.356$ with a correlation of 0.998986), and blue-tinted façade (

**right**; ${D}_{B}=2.372$ with a correlation of 0.998868).

**Figure 9.**Measurement method “Grayscale DBX M × N (m × m) (shifting boxes)” with the grayscale conversion adapted to the perception of brightness (see Formula (13)) applied to a closed (

**left**; image “22_11_01 Hof03_w_White”; ${D}_{B}=2.363$ with a correlation of 0.998963) and an open square (

**right**; image “22_11_01 Hof02_w_White”; ${D}_{B}=2.332$ with a correlation of 0.999166).

**Figure 10.**Measurement method “Grayscale DBX M × N (m × m) (shifting boxes)” with the grayscale conversion adapted to the perception of brightness (see Formula (13)) applied to portrait windows of the opposite and right façades (

**left**; image “22_11_02 Hof01_w”; ${D}_{B}=2.360$), lower windows on the right façade (

**center**; image “22_11_02 Hof02_w”; ${D}_{B}=2.366$ ), and additional smaller windows of the opposite façade (

**right**; image “22_11_02 Hof03_w”; ${D}_{B}=2.367$ ).

**Figure 11.**Measurement method “Grayscale DBX M × N (m × m) (shifting boxes)” with the grayscale conversion adapted to the perception of brightness (see Formula (13)) applied to different heights of the opposite and right façades (

**left**: image “22_11_03 Hof01_w_White”, ${D}_{B}=2.370$;

**center**: image “22_11_03 Hof02_w_White”, ${D}_{B}=2.380$;

**right**: image “22_11_03 Hof03_w_White”; ${D}_{B}=2.387$ ).

**Figure 12.**Measurement method “Grayscale DBX M × N (m × m) (shifting boxes)” with the weighted grayscale conversion adapted to the perception of brightness (see Formula (13)) applied to different spherical photographs.

**Figure 13.**Measurement method “Color DBX M × N (m × m) (shifting boxes)” with the weighted grayscale conversion (see Formula (13)) applied to different spherical photographs.

**Figure 14.**Measurement method “Color DBX M × N (m × m) (shifting boxes)” with the standard grayscale conversion (see Formula (12)) applied to different spherical photographs.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 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**

Kulcke, M.; Lorenz, W.E. Spherical Box-Counting: Combining 360° Panoramas with Fractal Analysis. *Fractal Fract.* **2023**, *7*, 327.
https://doi.org/10.3390/fractalfract7040327

**AMA Style**

Kulcke M, Lorenz WE. Spherical Box-Counting: Combining 360° Panoramas with Fractal Analysis. *Fractal and Fractional*. 2023; 7(4):327.
https://doi.org/10.3390/fractalfract7040327

**Chicago/Turabian Style**

Kulcke, Matthias, and Wolfgang E. Lorenz. 2023. "Spherical Box-Counting: Combining 360° Panoramas with Fractal Analysis" *Fractal and Fractional* 7, no. 4: 327.
https://doi.org/10.3390/fractalfract7040327