Skip to main content
. 2022 May 17;22(10):3798. doi: 10.3390/s22103798
Algorithm 2 Group detection
Input: A dataset N with skeleton joints in the form (x,y) per timestamp
   an integer stops_expected with the number of assigned stops
   an integer groups_expected representing the number of assigned group locations
Output: A dataset class_group with group membership, and stop locations
body_identification=spatemp_stop_kmeans(N, stops_expected)
forbi in body_indentification:
   trajectory_stops = spatemp_stop(bi, t,r)
shared_stops=intersection_stops(trajectory_stops)
class_group=spatemp_stop_kmeans_time(shared_stops, groups_expected)
return class_group