Skip to main content
. 2023 May 18;23(10):4882. doi: 10.3390/s23104882
Algorithm 1 Tracking of pedestrian–object relation in a zone of control
Input: The trajectory sτ.z with the latest position 〈xτ,yτ〉 of a pedestrian agent i, the current relation pri,m with respect to the function object fom, the location and the zones of the object 〈ZC,ZN,ZF〉, and ω(·) is the intent classifier.
Output: The updated behavior class pri,mnew
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
i 〈xτ,yτ〉 ∉(ZmC∪ZmE):   # pedestrian left the ZOC of the object
 return None
if pri,m.phase== Unknown:
 pri,m.phase← passing-by
if pri,m.intent==user:
 if pri,m.phase== approaching and 〈xτ,yτ〉 ∈ ZmN:  # entered engaged locations
  pri,m.phase← engaged
 elif pri,m.phase== engaged and 〈xτ,yτ〉 ∉ ZmN:  # left engaged locations
  pri,m.phase← passing-by
 else:
  pri,m.intent ← ω(sτ.z)m     # changed intent
  pri,m.phase← passing-by
elif pri,m.intent==nonuser:
 pri,m.intent ← ω(sτ.z)m 
 if: pri,m.phase==user:
  pri,m.phase← approaching
return pri,m