get_dbh: Extract diameter at breast height from 'LAS' object...

View source: R/traits_from_point_cloud.R

get_dbhR Documentation

Extract diameter at breast height from 'LAS' object representing segmented tree.

Description

Function to extract diameter at breast height (1.37 m) from LAS object. Function filters LAS keeping only points with Intensity greater than specified threshold. Function calculates verticality eigenvalue and filters based on verticality threshold. Last, diameter is calculated using a RANSAC cylinder fitting algorithm.

Usage

get_dbh(
  las,
  intensity_threshold = 41000,
  select_n = 10,
  verticality_threshold = 0.9
)

Arguments

las

'LAS' object from 'lidR' package representing individually segmented tree

intensity_threshold

numeric - filter value for Intensity to help remove vegetation

select_n

numeric - number of points selected on every RANSAC iteration.

verticality_threshold

numeric - filter value for Verticality threshold to remove horizontal branches.

Value

A named numeric vector with element 'dbh' (m).

Examples

library(lidR)
las = readLAS(system.file("extdata", "tree_0744.laz", package="tReeTraits"))
las = clean_las(las)
print(get_dbh(las))

tReeTraits documentation built on Feb. 26, 2026, 1:07 a.m.