Point Cloud Decimation Algorithm
This function is made to be used in decimate_points. It implements an algorithm that creates a grid with a given resolution and filters the point cloud by randomly selecting some points in each cell. It is designed to produce point clouds that have uniform densities throughout the coverage area. For each cell, the proportion of points or pulses that will be retained is computed using the actual local density and the desired density. If the desired density is greater than the actual density it returns an unchanged set of points (it cannot increase the density). The cell size must be large enough to compute a coherent local density. For example in a 2 points/m^2 point cloud, 25 square meters would be feasible; however 1 square meter cells would not be feasible because density does not have meaning at this scale.
homogenize(density, res = 5, use_pulse = FALSE)
density |
numeric. The desired output density. |
res |
numeric. The resolution of the grid used to filter the point cloud |
use_pulse |
logical. Decimate by removing random pulses instead of random points (requires running retrieve_pulses first) |
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR") las = readLAS(LASfile, select = "xyz") # Select points randomly to reach an homogeneous density of 1 thinned = decimate_points(las, homogenize(1,5)) plot(grid_density(thinned, 10))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.