trunk_volume: Tree Trunk Volume

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/trunk_volume.R

Description

Estimates the tree trunk volume of a point cloud using the ashape3d package.

Usage

1
trunk_volume(cloud, max.height = NULL, alpha = 0.2, plot = TRUE, ...)

Arguments

cloud

A data.table with three columns representing the *XYZ* coordinates of a point cloud.

max.height

A numeric vector to contemplate points in the cloud lower than a specific height. If NULL, it performs the alpha-shape on the entire point cloud.

alpha

A numeric vector of length one passed to ashape3d to describes alpha. alpha = 0.20 as default since it seems to provide better estimations of the trunk volume. However, the alpha value may depends on the resolution of the point cloud.

plot

Logical. If TRUE, it uses plot.ashape3d to represent the alpha-shape.

...

General arguments passed to ashape3d.

Details

This is an adaptation of the code develop by Lafarge & Pateiro-Lopez (2017) based on Edelsbrunner & Mucke (1994) for the quick extraction of the tree trunk volume. Therefore, if you use this code we kindly suggest to cite these documents in your research.

Value

A numeric vector with the estimated trunk volume.

Author(s)

J. Antonio Guzmán Q.

References

Lafarge, T., Pateiro-Lopez, B. (2017). Implementation of the 3D Alpha-Shape for the Reconstruction of 3D Sets from a Point Cloud. Available at https://CRAN.R-project.org/package=alphashape3d.

Edelsbrunner, H., Mucke, E. P. (1994). Three-Dimensional Alpha Shapes. ACM Transactions on Graphics, 13(1), pp.43-72.

See Also

tree_metrics, circleRANSAC

Examples

1
2
3
4
data("pc_tree")

#Estimates the trunk volume of a height lower than 1.75.
trunk_volume(pc_tree, max.height = 1.75)

Antguz/rTLS documentation built on Dec. 14, 2021, 9:49 a.m.