3D matching of detected tree top positions with reference positions
tree_matching.RdFirst computes a matching index for each potential pair associating a detected with a reference tree. This index is the 3D distance between detected and reference points, divided by a maximum matching distance set by user-defined parameters. Pairs with the lowest index are then iteratively associated.
Arguments
- lr
data.frame or matrix. 3D coordinates (X Y Height) of reference positions
- ld
data.frame or matrix. 3D coordinates (X Y Height) of detected positions
- delta_ground
numeric. buffer around trunk position : absolute value
- h_prec
numeric. buffer around apex position : proportion of reference tree height
- stat
boolean. should matching stats be computed
Value
A data.frame with matched pairs (row of reference positions in first column, and row of detected positions in second column) and corresponding 3D distances
References
Monnet, J.-M. 2011. Using airborne laser scanning for mountain forests mapping: Support vector regression for stand parameters estimation and unsupervised training for treetop detection. Ph.D. thesis. University of Grenoble, France. pp. 53-55 https://theses.hal.science/tel-00652698/document
Monnet, J.-M., Mermin, E., Chanussot, J., Berger, F. 2010. Tree top detection using local maxima filtering: a parameter sensitivity analysis. Silvilaser 2010, the 10th International Conference on LiDAR Applications for Assessing Forest Ecosystems, September 14-17, Freiburg, Germany, 9 p. https://hal.science/hal-00523245/document
Examples
# create reference and detected trees
ref_trees <- cbind(c(1, 4, 3, 4, 2), c(1, 1, 2, 3, 4), c(15, 18, 20, 10, 11))
def_trees <- cbind(c(2, 2, 4, 4), c(1, 3, 4, 1), c(16, 19, 9, 15))
#
# match trees
match1 <- tree_matching(ref_trees, def_trees)
match2 <- tree_matching(ref_trees, def_trees, delta_ground = 2, h_prec = 0)
match1
#> r d h_diff plan_diff
#> 1 1 1 1 1.000000
#> 2 3 2 -1 1.414214
#> 3 4 3 -1 1.000000
#> 4 2 4 -3 0.000000
match2
#> r d h_diff plan_diff
#> 1 1 1 1 1.000000
#> 2 4 3 -1 1.000000
#> 3 3 2 -1 1.414214
# 2D display of matching result
plot_matched(ref_trees, def_trees, match1, xlab = "X", ylab = "Y")
plot_matched(ref_trees, def_trees, match2, xlab = "X", ylab = "Y")