classify_noise {lidR}R Documentation

Classify points as 'noise'

Description

Classify points as 'noise' (outliers) with several possible algorithms. The function updates the attribute Classification of the LAS object. The points classified as 'noise' are assigned a value of 18 according to las specifications.

Usage

classify_noise(las, algorithm)

Arguments

las

An object of class LAS or LAScatalog.

algorithm

a noise-segmentation function. lidR has: sor, ivf.

Value

If the input is a LAS object, return a LAS object. If the input is a LAScatalog, returns a LAScatalog.

Working with a LAScatalog

This section appears in each function that supports a LAScatalog as input.

In lidR when the input of a function is a LAScatalog the function uses the LAScatalog processing engine. The user can modify the engine options using the available options. A careful reading of the engine documentation is recommended before processing LAScatalogs. Each lidR function should come with a section that documents the supported engine options.

The LAScatalog engine supports .lax files that significantly improve the computation speed of spatial queries using a spatial index. Users should really take advantage a .lax files, but this is not mandatory.

Supported processing options

Supported processing options for a LAScatalog (in bold). For more details see the LAScatalog engine documentation:

Examples

LASfile <- system.file("extdata", "Topography.laz", package="lidR")
las <- readLAS(LASfile, filter = "-inside 273450 5274350 273550 5274450")

# Add 20 artificial outliers
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

# Using SOR
las <- classify_noise(las, sor(15,7))
#plot(las, color = "Classification")

# Using IVF
las <- classify_noise(las, ivf(5,2))

# Remove outliers using filter_poi()
las_denoise <- filter_poi(las, Classification != LASNOISE)

[Package lidR version 3.2.2 Index]