Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

rTLS (version 0.2.5.6)

voxels: Voxelization of a Point Cloud

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

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

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.

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.

Author

J. Antonio Guzmán Q.

Details

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

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

Run this code
data("pc_tree")

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


Run the code above in your browser using DataLab