FractalVision Lab · Scientific Documentation

Scientific Limitations

Understanding the boundaries of box-counting analysis — where the method is reliable, where it breaks down, and how to interpret results accordingly.

Scientific honesty requires acknowledging method limitations alongside results. The limitations below do not invalidate fractal dimension as a measure of structural complexity — they define the conditions under which results should be interpreted with appropriate caution.

Rasterization and Resolution

Box-counting in FractalVision Lab operates on a pixel grid(raster image), not on a continuous mathematical object. This introduces quantization artefacts that have measurable effects on the computed D value.

Diagonal edges in a raster image produce a "staircase" (aliasing) effect. The staircase pixels inflate the box count at small scales, slightly biasing D upwards for patterns dominated by diagonal boundaries.

This effect is most visible at high iteration fractal images. For example, at iteration 7 or 8 of the Sierpiński Triangle, the smallest triangular holes are approximately 8–16 px wide. The box-counting algorithm samples these fine features with only 1–2 box sizes before the smallest box size (4 px) is reached, providing insufficient data points to fit the self-similar scaling law accurately.

As iteration depth increases from 1 → 6, the computed D converges towardthe theoretical value (e.g. 1.585 for Sierpiński Triangle) as the fractal structure occupies a wider range of scales relative to individual pixels. Beyond iteration 6–7, diminishing returns set in and aliasing noise dominates. This is why FractalVision Lab imposes per-fractal iteration caps (e.g. 6 for Sierpiński Carpet, 7 for Koch variants, 8 for Sierpiński Triangle).

For the most accurate results, use images at 1024 × 1024 px or higher. The backend automatically resizes to a maximum of 1024 px — for the Fractal Explorer, this provides the optimal balance between rendering detail and box-counting accuracy.

Scale Range Constraints

The box-counting method estimates D from the slope of the log-log plot of N(ε) vs. 1/ε. The accuracy of this slope estimate improves with the number and spread of box scales used. If the scale range is too narrow — either too few scales or a small ratio between the largest and smallest box — the slope is poorly constrained and the confidence interval for D becomes wide.

Scale selection in FractalVision Lab
Smallest box size
4 pxFixed lower limit — smaller boxes approach individual pixel noise
Largest box size
image_size / 4Ensures at least a 4× scale range regardless of image size
Scale sequence
Powers of 2: 4, 8, 16, 32, 64, 128 pxGeometric spacing maximises scale range for a given number of data points
Typical scale count
6–8 scalesFor a 1024 px image: 4, 8, 16, 32, 64, 128, 256 px

Very small images (e.g. < 128 px) may yield only 4–5 meaningful scales, reducing regression quality. The R² score directly captures this: a low R² value at a narrow scale range indicates that the power-law relationship is not well-established over the measured range, and D should be treated as an approximation rather than a precise estimate.

Avoid analysing thumbnails or heavily downsampled images. A minimum image size of 256 × 256 px is strongly recommended; 512 × 512 px or larger is preferred for publication-quality results.

Threshold Sensitivity

The single most impactful preprocessing step is thresholding: converting the grayscale image to a binary mask. The choice of threshold value determines which pixels are classified as foreground and which as background — directly controlling the set of pixels that the box-counting algorithm sees.

Two different threshold values applied to the same image can produce foreground masks with meaningfully different spatial structures, yielding different D values. This is not a flaw of the algorithm; it reflects the genuine ambiguity in defining what constitutes the "structure" in a noisy natural image.

When Otsu is reliable

Otsu's method works best when the image histogram has a clear bimodal distribution — a distinct peak for the background and a distinct peak for the subject. Well-lit specimens on clean backgrounds are optimal.

When adaptive threshold is better

For images with uneven illumination (shadows, vignetting), adaptive thresholding computes a per-pixel threshold from the weighted average of a local neighbourhood (Gaussian weights). The default block size is 11 px with C = 2, but both parameters are user-adjustable via sliders in the Preprocessing Controls panel. This suppresses lighting gradients that would confuse a global threshold.

