boxcount¶
- boxcount(im, bins=10)[source]¶
Calculates the fractal dimension of an image using the tiled box counting method [1]
- Parameters:
im (ndarray) – A boolean image of the porous material with True values indicating the phase of interest.
bins (int or array_like, optional) – The number of box sizes to use. The default is 10 sizes logarithmically spaced between 1 and
min(im.shape)
. If an array is provided, this is used directly.
- Returns:
results – An object possessing the following attributes:
Attribute
Description
size
An array containing the specific box sizes used
count
An array containing the number of boxes of each size that contain both solid and void
slope
The gradient of
count
. This has the same number of elements ascount
.- Return type:
dataclass-like
References
Examples
Click here to view online example.