3 Algorithm 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
Algorithm description
UM2600 - Rev 2
page 4/15