R: Point Cloud Decimation Algorithm

random_per_voxel {lidR} | R Documentation

## Point Cloud Decimation Algorithm

### Description

This functions is made to be used in decimate_points. It implements an algorithm that creates a 3D grid with a given resolution and filters the point cloud by randomly selecting n points within each voxel

### Usage

    random_per_voxel(res = 1, n = 1)

### Arguments

`res` | numeric. The resolution of the voxel grid used to filter the point cloud
`n` | integer. The number of points to select

### See Also

Other point cloud decimation algorithms: `homogenize()`, `maxima`, `random()`

### Examples

    LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
    las <- readLAS(LASfile, select = "xyz")
    thinned <- decimate_points(las, random_per_voxel(8, 1))
    #plot(thinned)

[Package lidR version 3.2.2 Index]