Fractal analysis package

version 1.0.2 (175 KB) by Christian Frydendahl
This is a set of functions to analyse the geometry of particle aggregates in black and white binary images.


Updated 3 Oct 2021

View License

This package contains 3 main finder functions:
ap_finder.m - this determines the area and perimeters of particle clusters in a binary image, and returns each in a separate array. Mainly for making area vs. perimeter plots for fractal particle aggregates. Note, the perimeter is determined by expanding the clusters by 1 pixel in every direction, not by the default MATLAB routine.
conn_finder.m - this function determines several geometric aspects of the connected components of the image (i.e. the clusters), such as average cluster area, centre of mass coordinates for each cluster, the gyration radius of each cluster, and the correlation length of the image.
D_finder.m - find the Hausdorff fractal dimension of each cluster in the image, using the scaling/box counting method.
A short mathematical note is included on the methods used.
For a practial example of use of this code, see: [FRYDENDAHL, Christian, et al. Giant enhancement of silicon plasmonic shortwave infrared photodetection using nanoscale self-organized metallic films. Optica, 2020, 7.5: 371-379.] supplementary materials.

Cite As

Christian Frydendahl (2022). Fractal analysis package (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!