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.
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.
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.
6. Operation Principle
6.1 The principle of counting people
6.1.1 Overview
6.1.2 Algorithm description