Always run the Sensitivity Test(Full Mask + Otsu or Manual threshold) when reporting D for a novel image. A standard deviation σ < 0.05 across threshold ± 15 confirms that the result is stable and not threshold-dependent.

The sensitivity test is explicitly disabled for Adaptive threshold mode, because adaptive thresholding does not have a single global threshold value to perturb. In that case, visual inspection of the binary image — accessible in the Algorithm Microscope panel — is the primary diagnostic tool.

Image Quality Dependencies

FractalVision Lab measures the fractal dimension of the binary maskderived from the input image, not of the physical object directly. The quality of this measurement therefore depends on how faithfully the image represents the object's structure.

Background noise

Speckle noise, dust, or texture in the background that crosses the threshold gets included in the foreground mask, inflating the pixel count and artificially increasing D. Use a clean, uniform background — a plain white or black surface — when photographing specimens.

JPEG compression artefacts

JPEG compression introduces 8×8 block artefacts that create spurious high-frequency structure. These artefacts are picked up by the box-counting algorithm at small scales (ε = 4–8 px), biasing D upwards. Always prefer PNG for scientific imaging.

Low contrast and shadows

Low contrast between subject and background forces the threshold into a region where small intensity changes dramatically alter the binary mask. Shadows cast by the subject onto the background are particularly problematic, as they may be darker than the subject itself and get classified as foreground.

Optimal capture conditions

Diffuse, even lighting. Clean white or black background. PNG file format. Image resolution ≥ 512 × 512 px. Subject fills at least 50% of the frame. These conditions consistently produce R² ≥ 0.99 and quality scores ≥ 85 in the dissertation specimen set.

Method Limitations

Box-counting is one member of a family of fractal dimension estimators. The choice of estimator matters, and each has different theoretical properties:

Fractal dimension estimators — comparison
Used

Box-counting (Minkowski–Bouligand)

+ Simple, intuitive, works on any binary raster image Sensitive to grid alignment; quantization noise at small scales

Not used

Hausdorff dimension

+ Theoretically rigorous; the true mathematical definition Computationally intractable for raster images; requires analytic set definitions

Not used

Correlation dimension

+ Suitable for point-cloud or time-series data Requires a large number of data points; not applicable to 2D binary images

Not used

Mass dimension

+ Measures density scaling; good for self-similar mass distributions Requires a well-defined centre point; not appropriate for boundary patterns

Beyond the choice of estimator, several fundamental limitations apply to the use of D as a descriptor of natural patterns:

  • D measures the binary image, not the object. The fractal dimension reported by FractalVision Lab is a property of the preprocessed binary mask. Different preprocessing settings applied to the same photograph can yield measurably different D values. The Sensitivity Test and Reliability Dashboard are specifically designed to surface and quantify this uncertainty.
  • Natural patterns are not perfectly self-similar. Mathematical fractals (Koch, Sierpiński) maintain strict self-similarity across arbitrarily many scales by construction. Real biological and geological patterns are only approximately self-similar, and only over a finite scale range. D should be interpreted as an estimate of complexity over the measured scale range [4 px, image_size/4], not as an absolute property of the object.
  • Theoretical vs. computed dimensions of rendered fractals. The theoretical fractal dimensions of Koch Curve (1.2619), Sierpiński Triangle (1.5850), and Sierpiński Carpet (1.8928) assume infinite iteration on a continuous plane. FractalVision Lab renders these at finite pixel resolution with a finite number of iterations. The computed D converges toward the theoretical value as iteration depth increases, but never reaches it exactly. Error percentages of 1–5% at iteration 4–6 are expected and scientifically normal.
  • Single D value vs. multifractal analysis. Box-counting produces a single global D value summarising the entire image. Some structures exhibit different scaling behaviour at different locations (multifractals). A single D value does not capture this spatial heterogeneity. Multifractal analysis is beyond the scope of FractalVision Lab.

When citing fractal dimension values in academic work, always report D alongside R², the confidence interval, the threshold method used, the analysis mode, and the sensitivity test result. A single D value without this context is insufficient for reproducible scientific reporting.