Skip to main content
. 2022 Feb 23;22(5):1754. doi: 10.3390/s22051754
Algorithm 1 Pedestrian traffic light triggering algorithm
  • procedureTraffic light control

  •     initiate gtrack()

  •     create tb_targets

  •     repeat                      ▹Forever

  •         set timestamp to current time

  •         get detected_targets from gtrack()

  •         for all detected_targetsdo:             ▹A

  •            if target isnotintb_targets then:

  •                save target and timestamp to tb_targets

  •         for all targets in tb_targetsdo:            ▹B

  •            if target isnotindetected_targets then:

  •                remove target from tb_targets

  •            else:

  •                if target is in observable area longer than threshold time t10 s then:

  •                    change traffic signalization

  •     until shutdown