lidR (version 1.6.1)

lassmooth: Smooth a point cloud

Description

Point cloud-based smoothing algorithm. Two methods are available: average within a window and Gaussian smooth within a window. The original object is updated in place. The Z column is now the smoothed Z. A new column Zraw is added to store the original values and can be used to restore the point cloud with lasunsmooth.

Usage

lassmooth(las, size, method = c("average", "gaussian"), shape = c("circle",
  "square"), sigma = size/6)

lasunsmooth(las)

Arguments

las

An object of class LAS

size

numeric. The size of the windows used to smooth

method

character. Smoothing method. Can be 'average' or 'gaussian'.

shape

character. The shape of the windows. Can be circle or square.

sigma

numeric. The standard deviation of the gaussian if the method is gaussian

Value

Nothing (NULL). The original object has been updated in place. The 'Z' column is now the smoothed 'Z'. A new column 'Zraw' is added in the original object to store the original values.

Details

This method does not use raster-based methods to smooth the point cloud. This is a true point cloud smoothing. It is not really useful by itself but may be interesting in combination with filters such as lasfiltersurfacepoints, for example.

See Also

lasfiltersurfacepoints

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile, select = "xyz")

las = lasfiltersurfacepoints(las, 1)
plot(las)

lassmooth(las, 5, "gaussian", "circle", sigma = 2)
plot(las)

lasunsmooth(las)
plot(las)
# }

Run the code above in your browser using DataLab