The function performs a Dijkstra algorithm on a 3D voxel file to assign every voxel to the closest seed point using the igraph package.
comparative_shortest_path(
vox = vox,
adjacency_df = adjacency_df,
seeds,
v_w = 0,
l_w = 0,
s_w = 0,
N_cores = parallel::detectCores() - 1,
Voxel_size,
N_trees = 1
)voxels with the TreeID in the data slot
a LAS S4 element with XYZ voxel coordinates in the @data slot.
a data.frame with voxel ids (row numbers) in the first column and a neighboring voxel ID in the second column and the weight (distance) in the third column. Might be generated using the dbscan::frNN function (which requires reshaping the data).
seed points for tree positions.
weights for verticality, linearity spericity see
csp_cost_segmentation
Number of CPU cores for multi-threading
Edge length used to create the voxels. This is only important to gain comparable distance weights on different voxel sizes. Should be greater than 0.
The number of closest stem locations to add to the point cloud If > 1 the distances will be added as well.
Julian Frey <julian.frey@wwd.uni-freiburg.de>
csp_cost_segmentation