Calculation of Fractal Dimension of Lef Veins Based on the Box-Counting Method
Calculation of Fractal Dimension of Lef Veins Based on the Box-Counting Method
fracdim is used to calculate the fractal dimension of leaf veins based on the box-counting method.
UTF-8
fracdim(x, y, frac.fig =TRUE, denomi.range = seq(8,30, by=1), ratiox =0.02, ratioy =0.08, main =NULL)
Arguments
x: the x coordinates of leaf-vein pixels.
y: the y coordinates of leaf-vein pixels.
frac.fig: the option of drawing the results of the linear fitting.
denomi.range: the number of equidistant segments of the maximum range between the range of the x coordinates and that of the y coordinates.
ratiox: the the x coordinate of the location parameter for positioning the legend.
ratioy: the the y coordinate of the location parameter for positioning the legend.
main: the main title of the figure.
Details
The box-counting approach uses a group of boxes (squares for simplicity) with different sizes (δ) to divide the leaf vein image into different parts. Let N represent the number of boxes that include at least one pixel of leaf vein. The maximum of the range of the x coordinates and the range of the y coordinates for leaf-vein pixels is defined as z. Let δ represent the vector of z/denomi.range. Then, we used the following equation to calculate the fractal dimension of leaf veins:
lnN=a+bln(δ−1),
where b is the theoretical value of the fractal dimension. We can use its estimate as the numerical value of the fractal dimension for a leaf venation network.
Returns
a: the estimate of the intercept.
sd.a: the standard deviation of the estimated intercept.
lci.a: the lower bound of the 95% confidence interval of the estimated intercept.
uci.a: the upper bound of the 95% confidence interval of the estimated intercept.
b: the estimate of the slope.
sd.b: the standard deviation of the estimated slope.
lci.a: the lower bound of the 95% confidence interval of the estimated slope.
uci.a: the upper bound of the 95% confidence interval of the estimated slope.
r.sq: the coefficient of determination.
delta: the vector of box sizes.
N: the number of boxes that include at least one pixel of leaf vein.
Note
Here, x and y cannot be adjusted by the adjdata function because the leaf veins are not the leaf's boundary data.
Shi, P., Gielis, J., Quinn, B.K., Niklas, K.J., Ratkowsky, D.A., Schrader, J., Ruan, H., Wang, L., Niinemets, Ü. (2022) 'biogeom': An R package for simulating and fitting natural shapes. Annals of the New York Academy of Sciences 1516, 123−134. tools:::Rd_expr_doi("10.1111/nyas.14862")
Shi, P., Yu, K., Niinemets, Ü., Gielis, J. (2021) Can leaf shape be represented by the ratio of leaf width to length? Evidence from nine species of Magnolia and Michelia (Magnoliaceae). Forests 12, 41. tools:::Rd_expr_doi("10.3390/f12010041")
Vico, P.G., Kyriacos, S., Heymans, O., Louryan, S., Cartilier, L. (1998) Dynamic study of the extraembryonic vascular network of the chick embryo by fractal analysis. Journal of Theoretical Biology 195, 525−532. tools:::Rd_expr_doi("10.1006/jtbi.1998.0810")