Skip to main content

Pedestrian counting with grid-based binary sensors based on Monte Carlo method

Abstract

In this paper, we propose a method for estimating the number of pedestrians walking in opposite directions, as in cases of a shopping street or a sidewalk in a downtown area. The proposed method utilizes a compound-eye sensor that is constructed by placing two binary sensors for the pedestrians’ movement direction and multiple binary sensors for the vertical direction of the pedestrians’ movement direction. A number of Monte Carlo simulations about the movement of pedestrians are conducted, and the output history of the compound-eye sensor is obtained in each simulation. The simulation scenario with a small difference of the output history of the compound-eye sensor is selected to estimate the number of pedestrians. Evaluation results show that in the field whose width is 8 [m] the relative error in the proposed method is the smallest by using 2×8 binary sensors.

Introduction

In various fields such as marketing research, traffic control, and safety management, there is a demand for methods for estimating the number of pedestrians. For example, information on the temporal change in traffic volume of a footway can be used to determine the appropriate time for construction or maintenance (Leutzbach 1987). In addition, based on the number of pedestrians with information on their movement direction (i.e., the number of people entering and exiting) at the entrances of commercial facilities, event sites, or food courts, it is possible to prevent crowding. Although manual counting is often used for monitoring the number of pedestrians, it entails high labor cost and cannot be used in crowded environments. Therefore, automatic methods for estimating the number of pedestrians have attracted considerable attention (Dharmaraju et al. 2002; Bu et al. 2007; Greene-Roesel et al. 2008; Leykin and Hammoud 2006; Goubet et al. 2006; Hashimoto et al. 1998; Fod et al. 2002; Cui et al. 2007; Chen et al. 2008; Heeikkilä M and Pietikäinen 2006; Zhao and Wu 2008; Eshel and Moses 2008).

Most studies on the estimation of the number of pedestrians are conducted in the field of computer vision (Heeikkilä M and Pietikäinen 2006; Zhao and Wu 2008; Eshel and Moses 2008). By processing the video image obtained from a video camera, it is possible to estimate the movement characteristics of pedestrians, such as height, velocity, and pedestrian flow line, as well as the number of pedestrians. However, methods based on video processing require a strong resource base in terms of processing power, operating memory, storage, and electric power. In addition, the estimation accuracy of such methods is influenced by the brightness of the background.

On the other hand, a number of studies on pedestrian counting have used devices such as infrared imaging sensors (Leykin and Hammoud 2006; Goubet et al. 2006), passive infrared sensors (Hashimoto et al. 1998), laser sensors (Cui et al. 2007), ultrasonic sensors (Chen et al. 2008). In addition, there are commercial pedestrian counters using devices such as infrared imaging sensors (IRISYS people counter 2014), active infrared sensors (PCW-2BX03 directional people counter 2014), passive infrared sensors (Eco counter 2014), piezo films (Acoustic slab sensor 2014) and laser scanners (LOTraffic 2014). In particular, binary sensors, such as infrared sensors and piezo sensors, are among the simplest sensors, capable of detecting only the presence or absence of objects within the sensing region. Although binary sensors can neither detect the number of pedestrians nor identify individual pedestrians within the sensing region, they possess advantages such as low cost, simplicity, small size, and energy efficiency in comparison with other types of sensors. Therefore, methods for estimation of the number of pedestrians by using binary sensors have attracted attention. Since the capabilities of a single binary sensor are limited, as mentioned above, some researchers have considered using combinations of binary sensors for estimating the number of pedestrians together with their movement direction (Chen et al. 2008; Son et al. 2007; Lee 2009; Taniguchi and Nakano 2014). However, in these methods, the estimation accuracy significantly decreases in crowded environments where a large number of pedestrians move simultaneously.

