Skip to main content
. 2022 Jun 25;22(13):4807. doi: 10.3390/s22134807
Algorithm 1:Nij calculation algorithm in 3D space.
1: Initialize pedestrian detection results, target detection boxes and confidence level.
2: Create a List Ltargets of every unit, a centroid variable C and a pedestrian count variable Ncount.
3: While (imin < i < imax && jmin < j < jmax) do
4:   If (target detection boxes) then
5:     Ltargets = Ltargets + 1
6:   for each Ltargets do
7:     If (C is under the range of the corner coordinates of Ltargets) then
8:       Ncount =Ncount + 1
9:     end if
10:   end for
11:   Nij =Ncount
12: End while
13: Return Nij