Stable
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.
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.
grid_acceleration with larger grid_cell_size (e.g., 1.0), and reduce max_iterations or adaptive_neighbors.grid_refine_iterations, reduce bandwidth_min for smaller trees, or lower convergence_tol for stricter convergence.tile_size (e.g., 100 m × 100 m tiles with 5 m overlap) to cap per-tile memory and enable parallel tile processing.| Name | Description | Required | Default |
|---|---|---|---|
input | Input LiDAR path or typed LiDAR object. | Required | — |
only_use_veg | If true, process only vegetation classes (default true). | Optional | — |
veg_classes | Vegetation classes as comma-delimited text or integer array (default '3,4,5'). | Optional | — |
min_height | Minimum point height for segmentation (default 2.0). | Optional | — |
max_height | Optional maximum point height. | Optional | — |
bandwidth_min | Minimum horizontal bandwidth (default 1.0). | Optional | — |
bandwidth_max | Maximum horizontal bandwidth (default 6.0). | Optional | — |
adaptive_bandwidth | Estimate per-seed horizontal bandwidth from local crown geometry (default true). | Optional | — |
adaptive_neighbors | Neighbour count used for adaptive local density scale (default 24). | Optional | — |
adaptive_sector_count | Number of angular sectors for local crown-radius estimation (default 8). | Optional | — |
grid_acceleration | Use MeanShift++-style grid approximation for faster mode updates (default false). | Optional | — |
grid_cell_size | Grid cell size for accelerated mode updates (default 0.5). | Optional | — |
grid_refine_exact | Run short exact-neighbour refinement after grid acceleration (default false). | Optional | — |
grid_refine_iterations | Exact refinement iteration cap after grid mode updates (default 2). | Optional | — |
tile_size | Optional tile size for seed scheduling; <=0 disables tiling (default 0.0). | Optional | — |
tile_overlap | Tile overlap width for tiled seed scheduling (default 0.0). | Optional | — |
vertical_bandwidth | Vertical kernel bandwidth (default 5.0). | Optional | — |
max_iterations | Maximum mean-shift iterations per seed (default 30). | Optional | — |
convergence_tol | Convergence tolerance for shift magnitude (default 0.05). | Optional | — |
min_cluster_points | Minimum points per retained tree cluster (default 50). | Optional | — |
mode_merge_dist | Distance threshold for merging converged modes (default 0.8). | Optional | — |
threads | Thread count override (0 uses default Rayon pool). | Optional | — |
simd | Enable SIMD-assisted arithmetic in weighting loops (default true). | Optional | — |
output_id_mode | Output segment id encoding {rgb|user_data|point_source_id|rgb+user_data|rgb+point_source_id} (default rgb). | Optional | — |
output_sidecar_csv | If true, write point_index,segment_id CSV beside lidar output. | Optional | — |
seed | Deterministic seed for colour mapping (default 1). | Optional | — |
output | Optional output LiDAR path. | Optional | — |