In Fujii et al. (2013), we proposed a method for estimating the number of pedestrians and movement directions using a compound-eye sensor in environments where many pedestrians walk in opposite directions such as in a narrow corridors. The compound-eye sensor in this study is composed of ceiling-mounted passive binary sensors, such as pyroelectric infrared sensors (RE-210 2014), on a straight line. To estimate the number of pedestrians, we proposed a Monte Carlo-based method. The proposed method estimates the number of pedestrians based on the output history of the compound-eye sensor while the compound-eye sensor detects pedestrians and simulation results about the movement of virtual pedestrians. In Fujii et al. (2013), we showed that in crowed situations the proposed method is effective compared with an existing method. However, we assumed that the monitoring area is a narrow corridor where sensing region of a binary sensor covers width of a corridor. Since in wider streets, such as a shopping street, a sidewalk in a downtown area, the width of streets is more than 10 [m], the proposed method cannot be used in such monitoring areas.

In this paper, we propose a method for estimating the number of pedestrians in wider streets, such as a shopping street, a sidewalk in a downtown area, and so on. Figure 1 shows the system used for estimating the number of pedestrians in this paper. The compound-eye sensor in this paper is composed of mat-type binary sensors, such as piezo sensors (Measurement specialties Piezo Film Sensor 2014), on grid lines to deal with the pedestrian counting in wider streets. To estimate the number of pedestrians, we propose a Monte Carlo-based method similar to (Fujii et al. 2013). In the proposed method, a set of binary sensors that detect pedestrians locally is obtained from the output history of the compound-eye sensor. We call the set of binary sensors as a set of detecting binary sensors in this paper. Then, a number of simulations are conducted on the monitoring server for a set of detecting binary sensors. Finally, the monitoring server outputs the result in the most feasible simulation field with smaller difference between the output history of a set of detecting binary sensors and that of a set of virtual detecting binary sensors. We evaluate the relative error of the proposed method through simulation experiments by changing the specifications of binary sensor and the number of binary sensors.

Figure 1
figure 1

Pedestrian counting system.

The rest of this paper is organized as follows: the next section describes the pedestrian counting system and mobility model of pedestrians. The following section describes proposed pedestrian counting method in wide sidewalks and the next section describes simulation evaluations. The last section presents our conclusions and future works.

Pedestrian counting system and mobility model of pedestrians

This section describes the pedestrian counting system, binary sensor models, the compound-eye sensor model used in the system, and a pedestrian mobility model.

System overview

Figure 1 shows the pedestrian counting system, which consists of a monitoring server and sensor nodes. A sensor node consists of a wireless transceiver such as MICAz, IRIS Mote (IRIS Mote 2014) and Neo Mote (Neo Mote 2014) and multiple binary sensors, i.e. compound-eye sensor. A sensor node sends a data packet to the monitoring server when the output of its binary sensor changes. A data packet contains the sensor’s output value and a timestamp. The monitoring server uses the presence or absence of information from sensors for estimating the number of pedestrians walking in opposite directions. For simplicity, we assume that the system has a single sensor node, that data packets are reliably sent to the monitoring server, and that transmission latency is negligible.

In this section, the system is used for wide streets where a large number of pedestrians walk in two directions, such as in a local shopping street and a sidewalk in a downtown area. As the compound-eye sensor, we use mat-type binary sensors, such as piezo sensors (Measurement specialties Piezo Film Sensor 2014), on grid lines.

Binary sensor model

We assume a rectangular sensing region as shown in Figure 2. We refer to the distance of one side of the sensing region as the “sensing length.” We denote the sensing length for the pedestrians’ movement direction as r x and the sensing length for the vertical direction of the pedestrians’ movement direction as r y . A binary sensor outputs a value of 1 when a foot of pedestrian steps on its sensing region and 0 when a foot of pedestrian steps away from its sensing region.

Figure 2
figure 2

Sensing model of a binary sensor.

Compound-eye sensor model

The compound-eye sensor consists of multiple binary sensors bx,y (1≤x≤2,1≤yN) which are on grid lines by placing two binary sensors along the pedestrians’ movement direction, and N binary sensors along the vertical direction of the pedestrians’ movement direction as shown in Figure 3.

Figure 3
figure 3

Deployment of the compound-eye sensor.

The region that is inside of sensing region of any binary sensor is denoted as the sensing region of the compound-eye sensor. The output of sensor bx,y at time t is denoted as ox,y,t{0,1}. Furthermore, the output of the compound-eye sensor at time t is denoted as

