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

find_localmaxima

Local Maximum Filter


Description

Generic local maximum filter. For individual tree detection use find_trees with the lmf algorithm that is more adequate for ITD. This function is a more generic method for multiple purposes other than tree segmentation. This function is natively parallelized with OpenMP.

Usage

find_localmaxima(las, w, filter = NULL)

Arguments

las

An object of class LAS

w

numeric. Window shape. 1 number for the diameter of a disc, 2 numbers for a rectangle (width, height), 3 numbers for an oriented rectangle (width, height, angle). The angle must be in radians.

filter

formula. Memory efficient way to work only with a subset of the data without creating a copy of the data.

Value

SpatialPointsDataFrame with attributes from the corresponding point in the LAS object,

Examples

LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyzi", filter = "-drop_z_below 0 -keep_random_fraction 0.5")

# Using a 20x5 rectangle with a 45 degrees angle.
# This won't find the tree properly in the general case
# but may find some oriented structure.
lm = find_localmaxima(las, c(20, 5, pi/4))
plot(lm)

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.