Stable

Individual Tree Segmentation

Segment individual tree crowns from LiDAR point clouds using mean-shift clustering with adaptive bandwidth estimation.

This tool uses a kernel-based mean-shift algorithm to identify and delineate individual tree crowns in airborne LiDAR data. Each tree is segmented as a 3D point cluster, with adaptive bandwidth (kernel smoothing radius) automatically estimated from local crown geometry. This approach is particularly effective for dense forests where trees overlap in 2D projection, as the algorithm operates in full 3D space.

Key Features

Algorithm

The tool implements a mean-shift clustering workflow: (1) seeds are initiated at points above the height threshold, (2) each seed iteratively shifts toward the local density mode (3D Euclidean space, weighted by kernel), (3) converged modes are merged if they fall within a distance threshold, (4) points are assigned to their nearest converged mode, and (5) clusters below the minimum point count are rejected as noise. Parallel processing across seeds accelerates computation on multi-core systems.

Use Cases

Performance Tuning

Parameters

NameDescriptionRequiredDefault
inputInput LiDAR path or typed LiDAR object.Required
only_use_vegIf true, process only vegetation classes (default true).Optional
veg_classesVegetation classes as comma-delimited text or integer array (default '3,4,5').Optional
min_heightMinimum point height for segmentation (default 2.0).Optional
max_heightOptional maximum point height.Optional
bandwidth_minMinimum horizontal bandwidth (default 1.0).Optional
bandwidth_maxMaximum horizontal bandwidth (default 6.0).Optional
adaptive_bandwidthEstimate per-seed horizontal bandwidth from local crown geometry (default true).Optional
adaptive_neighborsNeighbour count used for adaptive local density scale (default 24).Optional
adaptive_sector_countNumber of angular sectors for local crown-radius estimation (default 8).Optional
grid_accelerationUse MeanShift++-style grid approximation for faster mode updates (default false).Optional
grid_cell_sizeGrid cell size for accelerated mode updates (default 0.5).Optional
grid_refine_exactRun short exact-neighbour refinement after grid acceleration (default false).Optional
grid_refine_iterationsExact refinement iteration cap after grid mode updates (default 2).Optional
tile_sizeOptional tile size for seed scheduling; <=0 disables tiling (default 0.0).Optional
tile_overlapTile overlap width for tiled seed scheduling (default 0.0).Optional
vertical_bandwidthVertical kernel bandwidth (default 5.0).Optional
max_iterationsMaximum mean-shift iterations per seed (default 30).Optional
convergence_tolConvergence tolerance for shift magnitude (default 0.05).Optional
min_cluster_pointsMinimum points per retained tree cluster (default 50).Optional
mode_merge_distDistance threshold for merging converged modes (default 0.8).Optional
threadsThread count override (0 uses default Rayon pool).Optional
simdEnable SIMD-assisted arithmetic in weighting loops (default true).Optional
output_id_modeOutput segment id encoding {rgb|user_data|point_source_id|rgb+user_data|rgb+point_source_id} (default rgb).Optional
output_sidecar_csvIf true, write point_index,segment_id CSV beside lidar output.Optional
seedDeterministic seed for colour mapping (default 1).Optional
outputOptional output LiDAR path.Optional

Project Links

WbW Homepage User Manual Support WbW