O t = o 1 , 1 , t o 2 , 1 , t o 1 , 2 , t o 2 , 2 , t o 1 , N , t o 2 , N , t .

When all outputs of binary sensors are 0, the number of pedestrians in the sensing region of the compound-eye sensor can be estimated as zero. We refer to this as an observable state. For other outputs the number of pedestrians cannot be determined, and this is referred to as an unobservable state. The interval from the moment when the state of the compound-eye sensor undergoes transition from an observable state to an unobservable state to the moment when the state undergoes transition to an observable state again is denoted as the unobservable interval.

Mobility model of pedestrians

We need to decide location where a foot of a pedestrian steps, timing when a foot of a pedestrian steps on or steps away from ground since mat-type binary sensors are assumed. Therefore, we need a mobility model of pedestrians.

We first define the direction of moving from binary sensor b1,y toward binary sensor b2,y as right, and the opposite direction as left. We assume that pedestrians move either left (“leftward” pedestrians) or right (“rightward”) within the monitoring area, and they do not change their movement direction or velocity. The velocity distribution of pedestrians v is a normal distribution with mean v m and deviation v σ .

The step length of pedestrians s l follows a normal distribution with average sl,m and deviation sl,σ. The step width s w , the foot length f l , and the foot width f w of pedestrians are constant values since their variations are negligible compared to the variation of velocity of pedestrians v and that of step length of pedestrians s l . Figure 4 shows the step length, the step width, the foot length, and the foot width of pedestrians.

Figure 4
figure 4

Step length, step width, foot length, and foot width of pedestrians.

Next, we explain the timing of stepping on and stepping away from the ground. According to (Akutsu 1975), when we focus on one leg of pedestrian, the walking motion is classified four states as shown in Figure 5. For example, a pedestrian’s right leg steps away from the ground in the state 1, moves in the air in the state 2, steps on the ground in the state 3, and supports stepping away of a left leg in the state 4. In this paper, based on the walking motion model, the timing of stepping on and stepping away from the ground is defined as follows. The position of a pedestrian is defined as a position of groin. A back leg steps away from the ground when the position of a pedestrian reaches to the distance of the step length from the position of the back leg. An anterior leg steps on the ground when the position of the pedestrian reaches to half distance of the step length from the position of the back leg.

Figure 5
figure 5

Four states of walking motion and the timing of stepping on and stepping away from the ground of the foot of pedestrians (Akutsu 1975).

Pedestrian counting method

This section describes the proposed pedestrian counting method based on Monte Carlo method for estimating the number of pedestrians in wide sidewalks. The proposed method consists of two sub-methods, one for determining a set of binary sensors that detects pedestrians, and one for estimating the number of pedestrians in the set of binary sensors by conducting Monte Carlo simulations.

Overview

A part of adjacent binary sensors in the compound-eye sensor detect pedestrians when the compound-eye sensor is in an unobservable interval since the compound-eye sensor consists of multiple binary sensors on grid lines. In this paper, the adjacent binary sensors that detect pedestrians are referred to as detecting binary sensors.

The proposed method first determines a set of detecting binary sensors by memorizing binary sensors that detect pedestrians during the compound-eye sensor is in an unobservable interval. Secondly, the proposed method estimates the number of pedestrians by conducting a number of Monte Carlo simulations. In particular, the monitoring server generates a simulation field with a set of virtual detecting binary sensors, randomly generates virtual pedestrians, moves them in the simulation field, and updates the output history of a set of virtual detecting binary sensors. Simulations are continued until a fixed number of simulation results are obtained which have a smaller difference between the output history of a set of detecting binary sensors and that of a set of virtual detecting binary sensors. Finally, the proposed method outputs the number of pedestrians by selecting the most feasible simulation result. In the following sections, we explain a sub-method for determining a set of detecting binary sensors, and describes a sub-method for estimating the number of pedestrians with a set of detecting binary sensors.

Determining a set of detecting binary sensors

