
Last chance! 50% off unlimited learning
Sale ends in
This function is made to be used in classify_noise. It implements an algorithm for outliers (noise) segmentation based on Statistical Outliers Removal (SOR) methods first described in the PCL library and also implemented in CloudCompare (see references). For each point, it computes the mean distance to all its k-nearest neighbours. The points that are farther than the average distance plus a number of times (multiplier) the standard deviation are considered noise.
sor(k = 10, m = 3, quantile = FALSE)
numeric. The number of neighbours
numeric. Multiplier. The maximum distance will be: avg distance + m * std deviation
.
If quantile = TRUE
, m
becomes the quantile threshold.
boolean. Modification of the original SOR to use a quantile
threshold instead of a standard deviation multiplier. In this case the maximum
distance will be: quantile(distances, probs = m)
https://pointclouds.org/documentation/tutorials/statistical_outlier.html https://www.cloudcompare.org/doc/wiki/index.php?title=SOR_filter
Other noise segmentation algorithms:
ivf()
# NOT RUN {
LASfile <- system.file("extdata", "Topography.laz", package="lidR")
las <- readLAS(LASfile, filter = "-inside 273450 5274350 273550 5274450")
# Add some artificial outliers because the original
# dataset is 'clean'
set.seed(314)
id = round(runif(20, 0, npoints(las)))
set.seed(42)
err = runif(20, -50, 50)
las$Z[id] = las$Z[id] + err
las <- classify_noise(las, sor(15,7))
# }
Run the code above in your browser using DataLab