Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sor

Noise Segmentation Algorithm


Description

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.

Usage

sor(k = 10, m = 3, quantile = FALSE)

Arguments

k

numeric. The number of neighbours

m

numeric. Multiplier. The maximum distance will be: avg distance + m * std deviation. If quantile = TRUE, m becomes the quantile threshold.

quantile

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)

References

https://pointclouds.org/documentation/tutorials/statistical_outlier.html
https://www.cloudcompare.org/doc/wiki/index.php?title=SOR_filter

See Also

Other noise segmentation algorithms: ivf()

Examples

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))

lidR

Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

v3.1.2
GPL-3
Authors
Jean-Romain Roussel [aut, cre, cph], David Auty [aut, ctb] (Reviews the documentation), Florian De Boissieu [ctb] (Fixed bugs and improved catalog features), Andrew Sánchez Meador [ctb] (Implemented wing2015() for segment_snags()), Bourdon Jean-François [ctb] (Contributed to Roussel2020() for track_sensor()), Gatziolis Demetrios [ctb] (Implemented Gatziolis2019() for track_sensor())
Initial release
2021-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.