First, we explain the process for determining a set of detecting binary sensors. An example for determining a set of detecting binary senors is shown in Figure 6. In the proposed method, a flag is maintained for each binary sensor to maintain whether a binary sensor detected pedestrians or not. The flag is referred to as a detecting flag. The output of a binary sensor indicates whether pedestrians are in the sensing region of its binary sensor or not. On the other hand, the detecting flag of a binary sensor indicates whether pedestrians were in the sensing region of its binary sensor before or not. A detecting flag of each binary sensor is initially set to 0. When a binary sensor detects pedestrians, the detecting flag of the binary sensor is set to 1.

Figure 6
figure 6

Example of a set of detecting binary sensors.

When output of a rightmost or leftmost binary sensor of the compound-eye sensor changes from 1 to 0, all pedestrians may exit the sensing region of a set of detecting binary sensors. Therefore, the proposed method checks whether a set of detecting binary sensors is determined or not as follows.

  1. 1.

    When the output of a right (left) binary sensor b 1,y (b 2,y) (1≤yN) of the compound-eye sensor changes from 1 to 0, a temporal set of detecting binary sensors k , tmp is initialized as k , tmp ={ b 1 , y , b 2 , y }. After that, as long as there is adjacent binary sensor b x′,y whose detecting flag is 1, the temporal set of detecting binary sensors k , tmp is updated as k , tmp k , tmp { b 1 , y , b 2 , y }.

  2. 2.

    If all outputs of binary sensors in the temporal set of detecting binary sensors k , tmp are 0, that is, if there is no pedestrian in the sensing region of k , tmp , the temporal set of detecting binary sensors k , tmp is considered as a set of detecting binary sensors k . After that, all detecting flags of binary sensors in the set of detecting binary sensors k are set to 0. Otherwise, the temporal set of detecting binary sensors k , tmp is deleted.

Pedestrian counting in a set of detecting binary sensors

Next, we explain the process for estimating the number of pedestrians in a set of detecting binary sensors k in an unobservable interval. The proposed method maintains a table to memorize a fixed number of simulation results (hereinafter, simulation results table) whose size is X. The simulation results table maintains the difference of the output history Δk,j, the number of virtual rightward pedestrians n k , j l , and the number of virtual leftward pedestrians n k , j r in simulation results sk,j (1≤jX). The difference of the output history Δ k , j max in the simulation results table is initialized to a large value.

Now, a set of detecting binary sensors k is assumed to be composed of 2×n binary sensors (1≤nN). The time when the first pedestrian enters into the sensing region of the set of detecting binary sensors k is denoted as t0. Outputs of binary sensors in the set of detecting binary sensors k is assumed to change L times in the unobservable interval of the set of detecting binary sensors k . The time when the output of the set of detecting binary sensors k changes i-th times (0≤iL) is denoted as t i . The output of the set of detecting binary sensors k at time t i is denoted as

Ô k , t i = o 1 , 1 , t i o 2 , 1 , t i o 1 , 2 , t i o 2 , 2 , t i o 1 , n , t i o 2 , n , t i .

The output history of the set of detecting binary sensors k is denoted as O k = Ô k , t 0 , Ô k , t 1 , , Ô k , t L .

