box_counting {VoxR} | R Documentation |
Computes fractal dimension using the box counting method.
Description
Computes fractal dimension using the box counting method.
Usage
box_counting(data, min_vox_size, store_fit, message)
Arguments
data |
a data.frame or data.table containing the x, y, z, ... coordinates of a point cloud. |
min_vox_size |
numeric. The minimum size of a voxel. Default = 0.01. |
store_fit |
logical. If TRUE, the parameters linear model's fit are returned. Default = FALSE. |
message |
logical. If FALSE, messages are disabled. Default = TRUE. |
Value
If store_fit = FALSE
only the fractal dimension is returned. If store_fit = TRUE
the parameters of the linear model used to estimate the fractal dimension and
a table containing the number of boxes (i.e. voxels) at any resolution are
returned in a list in addition to the fractal dimension.
References
Seidel, D. (2018). A holistic approach to determine tree structural complexity based on laser scanning data and fractal analysis. Ecology and evolution, 8(1), 128-134.
Examples
#- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))
#- box counting
FD = VoxR::box_counting(tls,store_fit = TRUE)
#- fractal dimension
FD$fractal_dim
#- linear model fit
FD$fit_summary
#- plot fit
plot(log(FD$fit_table$N)~log(1/FD$fit_table$res))
abline(FD$fit_summary)