voxels: Voxelization of a Point Cloud

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

View source: R/voxels.R

Description

Create cubes of a given distance in a point cloud though their voxelization. It use a modify version of the code used in Greaves et al. 2015.

Usage

1
voxels(cloud, edge_length, threads = 1L, obj.voxels = TRUE)

Arguments

cloud

A data.table with *XYZ* coordinates in the first three columns.

edge_length

A positive numeric vector with the voxel-edge length for the x, y, and z coordinates. It use the same dimensional scale of the point cloud.

threads

An integer specifying the number of threads to use for parallel processing. Experiment to see what works best for your data on your hardware.

obj.voxels

Logical. If obj.voxel = TRUE, it returns an object of class "voxels", If obj.voxel = FALSE, it returns a data.table with the coordinates of the voxels created and the number of points in each voxel. TRUE as default.

Details

Voxels are created from the negative to the positive *XYZ* coordinates.

Value

If obj.voxels == TRUE, it return an object of class "voxels" which contain a list with the points used to create the voxels, the parameter edge_length, and the voxels created. If FALSE, it returns a data.table with the coordinates of the voxels created and the number of points in each voxel.

Author(s)

J. Antonio Guzmán Q.

References

Greaves, H. E., Vierling, L. A., Eitel, J. U., Boelman, N. T., Magney, T. S., Prager, C. M., & Griffin, K. L. (2015). Estimating aboveground biomass and leaf area of low-stature Arctic shrubs with terrestrial LiDAR. Remote Sensing of Environment, 164, 26-35.

See Also

voxels_counting, plot_voxels, summary_voxels

Examples

1
2
3
4
data("pc_tree")

###Create cube of a size of 0.5.
voxels(pc_tree, edge_length = c(0.5, 0.5, 0.5))

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