Histogram of detection
hist_detection.RdDisplays the histogram of tree heights of three categories: true detections, omissions, and false detections.
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
- matched
data.frame. contains pair indices, typically returned by
tree_matching- plot
boolean. should the histogram be displayed or not
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))
#
# tree matching with different buffer size
match1 <- tree_matching(ref_trees, def_trees)
match2 <- tree_matching(ref_trees, def_trees, delta_ground = 2, h_prec = 0)
#
# corresponding number of detections
hist_detection(ref_trees, def_trees, match1)
#> $true_detections
#> [1] 4
#>
#> $false_detections
#> [1] 0
#>
#> $omissions
#> [1] 1
#>
hist_detection(ref_trees, def_trees, match2)
#> $true_detections
#> [1] 3
#>
#> $false_detections
#> [1] 1
#>
#> $omissions
#> [1] 2
#>