I have unclassified Terrestrial Laser Scanning (TLS) point cloud data which has some noise. Is there a function in the lidR package which can be used to remove noise?
It depends on what is your purpose. If you are looking for a very high resolution forest analysis may be that noise means something and must be analyzed in a particular way. If you just want to "simplify" (decimation) your data and get an homogenized distribution of points you can use the following functions (here is the complete guide):
library(lidR) las <- readLAS(file) #option 1 - homogenized las with density = 1 and res = 5 s1 <- lasfilterdecimate(las, homogenize(1,5)) #option 2 - get highest points in 5m resolution s2 <- lasfilterdecimate(las, highest(5)) #option 3 - get random points in 5m resolution s3 <- lasfilterdecimate(las, random(5))
classify_noise was introduced with lidR 3.2.0 and includes two algorithms: Statistical Outliers Removal (
SOR) and isolated voxels filter (
So you would need to first run the function to classify noise in the point cloud, and then use
las <- classify_noise(las, sor(15,7)) las_denoise <- filter_poi(las, Classification != LASNOISE)