Figure 7 shows the flowchart of the sub-method for estimating the number of pedestrians in a set of detecting binary sensors. The sub-method acts as follows:

  1. 1.

    When the set of detecting binary sensors k is determined, the monitoring server begins estimating the number of pedestrians for the set of detecting binary sensors k . The monitoring server first generates a simulation field which has a set of virtual detecting binary sensors k composed of 2×n virtual binary sensors. Then, in the interval t L -t 0, the monitoring server generates virtual pedestrians and moves them based on statistical information on pedestrians such as arrival rate, velocity, step length, and so on. These information are assumed to be obtained preliminary by measuring in the monitoring field. For a simulation field, the monitoring server maintains the number of virtual rightward and leftward pedestrians entered into the sensing region of the set of detecting binary sensors. It also maintains the output history O k of the set of virtual detecting binary sensors. The time when the first pedestrian enters into the sensing region of the set of virtual detecting binary sensors k is denoted as t 0′=t 0. Outputs of binary sensors in the set of virtual detecting binary sensors k is assumed to change L times until the time t L . The time when the output of the set of virtual detecting binary sensors k changes i -th times (0≤i L ) is denoted as t i ′. The output of the virtual binary sensor b x,y′ at time t i ′ is denoted as o x , y , t i and the output of the set of virtual detecting binary sensors k at time t i ′ is denoted as Ô k , t i . The output history of the set of virtual detecting binary sensors k in the simulation field is denoted as O k = Ô k , t 0 , Ô k , t 1 , , Ô k , t L .

  2. 2.

    The monitoring server calculates the difference Δ O k , O k between the output history of the set of detecting binary sensors O k and that of the set of virtual detecting binary sensors O k in the simulation field as follows:

    Δ O k , O k = i = 0 L + L - 1 T i + 1 - T i δ T i ,
    (1)

    where δ(T i ) is next equation:

    δ T i = y = 1 n o 1 , y , T i - o 1 , y , T i + o 2 , y , T i - o 2 , y , T i .
    (2)

    T i is the i-th time (0≤iL+L-1) of a union set of times {t0,t1,…,t L }{t 0′,t 1′,…,t L′} in order of time. Equation (2) indicates the sum of the Hamming distance between the output of the binary sensor bx,y and that of the corresponding virtual binary sensors b x,y′ for all binary sensors in the set of detecting binary sensors k at time T i . Equation (1) indicates the sum of the value of output time weighting of Equation (2). When the difference of the output history Δ O k , O k is smaller than the biggest difference of the output history Δ k , j max in the simulation results table, the j m a x -th entry in the simulation results table is replaced to the new entry: the difference of the output history Δ O k , O k , the number of virtual rightward pedestrians n k r , and the number of virtual leftward pedestrians n k l .

  3. 3.

    If the simulation results table is not updated consecutively A times, the sub-method moves to step 4. Otherwise it moves to step 1. We refer to A as the simulation termination threshold.

  4. 4.

    The monitoring server calculates the median value of the difference Δ k,m i d from the simulation results table. Then, it selects a set of feasible simulation results S k as follows:

    S k = { s k , j | Δ k , j < Δ k , mid , 1 j X } .
    (3)

    Next, the monitoring server selects the most feasible simulation results sk,f with the median value in terms of the total number of virtual pedestrians n k , f l + n k , f r from a set of feasible simulation results S k . After that, the monitoring server chooses n k , f r as the estimated number of rightward pedestrians n ̂ k r and n k , f l as the estimated number of leftward pedestrians n ̂ k l .

Figure 7
figure 7

Flowchart of the sub-method for estimating the number of pedestrians using a set of detecting binary sensors.

Performance evaluation

This section evaluates the accuracy of the proposed method through simulation experiments.

Simulation settings

We evaluate the proposed method through simulations. To evaluate the basic characteristics of the proposed method, we set the mean and deviation of the velocity of pedestrians v m , v σ , the mean and deviation of the step length of pedestrians sl,m, sl,σ according to Akutsu (1975). We assume that the monitoring server knows the step width of pedestrians s w =12 [cm], the foot length f l =25 [cm], and the foot width f w =10 [cm], respectively (Akutsu 1975). We also assume that the width of fields is 8 [m], the leftward pedestrian arrival rate and the rightward pedestrian arrival rate are the same, in other words, λ l =λ r =λ. Leftward (rightward) pedestrians arrive from the right (left) side of the monitoring area by a Poisson process with an arrival rate λ.

To evaluate the estimation accuracy of the proposed method, we use relative error e as an evaluation index:

e = n ̂ l - n l + n ̂ r - n r n l + n r
(4)

Here, a smaller relative error indicates higher estimation accuracy.

Basic characteristics

We first evaluate the basic characteristics of the proposed method by changing the size of the simulation results table X and the simulation termination threshold A. In this evaluation, we use an unobservable interval of a set of detecting binary sensors as one evaluation interval since we want to evaluate the relative error and the average number of simulation trials of each set of detecting binary sensors. We assume that the monitoring server knows the arrival rate of pedestrians λ. Table 1 shows other parameters of the first performance evaluation.

Figures 8 and 9 show the relative error and the average number of simulation trials with a 95% confidence interval as a function of the size of the simulation results table and the simulation termination threshold over 2000 evaluations.

