lidR (version 1.5.0)

lastrees_watershed: Individual tree segmentation

Description

Individual tree segmentation using a simple watershed. This method is a watershed segmentation method. It is based on the bioconductor package EBIimage. You need to install this package to run this method (see its github page).

Usage

lastrees_watershed(las, chm, th_tree = 2, tol = 1, ext = 1,
  extra = FALSE, ...)

Arguments

las

An object of the class LAS. If missing extra is turned to TRUE automatically.

chm

RasterLayer. Image of the canopy. Can be computed with grid_canopy or grid_tincanopy or read it from an external file.

th_tree

numeric. Threshold below which a pixel cannot be a tree. Default 2.

tol

numeric. Tolerance see ?EBImage::watershed.

ext

numeric. see ?EBImage::watershed.

extra

logical. By default the function classifies the original point cloud by reference and return nothing (NULL) i.e. the original point cloud is automatically updated in place. If extra = TRUE an additional RasterLayer used internally can be returned.

...

Supplementary options. Currently field is supported to change the default name of the new column.

Value

Nothing (NULL), the point cloud is updated by reference. The original point cloud has a new column named 'treeID' (or something else if the field option has been changed) containing an ID for each point that refer to a segmented tree. If extra = TRUE the function returns a RasterLayer used internally.

See Also

Other tree_segmentation: lastrees_dalponte, lastrees_li2, lastrees_silva, lastrees