m (Onate moved page Review 368345517339 to Acosta et al 2021a)
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
'''C.  R.  Acosta1, F.  Peñuñuri 1, O. Carvente 1'''
 
'''C.  R.  Acosta1, F.  Peñuñuri 1, O. Carvente 1'''
 
-->
 
-->
 
 
==Abstract==
 
==Abstract==
  
 
Measuring fractal dimension in general is made over edges of a figure, however this kind of calculations could be made over a 1D,  2D or even a 3D images.  With the FracLac plugin of ImageJ application, it has been possible to measure both dimensions, over the area and over the edge of a Mandelbrot fractal, using the Box Counting technique.
 
Measuring fractal dimension in general is made over edges of a figure, however this kind of calculations could be made over a 1D,  2D or even a 3D images.  With the FracLac plugin of ImageJ application, it has been possible to measure both dimensions, over the area and over the edge of a Mandelbrot fractal, using the Box Counting technique.
  
'''keywords'''
+
'''Keywords''': Box countig, Mandelbort fractal, fractal dimension, ImageJ
  
Box Countig, Mandelbort fractal, Fractal dimension, ImageJ
+
==1. Introduction==
  
Facultad de Ingeniería de la Universidad Autónoma de Yucatán
+
Historical measurements with a straight line function over the England coast line made by Benoit Mandelbrot  using different scales represented as “measuring rods”  <span id='citeF-1'></span><span id='citeF-2'></span>[[#cite-1|[1,2]]], which is based on a Lewis Fry Richardson's idea <span id='citeF-3'></span>[[#cite-3|[3]]], can be calculated directly with any of the simplified data  ([[#table-1|Tables 1]], and [[#table-2|2]]), shown below.
  
organization = Applied Physics Department, Facultad de Ingeniería de la Universidad Autónoma de Yucatán            addressline =  Av. Industrias no contaminates por anillo periférico norte S/N              city = Mérida            postcode = 97310              state = Yucatán            country = Mexico
+
<div class="center" style="font-size: 75%;">'''Table 1'''. The magnitude of scale is in kms</div>
 
+
==1 Introduction==
+
 
+
Historical measurements with a straight line function over the England coast line made by Benoit Mandelbrot  using different scales represented as “measuring rods”  <span id='citeF-1'></span><span id='citeF-2'></span>[[#cite-1|[1,2]]], which is based on a Lewis Fry Richardson's idea <span id='citeF-3'></span>[[#cite-3|[3]]], can be calculated directly with any of the simplified data tables ([[#table-1|1]], [[#table-2|2]]), shown below.
+
 
+
 
+
{|  class="floating_tableSCP wikitable" style="text-align: center; margin: 1em auto;min-width:50%;"
+
|+ style="font-size: 75%;" |<span id='table-1'></span>Table. 1 The magnitude of scale is in kms.
+
|- style="border-top: 2px solid;"
+
| style="border-left: 2px solid;border-right: 2px solid;" |  Scale (s)
+
| style="border-left: 2px solid;border-right: 2px solid;" | Long. (L)
+
| style="border-left: 2px solid;border-right: 2px solid;" | Ln(s)
+
| style="border-left: 2px solid;border-right: 2px solid;" | Ln(L)
+
|- style="border-top: 2px solid;"
+
| style="border-left: 2px solid;border-right: 2px solid;" |  200
+
| style="border-left: 2px solid;border-right: 2px solid;" | 2350
+
| style="border-left: 2px solid;border-right: 2px solid;" | 5.2983
+
| style="border-left: 2px solid;border-right: 2px solid;" | 7.7622
+
|- style="border-top: 2px solid;"
+
| style="border-left: 2px solid;border-right: 2px solid;" |  100
+
| style="border-left: 2px solid;border-right: 2px solid;" | 2775
+
| style="border-left: 2px solid;border-right: 2px solid;" | 4.6052
+
| style="border-left: 2px solid;border-right: 2px solid;" | 7.9284
+
|- style="border-top: 2px solid;border-bottom: 2px solid;"
+
| style="border-left: 2px solid;border-right: 2px solid;" |  50
+
| style="border-left: 2px solid;border-right: 2px solid;" | 3425
+
| style="border-left: 2px solid;border-right: 2px solid;" | 5.2983
+
| style="border-left: 2px solid;border-right: 2px solid;" | 8.1389
+
  
 +
<span id='table-1'></span>
 +
{| class="wikitable" style="margin: 1em auto 0.1em auto;border-collapse: collapse;font-size:85%;width:auto;"
 +
|-style="text-align:center"
 +
!  Scale (s) !!  Long. (L) !!  Ln(s) !!  Ln(L)
 +
|- style="text-align:center"
 +
|  200
 +
|  2350
 +
|  5.2983
 +
|  7.7622
 +
|- style="text-align:center"
 +
|  100
 +
|  2775
 +
|  4.6052
 +
|  7.9284
 +
|- style="text-align:center"
 +
|  50
 +
|  3425
 +
|  5.2983
 +
|  8.1389
 
|}
 
|}
  
  
{|  class="floating_tableSCP wikitable" style="text-align: center; margin: 1em auto;min-width:50%;"
+
<div class="center" style="font-size: 75%;">'''Table 2'''. The scale is relative to the greatest magnitude</div>
|+ style="font-size: 75%;" |<span id='table-2'></span>Table. 2 The scale is relative to the greatest magnitude.
+
<span id='table-2'></span>
|- style="border-top: 2px solid;"
+
{| class="wikitable" style="margin: 1em auto 0.1em auto;border-collapse: collapse;font-size:85%;width:auto;"  
| style="border-left: 2px solid;border-right: 2px solid;" |  Scale (s)
+
|-style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | Long. (L)  
+
!  Scale (s) !!  Long. (L) !!  Ln(s) !!  Ln(L)  
| style="border-left: 2px solid;border-right: 2px solid;" | Ln(s)  
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | Ln(L)  
+
|   200/200  
|- style="border-top: 2px solid;"
+
| 2350  
| style="border-left: 2px solid;border-right: 2px solid;" |  200/200  
+
| 0.0000  
| style="border-left: 2px solid;border-right: 2px solid;" | 2350  
+
| 7.7622  
| style="border-left: 2px solid;border-right: 2px solid;" | 0.0000  
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | 7.7622  
+
|   100/200  
|- style="border-top: 2px solid;"
+
| 2775  
| style="border-left: 2px solid;border-right: 2px solid;" |  100/200  
+
| -6.6931  
| style="border-left: 2px solid;border-right: 2px solid;" | 2775  
+
| 7.9284  
| style="border-left: 2px solid;border-right: 2px solid;" | -6.6931  
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | 7.9284  
+
|   50/200  
|- style="border-top: 2px solid;border-bottom: 2px solid;"
+
| 3425  
| style="border-left: 2px solid;border-right: 2px solid;" |  50/200  
+
| -1.3863  
| style="border-left: 2px solid;border-right: 2px solid;" | 3425  
+
| 8.1389  
| style="border-left: 2px solid;border-right: 2px solid;" | -1.3863  
+
| style="border-left: 2px solid;border-right: 2px solid;" | 8.1389  
+
 
+
 
|}
 
|}
  
Linear regression  calculations from data of the first table ([[#table-1|1]]),  are made directly over the scale, while in the second data table, greatest magnitude is used as reference ([[#table-2|2]]).
 
  
Result of linear adjustment over data from any of both tables is the equation ([[#eq-1|1]])
+
Linear regression  calculations from data of the first  ([[#table-1|Table 1]]),  are made directly over the scale, while in the second data table, greatest magnitude is used as reference ([[#table-2|Table 2]]).
  
 +
Result of linear adjustment over data from any of both tables is the Eq.([[#eq-1|1]])
 
<span id="eq-1"></span>
 
<span id="eq-1"></span>
 
{| class="formulaSCP" style="width: 100%; text-align: left;"  
 
{| class="formulaSCP" style="width: 100%; text-align: left;"  
Line 114: Line 101:
 
|}
 
|}
  
And by analogy with the fractal dimension, <math display="inline">D_B</math> that is generally called “capacity” or “box dimension” is defined by the relation ([[#eq-3|3]]) <span id='citeF-4'></span>[[#cite-4|[4]]]
+
And by analogy with the fractal dimension, <math display="inline">D_B</math> that is generally called “capacity” or “box dimension” is defined by the relation (Eq.[[#eq-3|(3)]]) <span id='citeF-4'></span>[[#cite-4|[4]]]
  
 
<span id="eq-3"></span>
 
<span id="eq-3"></span>
Line 127: Line 114:
 
|}
 
|}
  
If the box counting technique is utilized to calculate again the fractal dimension of the England coast line,  table ([[#table-3|3]]) must be used <span id='citeF-5'></span>[[#cite-5|[5]]].
+
If the box counting technique is utilized to calculate again the fractal dimension of the England coast line,  ([[#table-3|Table 3]]) must be used <span id='citeF-5'></span>[[#cite-5|[5]]].
  
 +
<div class="center" style="font-size: 75%;">'''Table 3'''. Data to calculate fractal dimension <math>D_B</math> using “Box Counting” technique</div>
  
{| class="floating_tableSCP wikitable" style="text-align: center; margin: 1em auto;min-width:50%;"
+
<span id='table-3'></span>
|+ style="font-size: 75%;" |<span id='table-3'></span>Table. 3 Data to calculate fractal dimension <math>D_B</math> using “Box Counting” technique.
+
{| class="wikitable" style="margin: 1em auto 0.1em auto;border-collapse: collapse;font-size:85%;width:auto;"  
|- style="border-top: 2px solid;"
+
|-style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" |  Scale (<math display="inline">\xi _k</math>)  
+
Scale (<math display="inline">\xi _k</math>) !!  <math>N(\xi _k)</math> !!  <math>\ln (1/\xi _k)</math> !!  <math>\ln (N)</math>  
| style="border-left: 2px solid;border-right: 2px solid;" | <math>N(\xi _k)</math>
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | <math>\ln (1/\xi _k)</math>
+
|   1  
| style="border-left: 2px solid;border-right: 2px solid;" | <math>\ln (N)</math>
+
| 2350  
|- style="border-top: 2px solid;"
+
| 0.0000  
| style="border-left: 2px solid;border-right: 2px solid;" |  1  
+
| 7.7622  
| style="border-left: 2px solid;border-right: 2px solid;" | 2350  
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | 0.0000  
+
|   0.5  
| style="border-left: 2px solid;border-right: 2px solid;" | 7.7622  
+
| 5550  
|- style="border-top: 2px solid;"
+
| 0.6931  
| style="border-left: 2px solid;border-right: 2px solid;" |  0.5  
+
| 8.6216  
| style="border-left: 2px solid;border-right: 2px solid;" | 5550  
+
|- style="text-align:center"
| style="border-left: 2px solid;border-right: 2px solid;" | 0.6931  
+
|  0.25  
| style="border-left: 2px solid;border-right: 2px solid;" | 8.6216  
+
| 13700  
|- style="border-top: 2px solid;border-bottom: 2px solid;"
+
| 1.3863  
| style="border-left: 2px solid;border-right: 2px solid;" |  0.25  
+
| 9.5252  
| style="border-left: 2px solid;border-right: 2px solid;" | 13700  
+
| style="border-left: 2px solid;border-right: 2px solid;" | 1.3863  
+
| style="border-left: 2px solid;border-right: 2px solid;" | 9.5252  
+
 
+
 
|}
 
|}
  
The result of applying the linear adjustment over the data table ([[#table-3|3]]) is the equation shown below ([[#eq-4|4]]).
+
 
 +
The result of applying the linear adjustment over the data ([[#table-3|Table 3]]) is the equation shown below (Eq.[[#eq-4|(4)]])
  
 
<span id="eq-4"></span>
 
<span id="eq-4"></span>
Line 170: Line 155:
 
and it could be seen that the fractal dimension is given directly form the slope of the equation <math display="inline">D_B = 1.27</math>.
 
and it could be seen that the fractal dimension is given directly form the slope of the equation <math display="inline">D_B = 1.27</math>.
  
So there are two methods to calculate the fractal dimension, but if  “measuring rods” are used, some additional operations must be made to obtain the result.  In the “Box Counting Fractal” technique the result is directly the slope of straight line equation ([[#eq-4|4]]) <span id='citeF-6'></span>[[#cite-6|[6]]].
+
So there are two methods to calculate the fractal dimension, but if  “measuring rods” are used, some additional operations must be made to obtain the result.  In the “Box Counting Fractal” technique the result is directly the slope of straight line (Eq.[[#eq-4|(4)]]) <span id='citeF-6'></span>[[#cite-6|[6]]].
  
==2 ImageJ application==
+
==2. ImageJ application==
  
 
The “ImageJ” app is a free software from the project “SciJava OSS” used to images processing, with this powerful tool we can manipulate and measure any graphic file, and in conjunction with the FracLac plugin (that it is used to make calculations over fractals) we can obtain the fractal dimension based on the box counting (BC) method <span id='citeF-6'></span>[[#cite-6|[6]]].
 
The “ImageJ” app is a free software from the project “SciJava OSS” used to images processing, with this powerful tool we can manipulate and measure any graphic file, and in conjunction with the FracLac plugin (that it is used to make calculations over fractals) we can obtain the fractal dimension based on the box counting (BC) method <span id='citeF-6'></span>[[#cite-6|[6]]].
Line 192: Line 177:
 
===2.1 Preliminary measurement===
 
===2.1 Preliminary measurement===
  
As a first step a scale must be established on the figure, so with this objective, open a graphic file and in the toolbar choose the “Straight” tool, as is shown in figure [[#img-1|1]].
+
As a first step a scale must be established on the figure, so with this objective, open a graphic file and in the toolbar choose the “Straight” tool, as is shown in [[#img-1|Figure 1]].
  
 
<div id='img-1'></div>
 
<div id='img-1'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Imagej-Toolbar.png|425px|<span style="text-align: center; font-size: 75%;">Toolbar of the ImageJ app. </span>]]
+
|style="padding:10px;"| [[Image:Review_368345517339-Imagej-Toolbar.png|425px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 1:''' <span style="text-align: center; font-size: 75%;">Toolbar of the ImageJ app. </span>
+
| colspan="1" style="padding:10px;"| '''Figure 1'''. Toolbar of the ImageJ app
 
|}
 
|}
  
Over the Mandelbrot figure [[#img-2|2]], locate the scale and with the shift button and the mouse pressed, touch one end of the scale and without release go to the other end, then release.
+
 
 +
Over the Mandelbrot [[#img-2|Figure 2]], locate the scale and with the shift button and the mouse pressed, touch one end of the scale and without release go to the other end, then release.
  
 
<div id='img-2'></div>
 
<div id='img-2'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Mandelbrot-with-scale.png|122px|<span style="text-align: center; font-size: 75%;">Mandelbrot figure with measure over the scale. </span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Mandelbrot-with-scale.png|222px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 2:''' <span style="text-align: center; font-size: 75%;">Mandelbrot figure with measure over the scale. </span>
+
| colspan="1" style="padding:10px;"| '''Figure 2'''. Mandelbrot figure with measure over the scale
 
|}
 
|}
  
After this, go to menu and over “Analyze” select “Set Scale”, as shown in figure [[#img-3|3]], put in the “Known distance” the value of the scale and in unit write the name of the scale.
+
 
 +
After this, go to menu and over “Analyze” select “Set Scale”, as shown in [[#img-3|Figure 3]], put in the “Known distance” the value of the scale and in unit write the name of the scale.
  
 
<div id='img-3'></div>
 
<div id='img-3'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Setting-Scale.png|122px|<span style="text-align: center; font-size: 75%;">Setting the scale of the figure. </span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Setting-Scale.png|222px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 3:''' <span style="text-align: center; font-size: 75%;">Setting the scale of the figure. </span>
+
| colspan="1" style="padding:10px;"| '''Figure 3'''. Setting the scale of the figure
 
|}
 
|}
  
Calculations over the open figure can be made, but also another strategy can be taken, that is with “Rectangle” button of the toolbar choose an area that it is wanted to measure, without the scale, and on the menu select “Image” and the sub-process “Duplicate”, generates another figure with a different name proposed. So there are two figures and the original can be closed. With this new image active, select “Process” on the menu and go to “Binary” process, and “Make Binary” sub-process. Now if wants to calculate the fractal dimension of the figure's perimeter,  must find the edges ([[#img-4|figure 4]]) or can outline the graphic, at this step of the process the image is prepared to be measured.
+
 
 +
Calculations over the open figure can be made, but also another strategy can be taken, that is with “Rectangle” button of the toolbar choose an area that it is wanted to measure, without the scale, and on the menu select “Image” and the sub-process “Duplicate”, generates another figure with a different name proposed. So there are two figures and the original can be closed. With this new image active, select “Process” on the menu and go to “Binary” process, and “Make Binary” sub-process. Now if wants to calculate the fractal dimension of the figure's perimeter,  must find the edges ([[#img-4|Figure 4]]) or can outline the graphic, at this step of the process the image is prepared to be measured.
  
 
<div id='img-4'></div>
 
<div id='img-4'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Find-Edges.png|100px|<span style="text-align: center; font-size: 75%;">Menu for finding the edges of the figure. </span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Find-Edges.png|200px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 4:''' <span style="text-align: center; font-size: 75%;">Menu for finding the edges of the figure. </span>
+
| colspan="1" style="padding:10px;"| '''Figure 4'''. Menu for finding the edges of the figure
 
|}
 
|}
  
Then select “Analize” on the menu go to “Tools” process and “Fractal Box Counting” sub-process, as is shown in figure [[#img-5|5]], this procedure gives a first result of the fractal dimension <math display="inline">D_B = 1.1955</math> as a result of the “Box Counting” technique (figure [[#img-6|6]]), but this is just a preliminary measure, that is because the boxes can't be seen,  just the result.
+
 
 +
Then select “Analize” on the menu go to “Tools” process and “Fractal Box Counting” sub-process, as is shown in [[#img-5|Figure 5]], this procedure gives a first result of the fractal dimension <math display="inline">D_B = 1.1955</math> as a result of the “Box Counting” technique ([[#img-6|Figure 6]]), but this is just a preliminary measure, that is because the boxes can't be seen,  just the result.
  
 
<div id='img-5'></div>
 
<div id='img-5'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Frac-Dim1.png|100px|<span style="text-align: center; font-size: 75%;">Menu for calculate directly the fractal dimension by the box counting method. </span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Frac-Dim1.png|300px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 5:''' <span style="text-align: center; font-size: 75%;">Menu for calculate directly the fractal dimension by the box counting method. </span>
+
| colspan="1" style="padding:10px;"| '''Figure 5'''. Menu for calculate directly the fractal dimension by the box counting method.  
 
|}
 
|}
 +
  
 
<div id='img-6'></div>
 
<div id='img-6'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Frac-Dim1-Result.png|466px|<span style="text-align: center; font-size: 75%;">Result of calculations of fractal dimension over the Mandelbrot figure. </span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Frac-Dim1-Result.png|466px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 6:''' <span style="text-align: center; font-size: 75%;">Result of calculations of fractal dimension over the Mandelbrot figure. </span>
+
| colspan="1" style="padding:10px;" | '''Figure 6'''. Result of calculations of fractal dimension over the Mandelbrot figure
 
|}
 
|}
  
==3 Using the FracLac plugin==
+
 
 +
==3. Using the FracLac plugin==
  
 
In order to apply the “FracLac” plugin over any figure, the same treatment must be given as before, stablish the scale of the figure, that is to corroborate any measure is made,“Binarize” the picture and duplicate it and if wants to calculate fractal dimension of the perimeter, find the edges or outline the figure.
 
In order to apply the “FracLac” plugin over any figure, the same treatment must be given as before, stablish the scale of the figure, that is to corroborate any measure is made,“Binarize” the picture and duplicate it and if wants to calculate fractal dimension of the perimeter, find the edges or outline the figure.
  
After figure was prepared,  go to the “Plugins” section of the menu and in the “Fractal Analysis” process, accede to the sub-process of “FracLac” as is shown in figure [[#img-7|7]].
+
After figure was prepared,  go to the “Plugins” section of the menu and in the “Fractal Analysis” process, accede to the sub-process of “FracLac” as is shown in [[#img-7|Figure 7]].
  
 
<div id='img-7'></div>
 
<div id='img-7'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Access-FracLac.png|174px|<span style="text-align: center; font-size: 75%;">Menu to FracLac sub-process.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Access-FracLac.png|274px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 7:''' <span style="text-align: center; font-size: 75%;">Menu to FracLac sub-process.</span>
+
| colspan="1" style="padding:10px;" | '''Figure 7'''. Menu to FracLac sub-process
 
|}
 
|}
  
A new toolbar is open, from where the “BC” button that is located in the left superior corner must be choosen, a Pop Up'' appear that must be accepted and  not include “Select for legacy mode”. A menu of characteristic appear and in “Grid design” puts number one, that is because grid must have just one origin, if wants more than one origin, then change this number. Modify the “Graphic options” as is shown on a red circle over the figure [[#img-8|8]]. Just make this changes if wants to measure fractal dimension of a perimeter line.
+
 
 +
A new toolbar is open, from where the “BC” button that is located in the left superior corner must be choosen, a Pop Up appear that must be accepted and  not include “Select for legacy mode”. A menu of characteristic appear and in “Grid design” puts number one, that is because grid must have just one origin, if wants more than one origin, then change this number. Modify the “Graphic options” as is shown on a red circle over the [[#img-8|Figure 8]]. Just make this changes if wants to measure fractal dimension of a perimeter line.
  
 
<div id='img-8'></div>
 
<div id='img-8'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-FracLac-Menu.png|347px|<span style="text-align: center; font-size: 75%;">FracLac characteristics menu.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-FracLac-Menu.png|347px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 8:''' <span style="text-align: center; font-size: 75%;">FracLac characteristics menu.</span>
+
| colspan="1" style="padding:10px;" | '''Figure 8'''. FracLac characteristics menu
 
|}
 
|}
  
After given the characteristics of box counting, must press the“Scan” button (that is below the “Box Counting” button), then “FracLac” operate it's internal calculations and gives various results, two of them are shown in figure [[#img-9|9]], the image in “tif” format and the box counting data with <math display="inline">D_B = 1.1965</math>, the value obtained is very close as previously calculated but it's not the same.
+
 
 +
After given the characteristics of box counting, must press the“Scan” button (that is below the “Box Counting” button), then “FracLac” operate it's internal calculations and gives various results, two of them are shown in [[#img-9|Figure 9]], the image in “tif” format and the box counting data with <math display="inline">D_B = 1.1965</math>, the value obtained is very close as previously calculated but it's not the same.
  
 
<div id='img-9'></div>
 
<div id='img-9'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Image-BC-Data.png|157px|<span style="text-align: center; font-size: 75%;">Two of the analysis results given by the plugin's operations.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Image-BC-Data.png|357px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 9:''' <span style="text-align: center; font-size: 75%;">Two of the analysis results given by the plugin's operations.</span>
+
| colspan="1" style="padding:10px;"| '''Figure 9'''. Two of the analysis results given by the plugin's operations
 
|}
 
|}
  
The “tif” image gives 14 moments of the calculations over the perimeter, that could be extracted each one of them as an individual figure, four of them are shown in figure [[#img-10|10]].
+
 
 +
The “tif” image gives 14 moments of the calculations over the perimeter, that could be extracted each one of them as an individual figure, four of them are shown in [[#img-10|Figure 10]].
  
 
<div id='img-10'></div>
 
<div id='img-10'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Four-Moments.png|170px|<span style="text-align: center; font-size: 75%;">Four moments of the box counting calculations.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Four-Moments.png|270px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 10:''' <span style="text-align: center; font-size: 75%;">Four moments of the box counting calculations.</span>
+
| colspan="1" style="padding:10px;"| '''Figure 10'''. Four moments of the box counting calculations
 
|}
 
|}
  
The calculation's data could be saved in “csv” format, that is compatible with apps, as Numbers, Excel, Mathematica etc. The fractal dimension is given in this file too, however if for some reason wants to make the linear regression adjustment, the columns two and three are the appropriate ones, as is shown in figure  [[#img-11|11]].
 
  
Then the process to calculate fractal dimension from a perimeter of any figure could be made in two ways; one is with an automatic operation of ImageJ (but we don't see any boxes), that gives a graph and a csv file.  The box's size is defined by user and are between six to nine sizes.  The other process is with the plugin “FracLac”, where all the steps of the process are shown even the boxes used in fourteen moments of calculations.
+
The calculation's data could be saved in “csv” format, that is compatible with apps, as Numbers, Excel, Mathematica etc. The fractal dimension is given in this file too, however if for some reason wants to make the linear regression adjustment, the columns two and three are the appropriate ones, as is shown in  [[#img-11|Figure 11]].
 
+
Results of the fractal dimension obtained in both procedures must gives values very close one to the other, not exactly the same, because the first one is made with 9 or less box's sizes, and the second one is made with 100 box's sizes.
+
  
 
<div id='img-11'></div>
 
<div id='img-11'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Linear-Adjust.png|331px|<span style="text-align: center; font-size: 75%;">Linear adjustment of columns two an three of data from file in “csv” format.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Linear-Adjust.png|431px]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 11:''' <span style="text-align: center; font-size: 75%;">Linear adjustment of columns two an three of data from file in “csv” format.</span>
+
| colspan="1" style="padding:10px;"| '''Figure 11'''. Linear adjustment of columns two an three of data from file in “csv” format
 
|}
 
|}
  
==4 Fractal dimension of an image's area==
+
 
 +
Then the process to calculate fractal dimension from a perimeter of any figure could be made in two ways; one is with an automatic operation of ImageJ (but we don't see any boxes), that gives a graph and a csv file.  The box's size is defined by user and are between six to nine sizes.  The other process is with the plugin “FracLac”, where all the steps of the process are shown even the boxes used in fourteen moments of calculations.
 +
 
 +
Results of the fractal dimension obtained in both procedures must gives values very close one to the other, not exactly the same, because the first one is made with 9 or less box's sizes,  and the second one is made with 100 box's sizes.
 +
 
 +
==4. Fractal dimension of an image's area==
  
 
Performing calculation of the <math display="inline">D_B</math> again, but now for the area of Mandelbrot's fractal figure, so let's do the whole procedure of opening the image, setting the scale, selecting the work area, duplicating the image, and finally “Binarize” the image, and an important part of the process is that <u>we do not look for the edges or outline the image</u>. Locates the “Plugins” tab, goes down to “Fractal Analysis” and the “FracLac” sub-process. The toolbar opens, in which it has to be given the initial parameters, select the “Box Counting” (BC) button, accept the “Pop Up” and do not include the inherited mode “Select for legacy mode”.
 
Performing calculation of the <math display="inline">D_B</math> again, but now for the area of Mandelbrot's fractal figure, so let's do the whole procedure of opening the image, setting the scale, selecting the work area, duplicating the image, and finally “Binarize” the image, and an important part of the process is that <u>we do not look for the edges or outline the image</u>. Locates the “Plugins” tab, goes down to “Fractal Analysis” and the “FracLac” sub-process. The toolbar opens, in which it has to be given the initial parameters, select the “Box Counting” (BC) button, accept the “Pop Up” and do not include the inherited mode “Select for legacy mode”.
  
Now, since the DB of a figure's area are going to be measured, in the “Image Type” section, first line must have “Use binary” but in second line choose “Lock Black Background” if background is black,that is  the one that wants to avoid, it means that measurement will be made over figure's white part. If wants to measure over figure's black part, then  choose “Lock White Background”, the other parameters are set as previously did, as shown in figure [[#img-12|12]].
+
Now, since the DB of a figure's area are going to be measured, in the “Image Type” section, first line must have “Use binary” but in second line choose “Lock Black Background” if background is black,that is  the one that wants to avoid, it means that measurement will be made over figure's white part. If wants to measure over figure's black part, then  choose “Lock White Background”, the other parameters are set as previously did, as shown in [[#img-12|Figure 12]].
  
 
<div id='img-12'></div>
 
<div id='img-12'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-BC-area-figure.png|201px|<span style="text-align: center; font-size: 75%;">BC menu's characteristic for measurement of D<sub>B</sub> over a figure's area.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-BC-area-figure.png|401px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 12:''' <span style="text-align: center; font-size: 75%;">BC menu's characteristic for measurement of <math>D_B</math> over a figure's area.</span>
+
| colspan="1" style="padding:10px;" | '''Figure 12'''. BC menu's characteristic for measurement of <math>D_B</math> over a figure's area
 
|}
 
|}
 +
  
 
Choose “Ok” at the bottom of BC menu's, and the “Pop Up” of “Show Regression Line Summaries” appears, which accept.
 
Choose “Ok” at the bottom of BC menu's, and the “Pop Up” of “Show Regression Line Summaries” appears, which accept.
  
Once the characteristics of the measurements have been established select the “Scan” button, which is just below the “Box Counting” button. The “FracLac” plugin performs its internal procedures and gives us several results, but the box count is now done on the white area and the result of the fractal dimension is obtained, which is <math display="inline">D_B = 1.7614</math> as can be seen in figure [[#img-13|13]].
+
Once the characteristics of the measurements have been established select the “Scan” button, which is just below the “Box Counting” button. The “FracLac” plugin performs its internal procedures and gives us several results, but the box count is now done on the white area and the result of the fractal dimension is obtained, which is <math display="inline">D_B = 1.7614</math> as can be seen in [[#img-13|Figure 13]].
  
 
<div id='img-13'></div>
 
<div id='img-13'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-DB-Area-Fractal.png|441px|<span style="text-align: center; font-size: 75%;">Results of D<sub>B</sub> over a figure's area.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-DB-Area-Fractal.png|541px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 13:''' <span style="text-align: center; font-size: 75%;">Results of <math>D_B</math> over a figure's area.</span>
+
| colspan="1" style="padding:10px;"| '''Figure 13'''. Results of <math>D_B</math> over a figure's area
 
|}
 
|}
 +
  
 
The data file is saved in “csv” format and the necessary calculations are made to fit a straight line with the data in columns 2 and 3, it must be taken into account that the natural logarithm of the reciprocal of the scale is plotted against the logarithm natural of the number of boxes, the equation of the straight line is: <math display="inline">y = 1.76124x + 0.31013</math> and the result of the fractal dimension is directly the slope, which is <math display="inline">D_B = 1.76124</math>.
 
The data file is saved in “csv” format and the necessary calculations are made to fit a straight line with the data in columns 2 and 3, it must be taken into account that the natural logarithm of the reciprocal of the scale is plotted against the logarithm natural of the number of boxes, the equation of the straight line is: <math display="inline">y = 1.76124x + 0.31013</math> and the result of the fractal dimension is directly the slope, which is <math display="inline">D_B = 1.76124</math>.
  
==5 Conclusions==
+
==5. Conclusions==
  
So there is the question, what does the fractal dimension measure? To answer it, based on the “Box Counting” methodology, let's take a line of length <math display="inline">a</math>, a square and a cube with sides also <math display="inline">a</math> and measure their fractal dimensions (figure [[#img-14|14]]).
+
So there is the question, what does the fractal dimension measure? To answer it, based on the “Box Counting” methodology, let's take a line of length <math display="inline">a</math>, a square and a cube with sides also <math display="inline">a</math> and measure their fractal dimensions ([[#img-14|Figure 14]]).
  
 
<div id='img-14'></div>
 
<div id='img-14'></div>
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
+
{| style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: auto;max-width: auto;"
 
|-
 
|-
|[[Image:Review_368345517339-Fractal-Euclidean-dimension.png|502px|<span style="text-align: center; font-size: 75%;">Calculation of fractal dimension D<sub>B</sub> over a line, a square and a cube.</span>]]
+
|style="padding:10px;"|[[Image:Review_368345517339-Fractal-Euclidean-dimension.png|502px|]]
 
|- style="text-align: center; font-size: 75%;"
 
|- style="text-align: center; font-size: 75%;"
| colspan="1" | '''Figure 14:''' <span style="text-align: center; font-size: 75%;">Calculation of fractal dimension <math>D_B</math> over a line, a square and a cube.</span>
+
| colspan="1" style="padding:10px;"| '''Figure 14'''. Calculation of fractal dimension <math>D_B</math> over a line, a square and a cube
 
|}
 
|}
  
Using the box counting technique it has been measured in this work the fractal dimension <math display="inline">D_B</math> of a Mandelbrot fractal figure with two different process <span id='citeF-7'></span><span id='citeF-8'></span><span id='citeF-9'></span>[[#cite-7|[7,8,9]]].
+
 
 +
Using the box counting technique it has been measured in this work the fractal dimension <math display="inline">D_B</math> of a Mandelbrot fractal figure with two different process <span id='citeF-7'></span><span id='citeF-8'></span><span id='citeF-9'></span>[[#cite-7|[7,8,9]]]:
  
 
* Measurement of the fractal dimension of the image perimeter.
 
* Measurement of the fractal dimension of the image perimeter.
  
 
* Measurement of the fractal dimension of the image area.
 
* Measurement of the fractal dimension of the image area.
 +
  
 
Both measurements of the fractal dimension are different and both means how far they are from the corresponding Euclidean dimension <span id='citeF-10'></span><span id='citeF-11'></span>[[#cite-10|[10,11]]].
 
Both measurements of the fractal dimension are different and both means how far they are from the corresponding Euclidean dimension <span id='citeF-10'></span><span id='citeF-11'></span>[[#cite-10|[10,11]]].
  
===BIBLIOGRAPHY===
+
==References==
 +
<div class="auto" style="text-align: left;width: auto; margin-left: auto; margin-right: auto;font-size: 85%;">
  
 
<div id="cite-1"></div>
 
<div id="cite-1"></div>
'''[[#citeF-1|[1]]]''' B. Mandelbrot, “The fractal geometry of nature”, W. H. Freeman 1982. <div id="cite-2"></div>
+
[[#citeF-1|[1]]]  Mandelbrot B. The fractal geometry of nature. W.H. Freeman, 1982.  
'''[[#citeF-2|[2]]]''' B. Mandelbrot, “Self-affine and Fractal dimension”, Physica Scripta, vol.  32(4),  1985, pp. 257-260. <div id="cite-3"></div>
+
<div id="cite-2"></div>
'''[[#citeF-3|[3]]]''' B. Mandelbrot, “How Long Is the Coast of Britain? Statistical Self-Similarity and Fractional Dimension”, Science, 156(3775), pp. 636-638, DOI: 10.1126/science.156.3775.636 <div id="cite-4"></div>
+
[[#citeF-2|[2]]]  Mandelbrot B. Self-affine and fractal dimension. Physica Scripta,   32(4):257-260,  1985.  
'''[[#citeF-4|[4]]]''' D. Gatzouras and S. Lalley, “Hausdorff and box dimensions of certainself-affine fractals”, Indiana University Mathematics Journal, vol. 41(2), 1992, pp. 533-568. <div id="cite-5"></div>
+
<div id="cite-3"></div>
'''[[#citeF-5|[5]]]''' A. Husain, J. Reddy, D. Bisht and M. Sajid “Fractal dimension of coastline of Australia”, Nature Scientific Report, 2021doi.org/10.1038/s41598-021-85405-0 <div id="cite-6"></div>
+
[[#citeF-3|[3]]]  Mandelbrot B.  How long is the coast of Britain? Statistical self-similarity and fractional dimension. Science, 156(3775):636-638, 1967.  
'''[[#citeF-6|[6]]]''' C. Schneider,  W. Rasband and K. Eliceiri “NIH Image to ImageJ: 25 years of image analysis”, Nature Methods 9, 2012, pp.  671&#8211;675. <div id="cite-7"></div>
+
<div id="cite-4"></div>
'''[[#citeF-7|[7]]]''' P. Shanmugavadivu and V. Sivakumar, “Fractal dimension-bound spatiotemporal analysis of digital mammograms”, The European Physics Journal Special Topics, vol. 225, pp. 137-146. <div id="cite-8"></div>
+
[[#citeF-4|[4]]]  Gatzouras D., Lalley S. Hausdorff and box dimensions of certainself-affine fractals. Indiana University Mathematics Journal, 41(2):533-568, 1992.  
'''[[#citeF-8|[8]]]''' B. Bárány, M. Hochman and A. Rapaport, “Hausdorff dimension of planar self-affine measures”, Inventiones Mathematicae. vol. 16, 2019, pp. 601&#8211;659. <div id="cite-9"></div>
+
<div id="cite-5"></div>
'''[[#citeF-9|[9]]]''' H. Christensen, and O. Driver, “The fractal nature of clouds in global storm-resolving models”, ArXiv:2108.08565v1,  19 Aug 2021. <div id="cite-10"></div>
+
[[#citeF-5|[5]]]  Husain A., Reddy J., Bisht D., Sajid M. Fractal dimension of coastline of Australia. Sci. Rep., 11, 63042021.
'''[[#citeF-10|[10]]]''' H. Strogatz, ``Nonlinear Dynamics and Chaos: With applications to Physics, Biology, Chemistry and Engineering, Westview Press, Boulder CO. USA, 2nd edition (2015). <div id="cite-11"></div>
+
<div id="cite-6"></div>
'''[[#citeF-11|[11]]]''' R. Devaney “A first course in chaotic dynamical systems theory and experiment” CRC Press, Florida USA, 2nd edition (2020).
+
[[#citeF-6|[6]]]  Schneider C.,  Rasband W., Eliceiri K. NIH image to ImageJ: 25 years of image analysis. Nature Methods, 9:671-675, 2012.  
 +
<div id="cite-7"></div>
 +
[[#citeF-7|[7]]]  Shanmugavadivu P.,  Sivakumar V., Sudhir R. Fractal dimension-bound spatiotemporal analysis of digital mammograms. The European Physics Journal Special Topics, 225:137-146, 2016.  
 +
<div id="cite-8"></div>
 +
[[#citeF-8|[8]]]  Bárány B., Hochman M., Rapaport A. Hausdorff dimension of planar self-affine measures. Inventiones Mathematicae16:601-659, 2019.  
 +
<div id="cite-9"></div>
 +
[[#citeF-9|[9]]]  Christensen H., Driver O. The fractal nature of clouds in global storm-resolving models. ArXiv:2108.08565v1,  2021.  
 +
<div id="cite-10"></div>
 +
[[#citeF-10|[10]]]  Strogatz H. Nonlinear dynamics and chaos: With applications to physics, biology, chemistry and engineering. Westview Press, Boulder CO. USA, 2nd edition, 2015.  
 +
<div id="cite-11"></div>
 +
[[#citeF-11|[11]]]  Devaney R. A first course in chaotic dynamical systems theory and experiment. CRC Press, Florida USA, 2nd edition, 2020.

Latest revision as of 17:05, 17 March 2022

Abstract

Measuring fractal dimension in general is made over edges of a figure, however this kind of calculations could be made over a 1D, 2D or even a 3D images. With the FracLac plugin of ImageJ application, it has been possible to measure both dimensions, over the area and over the edge of a Mandelbrot fractal, using the Box Counting technique.

Keywords: Box countig, Mandelbort fractal, fractal dimension, ImageJ

1. Introduction

Historical measurements with a straight line function over the England coast line made by Benoit Mandelbrot using different scales represented as “measuring rods” [1,2], which is based on a Lewis Fry Richardson's idea [3], can be calculated directly with any of the simplified data (Tables 1, and 2), shown below.

Table 1. The magnitude of scale is in kms

Scale (s) Long. (L) Ln(s) Ln(L)
200 2350 5.2983 7.7622
100 2775 4.6052 7.9284
50 3425 5.2983 8.1389


Table 2. The scale is relative to the greatest magnitude

Scale (s) Long. (L) Ln(s) Ln(L)
200/200 2350 0.0000 7.7622
100/200 2775 -6.6931 7.9284
50/200 3425 -1.3863 8.1389


Linear regression calculations from data of the first (Table 1), are made directly over the scale, while in the second data table, greatest magnitude is used as reference (Table 2).

Result of linear adjustment over data from any of both tables is the Eq.(1)

(1)

With an equation like shown (1) Mandelbrot identified the slope of as

(2)

so the fractal dimension is , here is known as Hausdorff dimension.

However there is another method to measure the same quantity and is knowing as “Box Counting Fractal” and is based on the idea of using “boxes” (squares) of the same size to fill the edge of entire figure and counting the number of boxes, then the longitude is given by , where is the size of one side o a box, change size of a generic box () and measure again, doing this procedure by “practically” six or seven times, there are enough data to make a linear approximation [3]. But if an area is measured the relation is and if a volume is measured, the rule now is given by , based on this ideas there is a power law for any dimension [2]:

And by analogy with the fractal dimension, that is generally called “capacity” or “box dimension” is defined by the relation (Eq.(3)) [4]

(3)

If the box counting technique is utilized to calculate again the fractal dimension of the England coast line, (Table 3) must be used [5].

Table 3. Data to calculate fractal dimension using “Box Counting” technique

Scale ()
1 2350 0.0000 7.7622
0.5 5550 0.6931 8.6216
0.25 13700 1.3863 9.5252


The result of applying the linear adjustment over the data (Table 3) is the equation shown below (Eq.(4))

(4)

and it could be seen that the fractal dimension is given directly form the slope of the equation .

So there are two methods to calculate the fractal dimension, but if “measuring rods” are used, some additional operations must be made to obtain the result. In the “Box Counting Fractal” technique the result is directly the slope of straight line (Eq.(4)) [6].

2. ImageJ application

The “ImageJ” app is a free software from the project “SciJava OSS” used to images processing, with this powerful tool we can manipulate and measure any graphic file, and in conjunction with the FracLac plugin (that it is used to make calculations over fractals) we can obtain the fractal dimension based on the box counting (BC) method [6].

The direction to download “ImageJ” app is: https://imagej.nih.gov/ij/download.html

But version that works with corresponding Operating System must be selected.

Install the app and use it to know the tool, but even when the software has a specific process to measure fractal dimension (Analyze-Tools-Fractal Box Counting), this is a limited characteristic of the app and we could use it as a first approach, in the sense that it didn't shows the boxes it draws and how changes in box's sizes are made.

The direction to download the “FracLac” plugin is: http://rsb.info.nih.gov/ij/plugins/fraclac/Frac_Lac.jar

To install the plugin go to Plugins-Install, locate the folder where Frac_Lac.jar file was downloaded and select “open”. After the plugin is installed “ImageJ” program must be closed completely.

Open the program again, go to Plugins and must see the “Fractal Analysis” option as an additional sub-menu and “FracLac” as a sub-process.

Now, all the “ambience” is prepared to make ours first measurements. Then a graphic file in a png, jpg or bmp format must be opened, and so even when the calculations are made in pixels is preferable that the graphic have a printed scale.

2.1 Preliminary measurement

As a first step a scale must be established on the figure, so with this objective, open a graphic file and in the toolbar choose the “Straight” tool, as is shown in Figure 1.

Review 368345517339-Imagej-Toolbar.png
Figure 1. Toolbar of the ImageJ app


Over the Mandelbrot Figure 2, locate the scale and with the shift button and the mouse pressed, touch one end of the scale and without release go to the other end, then release.

Review 368345517339-Mandelbrot-with-scale.png
Figure 2. Mandelbrot figure with measure over the scale


After this, go to menu and over “Analyze” select “Set Scale”, as shown in Figure 3, put in the “Known distance” the value of the scale and in unit write the name of the scale.

Review 368345517339-Setting-Scale.png
Figure 3. Setting the scale of the figure


Calculations over the open figure can be made, but also another strategy can be taken, that is with “Rectangle” button of the toolbar choose an area that it is wanted to measure, without the scale, and on the menu select “Image” and the sub-process “Duplicate”, generates another figure with a different name proposed. So there are two figures and the original can be closed. With this new image active, select “Process” on the menu and go to “Binary” process, and “Make Binary” sub-process. Now if wants to calculate the fractal dimension of the figure's perimeter, must find the edges (Figure 4) or can outline the graphic, at this step of the process the image is prepared to be measured.

Review 368345517339-Find-Edges.png
Figure 4. Menu for finding the edges of the figure


Then select “Analize” on the menu go to “Tools” process and “Fractal Box Counting” sub-process, as is shown in Figure 5, this procedure gives a first result of the fractal dimension as a result of the “Box Counting” technique (Figure 6), but this is just a preliminary measure, that is because the boxes can't be seen, just the result.

Review 368345517339-Frac-Dim1.png
Figure 5. Menu for calculate directly the fractal dimension by the box counting method.


Review 368345517339-Frac-Dim1-Result.png
Figure 6. Result of calculations of fractal dimension over the Mandelbrot figure


3. Using the FracLac plugin

In order to apply the “FracLac” plugin over any figure, the same treatment must be given as before, stablish the scale of the figure, that is to corroborate any measure is made,“Binarize” the picture and duplicate it and if wants to calculate fractal dimension of the perimeter, find the edges or outline the figure.

After figure was prepared, go to the “Plugins” section of the menu and in the “Fractal Analysis” process, accede to the sub-process of “FracLac” as is shown in Figure 7.

Review 368345517339-Access-FracLac.png
Figure 7. Menu to FracLac sub-process


A new toolbar is open, from where the “BC” button that is located in the left superior corner must be choosen, a Pop Up appear that must be accepted and not include “Select for legacy mode”. A menu of characteristic appear and in “Grid design” puts number one, that is because grid must have just one origin, if wants more than one origin, then change this number. Modify the “Graphic options” as is shown on a red circle over the Figure 8. Just make this changes if wants to measure fractal dimension of a perimeter line.

Review 368345517339-FracLac-Menu.png
Figure 8. FracLac characteristics menu


After given the characteristics of box counting, must press the“Scan” button (that is below the “Box Counting” button), then “FracLac” operate it's internal calculations and gives various results, two of them are shown in Figure 9, the image in “tif” format and the box counting data with , the value obtained is very close as previously calculated but it's not the same.

Review 368345517339-Image-BC-Data.png
Figure 9. Two of the analysis results given by the plugin's operations


The “tif” image gives 14 moments of the calculations over the perimeter, that could be extracted each one of them as an individual figure, four of them are shown in Figure 10.

Review 368345517339-Four-Moments.png
Figure 10. Four moments of the box counting calculations


The calculation's data could be saved in “csv” format, that is compatible with apps, as Numbers, Excel, Mathematica etc. The fractal dimension is given in this file too, however if for some reason wants to make the linear regression adjustment, the columns two and three are the appropriate ones, as is shown in Figure 11.

Review 368345517339-Linear-Adjust.png
Figure 11. Linear adjustment of columns two an three of data from file in “csv” format


Then the process to calculate fractal dimension from a perimeter of any figure could be made in two ways; one is with an automatic operation of ImageJ (but we don't see any boxes), that gives a graph and a csv file. The box's size is defined by user and are between six to nine sizes. The other process is with the plugin “FracLac”, where all the steps of the process are shown even the boxes used in fourteen moments of calculations.

Results of the fractal dimension obtained in both procedures must gives values very close one to the other, not exactly the same, because the first one is made with 9 or less box's sizes, and the second one is made with 100 box's sizes.

4. Fractal dimension of an image's area

Performing calculation of the again, but now for the area of Mandelbrot's fractal figure, so let's do the whole procedure of opening the image, setting the scale, selecting the work area, duplicating the image, and finally “Binarize” the image, and an important part of the process is that we do not look for the edges or outline the image. Locates the “Plugins” tab, goes down to “Fractal Analysis” and the “FracLac” sub-process. The toolbar opens, in which it has to be given the initial parameters, select the “Box Counting” (BC) button, accept the “Pop Up” and do not include the inherited mode “Select for legacy mode”.

Now, since the DB of a figure's area are going to be measured, in the “Image Type” section, first line must have “Use binary” but in second line choose “Lock Black Background” if background is black,that is the one that wants to avoid, it means that measurement will be made over figure's white part. If wants to measure over figure's black part, then choose “Lock White Background”, the other parameters are set as previously did, as shown in Figure 12.

Review 368345517339-BC-area-figure.png
Figure 12. BC menu's characteristic for measurement of over a figure's area


Choose “Ok” at the bottom of BC menu's, and the “Pop Up” of “Show Regression Line Summaries” appears, which accept.

Once the characteristics of the measurements have been established select the “Scan” button, which is just below the “Box Counting” button. The “FracLac” plugin performs its internal procedures and gives us several results, but the box count is now done on the white area and the result of the fractal dimension is obtained, which is as can be seen in Figure 13.

Review 368345517339-DB-Area-Fractal.png
Figure 13. Results of over a figure's area


The data file is saved in “csv” format and the necessary calculations are made to fit a straight line with the data in columns 2 and 3, it must be taken into account that the natural logarithm of the reciprocal of the scale is plotted against the logarithm natural of the number of boxes, the equation of the straight line is: and the result of the fractal dimension is directly the slope, which is .

5. Conclusions

So there is the question, what does the fractal dimension measure? To answer it, based on the “Box Counting” methodology, let's take a line of length , a square and a cube with sides also and measure their fractal dimensions (Figure 14).

Review 368345517339-Fractal-Euclidean-dimension.png
Figure 14. Calculation of fractal dimension over a line, a square and a cube


Using the box counting technique it has been measured in this work the fractal dimension of a Mandelbrot fractal figure with two different process [7,8,9]:

  • Measurement of the fractal dimension of the image perimeter.
  • Measurement of the fractal dimension of the image area.


Both measurements of the fractal dimension are different and both means how far they are from the corresponding Euclidean dimension [10,11].

References

[1] Mandelbrot B. The fractal geometry of nature. W.H. Freeman, 1982.

[2] Mandelbrot B. Self-affine and fractal dimension. Physica Scripta, 32(4):257-260, 1985.

[3] Mandelbrot B. How long is the coast of Britain? Statistical self-similarity and fractional dimension. Science, 156(3775):636-638, 1967.

[4] Gatzouras D., Lalley S. Hausdorff and box dimensions of certainself-affine fractals. Indiana University Mathematics Journal, 41(2):533-568, 1992.

[5] Husain A., Reddy J., Bisht D., Sajid M. Fractal dimension of coastline of Australia. Sci. Rep., 11, 6304, 2021.

[6] Schneider C., Rasband W., Eliceiri K. NIH image to ImageJ: 25 years of image analysis. Nature Methods, 9:671-675, 2012.

[7] Shanmugavadivu P., Sivakumar V., Sudhir R. Fractal dimension-bound spatiotemporal analysis of digital mammograms. The European Physics Journal Special Topics, 225:137-146, 2016.

[8] Bárány B., Hochman M., Rapaport A. Hausdorff dimension of planar self-affine measures. Inventiones Mathematicae, 16:601-659, 2019.

[9] Christensen H., Driver O. The fractal nature of clouds in global storm-resolving models. ArXiv:2108.08565v1, 2021.

[10] Strogatz H. Nonlinear dynamics and chaos: With applications to physics, biology, chemistry and engineering. Westview Press, Boulder CO. USA, 2nd edition, 2015.

[11] Devaney R. A first course in chaotic dynamical systems theory and experiment. CRC Press, Florida USA, 2nd edition, 2020.
Back to Top

Document information

Published on 17/03/22
Accepted on 07/03/22
Submitted on 14/12/21

Volume 38, Issue 1, 2022
DOI: 10.23967/j.rimni.2022.03.007
Licence: CC BY-NC-SA license

Document Score

0

Views 287
Recommendations 0

Share this document

claim authorship

Are you one of the authors of this document?