segment_crown: Segment tree crown of 'LAS' representing segmented tree.

View source: R/traits_from_point_cloud.R

segment_crownR Documentation

Segment tree crown of 'LAS' representing segmented tree.

Description

This function labels all points with $Z > 'crown_base_height'$ and returns a labled LAS. If 'crown_base_height' is not specified, it is estimated with [get_crown_base()] using default parameters.

Usage

segment_crown(las, crown_base_height = NULL)

Arguments

las

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

crown_base_height

numeric - height of crown base for segmentation. 'NULL', it is estimated with [get_crown_base()] using default parameters.

Value

The input 'LAS' object with a new attribute 'Crown' (1 = crown, 0 = non-crown).

Examples

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

#Plot with color based on crown
plot(las, color='Crown')


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