As shown in Figure 8, the relative error decreases when the size of simulation results table increases from 2 to 5. However, the relative error does not decrease when the size of simulation results table increases from 5. In addition, the relative error slightly decreases when the simulation termination threshold increases. As shown in Figure 9, the number of simulation trials increases considerably when the size of simulation results table and the simulation termination threshold increases. In particular, it is noticeable when the size of simulation results table is large. Therefore, the relative error decreases when the number of simulation trials increases, however, the relative error does not decrease any more even if several tens of thousands of simulations are tried. This is because simulation results that have smaller difference of the output history are obtained within ten thousand simulation trials. Hence, in what follows, the size of simulation results table is set to 5 and the simulation termination threshold is set to 1000 since the number of simulation trials is small and the relative error is also small.

Table 1 Parameters of the performance evaluation as a function of the size of the simulation results table and simulation termination threshold
Figure 8
figure 8

Relative error as a function of the simulation termination threshold.

Figure 9
figure 9

Average number of simulation trials as a function of the simulation termination threshold.

We next evaluate the basic characteristics of the proposed method by changing the sensing length r x and the arrival rate of pedestrians λ. In what follows, we use an unobservable interval of the compound-eye sensor as one evaluation interval. Table 2 shows other parameters of the second performance evaluation. Figure 10 shows the relative error with a 95% confidence interval as a function of the sensing length over 1000 evaluations.

As shown in Figure 10, the relative error increases when the arrival rate becomes large because the unobservable interval increases with arrival rate. In addition, when the sensing length becomes large, the relative error transiently decreases and then increases. When the sensing length is small, the relative error increases because the sensing length decreases in size compare to the step length. In this case, a leftward (rightward) pedestrian has a potential not to step on the sensing region of right (left) binary sensor and to step on the sensing region of left (right) binary sensor, so the relative error increases. When the sensing length is large, the sensing region becomes large and the number of pedestrians increases in an unobservable interval, thus, the relative error increases.

Table 2 Parameters of the performance evaluation as a function of the sensing length and the arrival rate of pedestrians
Figure 10
figure 10

Relative error as a function of the sensing length.

Accuracy as a function of the number of binary sensors

We finally evaluate the characteristics of the proposed method by changing the number of binary sensors N. Table 3 shows other parameters of the performance evaluation. Figure 11 shows the relative error with a 95% confidence interval as a function of the number of binary sensors over 1000 evaluations.

Table 3 Parameters of the performance evaluation as a function of the number of binary sensors
Figure 11
figure 11

Relative error as a function of the number of binary sensors.

As shown in Figure 11, when the number of binary sensors increases, the relative error transiently decreases and then increases. When the number of binary sensors increases and multiple pedestrians enter into the sensing region of the compound-eye sensor, multiple sets of detecting binary sensors are more likely to detect pedestrians apart. Therefore, the number of pedestrians decreases in each set of detecting binary sensors and the relative error for the number of estimated pedestrians in the compound-eye sensor decreases. However, the relative error increases when the number of binary sensors increases too many. This is because the sensing length r y becomes smaller with increasing the number of binary sensors. When the sensing length becomes small, a pedestrian is more likely to step on multiple binary sensors and the output history of the compound-eye sensor becomes complex, so the relative error increases.

Conclusions and future works

In this paper, we proposed a Monte Carlo-based method for estimating the number of pedestrians moving in opposite directions using binary sensors in wide streets. Simulation results show that the relative error is the smallest by using 2×8 binary sensors when a width of fields is 8 [m].

In future works, we plan to evaluate the performance of the proposed method in real environments through implementation and experiments. We also plan to extend the proposed method to handle multiple movement directions.

References

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shuto Fujii.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

SF, YT, GH and MM proposed the algorithm. SF developed simulation programs and conducted evaluations. SF and YT drafted the manuscripts. All authors read and approved the final manuscript.

Authors’ original submitted files for images

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0), which permits use, duplication, adaptation, distribution, and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Fujii, S., Taniguchi, Y., Hasegawa, G. et al. Pedestrian counting with grid-based binary sensors based on Monte Carlo method. SpringerPlus 3, 299 (2014). https://doi.org/10.1186/2193-1801-3-299

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/2193-1801-3-299

Keywords