filter_point_density: Retains one point of the original point cloud within a voxel...

Description Usage Arguments Value Examples

View source: R/filter_point_density.R

Description

Retains one point of the original point cloud within a voxel of given size.

Usage

1

Arguments

data

a data.frame or data.table containing the x, y, z, ... coordinates of a point cloud.

res

numeric. The voxel resolution.

message

logical. If FALSE, messages are disabled. Default = TRUE.

Value

a data.frame or data.table with reduced point sensity.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))

#- keep one point in 2cm voxels
filtered=VoxR::filter_point_density(tls,0.02)
rgl::open3d()
rgl::plot3d(filtered,add=TRUE)

#- keep one point in 10cm voxels
filtered=VoxR::filter_point_density(tls,0.1)
rgl::open3d()
rgl::plot3d(filtered,add=TRUE)

VoxR documentation built on Nov. 16, 2020, 9:14 a.m.