Skip to main content
. 2024 Jan 8;24(2):367. doi: 10.3390/s24020367
Algorithm 2: Multiple Particle Filter Algorithm
1: Input: (Mτ) containing matched vision attributes (Vτ): customer track ID (VτT_ID), bounding box coordinates (Vτbbox), Keypoint 9 coordinates (VτK9), Keypoint 10 coordinates (VτK10)
2: Output: Bounding box particles (Pbbox), Keypoint 9 particles (PK9), Keypoint 10 particles (PK10) of each track ID (VτT_ID)
3: For len(Mτ) iterations, follow the following procedure:
4:     Extract the vision attributes inside Mτ
5:     If Vτ1then
6:         Initialize random particles P with coordinates (Px, Py) based on the initial coordinates of Vτ1
7:         Compute the distance between the landmark and initial coordinates Vτ1
8:         Move the particles diagonally by adding a diagonal distance to the particles
9:         Calculate for the weights of each particle
10:         Apply systemic resampling
11:         Store particles (P) to global particles repository
12:     Otherwise
13:             Extract global particles (P) containing current Pbbox, PK9, PK10
14:             Compute the distance between the landmark and the current coordinates Vτn
15:             Move the particles diagonally by adding a diagonal distance to the particles
16:             Calculate the weights of each particle
17:             Apply systemic resampling
18:             Store particles (P) to global particles repository
19: End
20: Collect final particles (P) containing final Pbbox, PK9, PK10