The image above shows a grid set (a set of parameters for doing box counting). The particular parameters are: POSITIONS: 1, SERIES: Scaled; 1:2, SIZES: 2, and OPTIONS: none (each element is placed adjacent to the next with no adjustments).
Use this panel to build a grid set after setting image options. To make the set, go through the sub-panels from top to bottom, as listed below:
Use this panel, the first panel on the GRID DESIGN pane, to set the number of origins, rotation, sampling element shape, and sampling seed.
num Ǥ - Number of grid positions
Use this spinner on the
POSITIONS panel
on the
GRID DESIGN pane
to set the number of orientations or
origins
to use for a series. (See
also rotation angle.)
This option depends on the scan type.
When any scan type
is first selected, the default value for that scan is
loaded. To restore the default, close FracLac
and restart it.
An origin
is a starting position at which a grid is laid during a scan.
The image below
illustrates a grid placed at different origins with
respect to a smiley face pattern; the grid has the same
calibre at all origins but the number
of boxes containing
meaningful pixels changes.
Image orientation affects box counting.
The same calibre grid placed at different orientations on the same image showing that the number of boxes containing meaningful pixels depends on grid orientation.
Note that the number of origins is not related to the number of calibres.
The number of origins option is disabled for some scans (e.g., sub scans) so defaults to 1 origin, at the top left corner of the bounding box or as specified in the scan type.
The origins are based on the 4 corners of the bounding box. The (x,y) coordinates for the first laying of the grid are randomly generated to fall within a rectangular area centered on each corner. The area is the size of the biggest calibre in the series of grid calibres. The coordinates are randomly generated, but are taken from a fixed list of random numbers to ensure consistency from scan to scan.
Henon Map Illustrating 4 Grid Orientations
Box counting grid origins are based on the 4 corners of the bounding box, which depends on image orientation.
When a series is applied at multiple orientations, as in the
example shown here,
Dʙs using
average and
most-efficient
coverings can be calculated. The higher the number of
grid positions, the greater the chance of finding a more
efficient covering. But this is only to a point, and
as the number of samples increases processing time increases
noticeably for larger images.
The number of sampling orientations and their coordinates
are reported
in the results files.
rotate - Rotation angle (disabled for MvD Scans)
Use this box on the
POSITIONS panel
on the
GRID DESIGN pane
to include multiple rotational orientations in an analysis.
When this box is selected, images are rotated and analyzed
as stacks, using an angle specified in a dialog that comes
up after you click OK. Rotation affects the result
of box-counting, where the effect depends notably on image
features (e.g., for binary images,
filled images are generally more affected
than outlined).
Effect of Rotation on Box Counting Dimension
Digital rotation can affect the box counting dimension.
random - Use an alternate random number generator
Use this box on the
POSITIONS panel
on the
GRID DESIGN pane
to use unique numbers for each analysis to generate grid positions.
When this box is selected, results of scans may not be
comparable because the scan origins will differ with
each scan.
oval - Set sampling element shape
Select or unselect this option on the
POSITIONS panel
on the
GRID DESIGN pane
to toggle between oval and square
sampling element shapes.
The sampling element shape
is the geometric area from which each individual
count is made at one
partition in a sampling grid. (See
illustration.)
The grid
that an image is partitioned into is unaffected by the
shape of the sampling element - the image is always
split into rectangular sections. In contrast, the
area and shape of the samples taken
at each position in the grid depend on the sampling element
shape.
The diameter of each square or oval is the grid calibre currently being used. The figure below illustrates 2 samples scanned with a rectangular (top) and an oval (bottom) element (only one calibre is shown).
Rectangular and Oval Sampling Elements
In both cases, the grid itself is a regular array, but its components have different shapes. The figure shows rectangular (top) and oval (bottom) sampling elements in a fixed grid sampling pattern. Note that the ROIs that were taken from the image are oval in this case but the shape of the ROI is independent of the shape of the sampling element.
use seed - Mass vs Distance Only
This option on the POSITIONS panel
on the GRID DESIGN
pane is for Mass vs Distance
scans only so is disabled for other scan types.
Mass vs Distance scans
sample images using concentric
circles or rectangles. When this option
is selected, these scans start from a "seed" pixel.
If this option is not selected,
they start from the centre of the image or ROI selected,
as illustrated below.
| Mass vs Distance - Seed vs Centre | |
|
|
| The left image shows a scan with use a seed selected and a seed at x = 70 and y = 80 on a 100 pixel wide image. | The right image shows a scan without the option selected, which uses the centre of the image for the seed. |
To use this option, select the check box
on the dialog. Then, after the dialog is closed and a
scan button is
clicked, a dialog requests x and y coordinates
to start the scan from. Type in the coordinates and
click OK or hit Enter.
If this option is selected, it enables another option
to set the seed by clicking on the screen -
see
SET SEEDS BY CLICKING.
set seeds by clicking - Mass vs Distance Only
This option on the
POSITIONS panel
on the
GRID DESIGN
pane is for
Mass vs Distance
scans; it is disabled for other scan types.
This option is also disabled if the
seed option is not selected.
Mass vs Distance scans sample images using
concentric
circles or rectangles centred on a seed location.
Select this option to choose the
seed by clicking
on the screen prior to scanning. If this option is selected,
when a Mass vs Distance scan is started,
a dialog box appears so the seed location (its
x and y coordinates) can be confirmed or modified prior
to scanning.
Illustration comparing scanning after clicking with scanning by the default method.
Select options from this panel on the GRID DESIGN pane to define the scaling to use when sampling an image. The "scaling" translates to the series of grid calibres for box counting.
Click to read about choosing a series in order to capture scaling.
Select a method from the dropdown on the
SERIES panel
on the
GRID DESIGN pane
to specify how to calculate each consecutive size in the
series of calibres for
box counting.
To see a description of each method,
click on it in the dropdown on the panel or the list below.
To see an example of how the currently selected series looks, click on the example sizes button on the panel.
Default Sampling Sizes - linear
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a linear series of box sizes.
Use this option when the scaling rule is not known ahead of time in order to ensure that scaling is captured in the data gathering stage. Use a filter to process the data after the fact in order to determine a relevant series.
Animation of a Linear Series
This animation shows a linear series using a non-overlapping, square sampling element at a maximum size of 45%. The image is a quadric cross.
Power Series - base and exponent
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a power series of box sizes. Set a base and an exponent using the fields that are activated when this option is selected.
The base is raised to the exponent added to itself to make successive sizes, e.g., for base = 2 and exponent = 2.0, the first three sizes are:
| 2(2) | = | 4 |
| 2(2+2=4) | = | 16 |
| 2(2+4=6) | = | 64 |
Scaled Series - scale using numerator / denominator
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a scaled series of box sizes. Set the maximum, numerator, and denominator using the fields that are activated when this option is selected.
The list is determined by scaling the maximum successively by numerator÷denominator and rounding to an integer, e.g., for maximum = 178 with numerator = 1 and denominator = 3, the values are
| 178 × (1/3) | = | 59.3 | ⇒ 59 |
| 59.3 × (1/3) | = | 19.8 | ⇒ 20 |
Relative Series - factors of max size
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a relative series of box sizes. The list is determined as factors of the largest box.
Only whole integers are used and no values are rounded, so the list may be short. To illustrate,
| for 32, the series is | 1, 2, 4, 8, 16, 32 |
| but for 31 it is | 1, 31 |
Odd Series - odd numbers; min to max
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make an odd numbered series of box sizes. This makes a series of odd numbers from the minimum to the maximum; this is recommended for local connected fractal dimension scans scans.
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a custom series of box sizes. When this option is selected, a dialog box comes up asking for a comma-separated string of numbers (e.g., 2,4,6,8).
Duplicates are removed and the list is ordered automatically by the program.
To input a new set once the option is selected, click the label at the bottom of the SIZES panel that says "Click here to see example sizes".
Block Series - for textures/filled images
Select this option from the dropdown on the SERIES panel on the GRID DESIGN pane to make a block series of box sizes. This will scan a square block within an image using a series of grids calculated from the block size. Use it for some textures, for instance.
It keeps the scan within limits to exclude boxes that would otherwise be partial boxes, which can affect the mean pixels per box. This is illustrated in the image below.
Selecting this option makes FracLac calculate a series of box sizes that divide evenly into the largest size and are no smaller than the smallest ± 5 pixels.
| Block Scans Compared to Default | |
|---|---|
|
The centre shows the original image with the ROI for the bottom scans outlined in magenta; there was no ROI for the top scans. |
The rows in this image show block scans on the left and default on the right for the same image (centre).
The series is affected by the number of boxes selected and the minimum and maximum sizes allowed, and the image type. If the series used (show in the results files) is not the series expected, try changing these settings. To get an idea of what each series looks like, click the update button to see a list of sizes based on the current settings. This sample is a general guideline assuming pixel-based limits because it is not based on an actual image.
Use the SIZES panel, the third panel on the GRID DESIGN pane, to define scaling features for the grid calibre series to be used to sample an image.
Some options are disabled depending on the method selected for calculating the series.
num sizes - The number of scaled calibres to make
Type a number in the box or use the slider on the SIZES panel on the GRID DESIGN pane to specify the number of grid calibres to use in a series. Set this option to "0" to let FracLac determine the number, or a number greater than 0 to recommend a length.
The value is a target only; the number of calibres actually used also depends on options selected for series, minimum size, and maximum size. The number actually used is reported in the results table.
See tips on choosing the number of calibres in a series in order to capture scaling.
Click to see example sizes - Button shows calibres in a series
Click the button on the
SIZES panel
on the
GRID DESIGN pane
to display a list of
grid calibres
that would be generated using the current settings.
Also click it to reset the Custom Series
if that option is being used.
The list is based on default values for image size,
and the current settings for series
type, min, max,
and number of sizes,
as well as any other values this might depend on such as the
base and exponent in a Power Series.
The list that appears on the dialog is meant as a very general
guideline to illustrate how the current settings will change
the series, but the actual series will depend on the
actual image.
min size - Minimum box size as % or pixels
Use the slider and number field on the
SIZES panel
on the
GRID DESIGN pane
to
set the smallest
grid calibre in
the series.
Click the slider or label
to bring up a menu for choosing to base this on:
For some scans, the lowest possible value is limited (e.g., if check pixels is selected, the minimum is 5.
One pixel is a logical absolute lower limit on box size, but image
constraints do not necessarily reflect the limit of resolution
for the system that created an image.
Rather, the box size where no further meaningful detail
is available is the practical lower limit in box counting.
This should respect the relationship between resolution and
pixels in a final image.
A practical implication for box counting and finding
Dʙs
is that the
regression line
using a box size of 1 pixel will
intersect the y-axis (where the ln 1 = 0 is plotted) at the log
of the number of pixels of interest, or when expressed using
relative scale instead of absolute box size, the intersection
will be at a position accordingly adjusted from the number of
pixels.
Thus, the prefactor,
A,
depends on the smallest box size used as well as on how the
scaling ratio is calculated. Either way, the graph will show the
number of pixels counted irrespective of the number of clusters of
pixels that are valid at a given resolution.
max - Maximum box size as % or pixels
Use the slider and number field on the SIZES panel on the GRID DESIGN pane to set the largest grid calibre in the series. For some scans, the largest possible value is limited.
Click the slider or number field on the panel to change how the maximum is valued. Choose from:
This option is overridden if the number is 0; in that case, FracLac determines the maximum based on each image and scan type.
Note also that the maximum size is filtered in the value returned as the smoothed DB(small) if smoothing is selected.
The actual maximum used is printed in the results file.
One reason max size is available as a percentage is
that box sizes
beyond about 50% of the image size introduce errors.
To describe an image meaningfully, box size should not exceed
the image's total size. For sizes greater than 100% of the size
of the box enclosing the foreground pixels, the count will always
be 1, which will make a slope of 0 for the Dʙ.
A scaling ratio greater than 1 (i.e., with a positive exponent)
should yield a fractional count, but in FracLac the smallest possible
count is the integer 1. All grids of a calibre larger than the
smallest box enclosing all the pixels, for a single series of
grids having a fixed starting orientation, have count = 1 and
box size becomes irrelevant in the equation for slope so
the calculated slope is, therefore, horizontal for the
interval of all boxes larger than a box containing all the pixels.
Indeed, a box count that never goes below this relative size
yields a fractal dimension of 0 with undefined correlation, i.e.,
no detected change in detail with scale, regardless of actual
change in detail with scale.
This essential issue also manifests at
box sizes approaching the practical upper limit. A range of
up to 20 to 50% or the default value of 45% is generally
optimal for standard box counting scans.
greater dim - Set rule for image dimension
Use this check-box on the
SIZES panel
on the
GRID DESIGN pane
to
set the rule for deciding how to choose the
image dimension.
The image dimension is a single value,
either width or height, to use to represent the
image or ROI being scanned. It will refer to an ROI if one was
selected on screen, if an
ROI Manager scan
is being done, or if a subscan is being done.
The image dimension is used for determining the
maximum relative box size in
a series of grid calibres.
Select the check-box
to use the longer side of the
bounding box,
or unselect it to use the shorter side, as the image
dimension.
This option can significantly affect
the series,
especially for images or ROIs with a high ratio of longer to
shorter bounding box sides.
Bounding Box
The bounding box is the rectangle enclosing all foreground pixels so depends on how the image is oriented. (See image).
This panel located on the GRID DESIGN pane holds several choices for further refining the way data are gathered during a scan.
SLIDE X - for sliding box scans
SLIDE Y - for sliding box scans
Use these sliders on the OPTIONS panel on the GRID DESIGN pane to set the amount to slide the sampling element horizontally and vertically.
If there are 2 sliders available, the x slider specifies movement horizontally and the y slider vertically. But if there is only one slider, the x slider specifies both horizontal and vertical movement (i.e., they are equal).
For LCFD Scans: Set both the SLIDE X and the SLIDE Y components for Local Connected Fractal Dimension (Dʟᴄ) scans. For these scans, a connected set and Dʟᴄ are calculated for every xth pixel horizontally and every yth pixel vertically ( see Dʟᴄ discussion). Setting these greater than 1 speeds up processing but ignores pixels and may ignore many pixels in images that are sparse in the first place. Prior to doing batch jobs in particular, you may want to do a trial run selecting the option to draw the boxes in order to assess the sampling.
Discussion and important notes.
Overlapping or sliding box sampling contrasts with fixed grid sampling. The overlapping scan is defined by the x and y slide factors, which are enabled on the OPTIONS panel for scans that use a sliding box algorithm.
Using a nonexhaustive scan often yields the same basic results as an exhaustive scan, and is especially useful for preliminary quick analyses. An exhaustive scan slides the sampling element one pixel at a time, and overlaps fully, whereas a nonexhaustive scan moves in larger increments, overlapping the sampling elements less but taking less time. (See sliding box sampling for further information about sliding box scans.)
For local dimension sub scans, this setting causes the program to analyze every nth pixel instead of every pixel.
Tips: It is important in some cases to keep the minimum resolvable size (i.e., minimum grid size in pixels) high enough (e.g.,usually greater than 3). Setting this option very small can increase processing time dramatically because of the overlapping during sampling.
Use this field on the
OPTIONS panel
on the
GRID DESIGN pane
to control edge scanning for
local connected fractal dimension
scans. This option is disabled for all other
scans.
Use this
setting to avoid sampling edges when that will adversely affect
your results. You may need to explore how the maximum box size
and the margin interact for different types of images.
This field sets a margin around the scanning area, as illustrated
in the image.

The figure illustrates a scan using a 50 pixel maximum box size with the area to skip set at 10 pixels and at 50 pixels.
check pix - Set upper and lower density limits
Use this check-box on the
OPTIONS panel
on the
GRID DESIGN pane
to do a pixel check before scanning.
Select it to verify that boxes in a scan are counted
only if they contain within a certain ratio
of
foreground to background
pixels.
This option is not available for
grayscale scans,
Mass vs Distance scans,
and block scans. To enable it,
select a binary scan
and an alternative series from this
dialog. To change the scan type, close the dialog and
select a new scan from the FracLac panel.
The density limits are set through a pop-up that appears after
clicking OK on the set up dialog.
The test ratio is
total foreground pixels
× box size² ÷ Dimension²,
where Dimension is the greater of
the height and width of the
bounding box.
This option is ignored for grayscale images and resets the
minimum box size.
This feature can minimize edge effects on some images (e.g., textures), but can also slow down and change processing considerably. If the ratio is set relatively high, then few or no boxes may be accepted. The results can be checked by looking at the Data file or selecting the option to Show Grids. The image below compares the boxes counted at 4 different calibres with the option selected and with it unselected.
Controlling For Pixel Density
When the option is selected, boxes having densities beyond the limit are not counted. Boxes counted are outlined in magenta. For example, the largest calibre is shown in the bottom right for both examples. The top has a count of 9 (no density limits) and the bottom has 3 (with density limits).
edges - Limit sliding box scans
This check-box on the OPTIONS panel on the GRID DESIGN pane is for Sliding Box Lacunarity scans only. The image below shows grid images illustrating the effect of turning this option on or off.
Limit Edges for SLac Scans
tighten grid - adjust each sample
Use this check-box on the
OPTIONS panel
on the
GRID DESIGN pane to adjust
the box counting grid's
placement for each sample.
The image below illustrates the effect of
selecting this option.
This option is not available for
Block scans.
Tighten Grids On vs Off
The top right shows the tighten grids option selected; bottom left unselected (default). The image was generated by selecting the option to draw the grid stack.
slip grid - randomly adjust the grid
Use this check-box on the
OPTIONS panel
on the
GRID DESIGN pane
to let the grid slip at each
position.
Selecting this option adds a random factor to
overall grid orientation but does not affect the
series.
If multiple grids are being used, each location for the
grid is selected randomly within an area
then, if this option is selected, the position is further adjusted
at scan time.
This option is disabled in
Mass vs Distance
and Sub scans.
|
Animated Box Counting Series Showing Slip Grid Option
Animation made using draw grids option. |
|
|---|---|
| TOP: a series applied with the
option to slip the grid unselected.
BOTTOM: the same image and series, with the option to slip the grid selected. |
|