# calculate
lc2 <- LCSS(pedestrian1, pedestrian2, pointSpacing = 2, pointDistance = 2, errorMarg = 0.5)
lc3 <- LCSS(pedestrian1, pedestrian3, pointSpacing = 2, pointDistance = 2, errorMarg = 0.5)
lc4 <- LCSS(pedestrian1, pedestrian4, pointSpacing = 2, pointDistance = 2, errorMarg = 0.5)
lc5 <- LCSS(pedestrian1, pedestrian5, pointSpacing = 2, pointDistance = 2, errorMarg = 0.5)
lc6 <- LCSS(pedestrian1, pedestrian6, pointSpacing = 2, pointDistance = 2, errorMarg = 0.5)
# Dataframe
lcss_df <- tibble(lc2, lc3, lc4, lc5, lc6) |>
pivot_longer(c(lc2:lc6)) |>
mutate(TrajID = c(2:6))
# visualize
p4 <- ggplot(lcss_df, aes(TrajID, value, group = TrajID)) +
geom_col(aes(fill = factor(TrajID))) +
labs(subtitle = "LCSS",
x = "Comparison trajectory") +
theme(legend.position = "none")
p4