UM2600
User manual
Counting people with the VL53L1X long-distance ranging Time-of-Flight sensor
This user manual explains how to use a VL53L1X long-distance ranging Time-of-Flight (ToF) sensor to count people crossing a specific predefined area, like a meeting room entrance or a particular location in a corridor. It also describes an algorithm used to count the people. The algorithm is provided as an example and can be downloaded from st.com, in the VL53L1X embedded SW section, under the reference STSW-IMG010.
In addition, this document presents the details of a counting application where a sensor is set on the top, not the side, of the area to be tracked.
UM2600 - Rev 2 - December 2020 |
www.st.com |
For further information contact your local STMicroelectronics sales office. |
|
|
|
UM2600
1Acronyms and abbreviations
Table 1. Acronyms and abbreviations
Acronym/abbreviation |
Definition |
|
|
FoV |
field of view |
|
|
SPAD |
single photon avalanche diode |
|
|
SW |
software |
|
|
ToF |
Time-of-Flight |
|
|
UM2600 - Rev 2 |
page 2/15 |
|
|
UM2600
2Overview
Counting people with the VL53L1X consists of using the multiple zones of the sensor receiving SPAD area, and of configuring it with two distinct fields of view (FoV), to alternatively get a ranging distance from them
and consequently recognize the movements of a person. Using this method, the number of people occupying a meeting room, accessible from a reasonably narrow access, is known at all times by detecting the entrances and exits of the attendees.
By measuring and analyzing the distances of targets within the FoVs of a front and back zone (see figure below and Figure 3. Front and back zones), a simple algorithm can detect the direction a person crosses the area under the two FoVs. This algorithm "understands" that someone is under one of the FoV as long as the distance measured by the sensor under this FoV is between 0 and a threshold value specified in mm.
Figure 1. VL53L1X FoV divided in two subfields of view
From a timing perspective, the sensor alternatively ranges on each of the two zones, for a very short period of time in milliseconds. It is possible to determine in which direction a person crosses the area, depending in which order this person has been detected in the two zones, as shown in the figure below.
Figure 2. Person counting chronogram
UM2600 - Rev 2 |
page 3/15 |
|
|
UM2600
3Algorithm description
The counting algorithm example relies on a list of states that have to occur in a certain order to detect if a person has crossed the specified area and in which direction this area has been crossed. These states are stored in a list and compared to two default lists of states that represent how the area is crossed in two different directions. When no-one is seen in either of the two zones, the list of states is reset.
If we consider that a person detected in the front zone equals 2, and a person detected in the back zone equals 1, the algorithm adds the value of the two states and stores the result as soon as it changes.
Eventually, if the consecutive states in the list are 0, 1, 3, 2, 0 or 0, 2, 3, 1, 0 this means a person has been detected in one direction or the other, as described in Figure 4. List of status values.
Figure 3. Front and back zones
Figure 4. List of status values
UM2600 - Rev 2 |
page 4/15 |
|
|
UM2600
4Hysteresis
The algorithm validates a crossing event only when a person has fully crossed the two zones. It does not validate the event when the person remains for a long time under the FoV or when the person decides to return from the place he came from.
This is illustrated in the figure below: the algorithm stops and the list of states is reset as soon as no-one is detected in any of the two FoVs.
Figure 5. Hysteresis principle
UM2600 - Rev 2 |
page 5/15 |
|
|