Monitoring the Number of Pedestrians in an Area The Applicability of Counting Systems for Density State Estimation

Crowd monitoring systems are more and more used to support crowd management organizations. Currently, counting systems are often used to provide quantitative insights into the pedestrian traffic state, since they are fairly easy to install and the accuracy is reasonably good under normal conditions. However, there are no sensor systems that are 100% accurate. Detection errors might have severe consequences for the density state estimation at large squares. The consequences of these errors for pedestrian state estimation have not yet been determined. This paper studies the impact of one specific type of detection error on the functionality of counting camera systems for density state estimation, namely, a randomly occurring “false negative” detection error. The impact is determined via two tracks, a theoretical track and a simulation track. The latter track studies the distribution of the cumulative number of pedestrians after 24 hours for three stylized cases by means of Monte Carlo simulations. This paper finds that counting camera systems, which have a detection error that is not correlated with the flow rate, provide a reasonably good estimation of the density within an area. At the same time, if the detection error is correlated with the flow rate, counting camera systems should only be used in the situation where symmetric demand patterns are expected.


Introduction
Large-scale events are organized frequently. Worldwide, a sense of community and the urge for joint entertainment draws people together during sports, music, and religious events. All these types of events have in common the fact that large crowds move through pedestrian infrastructures that are not specifically designed to handle large crowds. As a result of overcrowding, accidents still occur, for example, during the Love Parade [1,2], a Brazil Discotheque party [3], and the Hajj [4].
All over the world crowd management organizations are trying to keep events free from accidents. Safety and security officials generally rely on sight and video surveillance to manage the crowds' movements during large-scale events. Due to the large amount of information that these officials have to sift through, their reliance on video surveillance often results in a lack of oversight, a subjective estimation of the traffic state, and an inefficient allocation of resources.
More and more, crowd monitoring systems are introduced to support the crowd management organization sensor systems in combination with real-time state estimation which can help identify when the infrastructure is reaching its capacity and when action has to be taken to alleviate the pending conditions. Many distinct crowd monitoring alternatives have been presented over the last two years. During SAIL 2015, Kingsday 2016, and the Europride 2016 in Amsterdam a combination of counting systems and Wi-Fi sensors (and GPS trackers during SAIL) was used to determine the traffic state [5,6]. Next to that, [7,8] used Wi-Fi sensors and camera feeds to determine the movement behaviour in transport hubs. During the 4Daagse and the Hajj, RFID-chips are used to track the progress of aggregated groups of individuals [9,10]. Besides that, social media (Twitter, Instagram) [11] and mobile phone signals [12] are scoured for the location of visitors to large-scale events.
Currently, counting camera systems are used to provide quantitative insights into the flows in an area, since they are fairly easy to install and the accuracy is reasonably good under "normal" traffic conditions. In some cases, similar systems are used to determine the density in an area. To the authors knowledge, there are no counting systems that are 100% accurate. While this does pose minor problems to determine the current flow rate in corridors, these counting errors might have severe consequences for the density estimation in areas because these minor errors add up over time. Yet, how severe these consequences are has not yet been determined. Contemporary implementations of the sensor networks, like the one described above, have been piloted during the Europride in Amsterdam, The Netherlands. During the weekend of 23-24 June 2016 the entrances of a square were monitored by 12 distinct counting cameras. The cumulative curves of the different days ( Figure 11) illustrate that the result of a minor detection error can lead to an extensive estimation error at the end of the day. However, before we can design a solution to this problem, we first need to understand the type of detection error that these cameras make and the extent to which the error impacts the density state estimation.
Given that there is very limited information on the mathematical shape of the detection errors of counting camera systems, this research will study one error type and assume the mathematical shape of this detection error based on the experience of the authors. In the following paper the impact is determined by a randomly occurring "false negative" detection error on the quality of the density state estimation of counting systems during large-scale pedestrian events. This paper focuses on density state estimation since this property of the crowd is often used by crowd managers to gauge the safety of the visitors. The impact is determined via two approaches, a theoretical approach and a simulation approach. While the first approach provides insights into the general influence of detection errors on the density state estimation, the second approach provides insights into the extent of this impact for several stylized situations that often occur during large-scale events. Section 2 will elaborate on the theoretical framework that is used to determine the generic influence of detection errors.
Moreover, the mathematical properties of the influence of the detection errors are discussed. Section 4 discusses the results of three stylized cases in which the dynamics of the system become more and more complex. Beforehand, the particulars of the stylized cases are introduced in Section 3. The last section (Section 5) discusses the results of the cases and draws some general conclusions regarding the influence of a randomly occurring "false negative" detection error on density state estimation.

The Expected Quality Reduction Based on Theory
This section studies the impact of a detection error on the density state estimation by means of a theoretical framework. Section 2.1 presents the mathematical description of the system. Sections 2.2 and 2.3 describe the impact of the detection error on the mean and standard deviation of the variance of the density.

Theoretical Framework.
For traffic state estimation, any part of a pedestrian infrastructure can be simplified as a closed area with a collection of entrances where pedestrians can enter and/or exit the area ( Figure 1). The flow at these entrances has a direction , that is, in and out. Furthermore, these flows change size dynamically and are thus depending on time . Moreover, the sizes of in-and outflows of the area are also dependent on the entrance . As such, the flow is represented as , ( ). In this theoretical framework, the use of multiple cameras with dissimilar detection errors to detect the flow at one entrance has not been accounted for. The characteristics of the problem above are similar to the classical traffic management problems of queue length estimation upstream of traffic signals and density estimation on highway links, which traffic engineers have been studying for quite some years (e.g., [13][14][15][16][17][18][19]). Many distinct types of filters, such as Kalman Filters, Particle filters, and Hidden Markov Models, have been proposed to improve the estimation of the number of vehicles in a queue and/or on a link in the highway network. These filters make use of three properties of vehicular traffic flows, being (A) flow conservation, (B) directionality of traffic, and (C) travel time optimization. Here, the first property, that is, flow conservation, assumes that all vehicles that enter a link will exit the link. The second property, that is, directionality, assumes that traffic that enters a link at one end will at some point exit the other end of the area. The third property, that is, the optimization of travel times, describes the process in which vehicles will try to optimize their travel time at all moments in time and will not randomly stop or drive slower than allowed and/or practically possible.
Yet, the situation at hand is more complex, since the three properties, which describe the orderly flow of vehicular traffic in networks, do not necessarily hold for pedestrian traffic flows in pedestrian infrastructures. That is, shops, stores, and houses act as dynamic sources and sinks on the link, directionality cannot be assumed on any link, travel times are not necessarily dependent on the density of the traffic flow, and, most importantly, pedestrians can move from each source to each sink of a link without restrictions. So, even though the queue estimation problem has been under consideration for quite some time and sophisticated filtering techniques to improve the state estimation in vehicular networks have been developed, it is, due to the differences in the behaviour between pedestrian and vehicular traffic flows, not trivial to apply the developed methods and theories to the specific case of traffic flow estimation in pedestrian infrastructure.
This paper studies the influence of a randomly occurring "false negative" detection error on density state estimation in order to provide insights into the nature of the issues that future pedestrian state estimation algorithms will need to solve. In general, the aim of a state estimation algorithm is to determine the state of the traffic flow by means of any of the three macroscopic flow characteristics, velocity V, density , and flow . As mentioned before, in the management of pedestrian traffic flows the density is predominantly used as state estimator, since this macroscopic flow characteristics can most directly be related to the safety of the visitors through the level of service of [20]. In general the following computation is used to determine the density ( ) of link based on a camera counting system, which detects pedestrians when they enter and exit the link: where * ( ) represents the aggregated flow at all entrances, * , , ( ) the flow measured at entrance in direction , the time at which the flow as measured, and the walkable area. Here, flows into the area are assumed to be positive and flows out of the area negative. In the remainder of this paper, the dynamics of one area will be studied; as such * , , ( ) is simplified to * , ( ). Here, it is important to note that * , ( ) is an approximation of the flow at one of the entrances, because the reported flow at any entrance at any point in time includes detection errors. A quantification of the effect of the detection error on the density results can be determined if one realizes that * ( ) represents a distribution of density realizations (see (2)-(3)) that can be described by its statistical properties. In this study the effect of the detection error on both the mean and the variance of the distribution of density state estimation at the end of the day is studied. * where , ( ) = ( , ( ) , detect ) .
This process, in which there is a given chance of notmissing a number of pedestrians , can be approximated by means of a binomial distribution ( , ( ), detect ); see equation (3). In this process the number of trials represents the total flow at location with directionality and the chance of success ( detect ) represents the chance that a single pedestrian is detected by the counting camera at time . The output of a counting camera is the number of pedestrians that crossed a certain cross-section in one minute.
In order to compute this flow, counting camera systems make use of intricate detection and tracking algorithms. In recent years a multitude of approaches to automated pedestrian detection and tracking have been presented. The detection approaches vary widely from detection using global models [21][22][23] to detection based on more local features and/or parts of pedestrians [24][25][26]. More and more, machine learning strategies are used to improve the detection of pedestrians under a multitude of conditions (e.g., [27,28]). Also a multitude of tracking algorithms have been presented, some of which use intermediate models to predict the future movement of pedestrians (e.g., [29]), while others use the information of the image to determine the motion between images (e.g., [30,31]).
No detection and/or tracking algorithm is flawless. Pedestrians can be missed by the counting camera system for numerous reasons. The reasons are, amongst others, changing light conditions and abrupt changes in speed and direction of a pedestrian or because pedestrians are occluded by other pedestrians. Depending on the applied detection and tracking algorithms and the situation on-site, one or more types of errors are prone to occur. As a result of the abovementioned issues, a lack of detection of pedestrians ("false negatives") and double registrations of pedestrians ("false positives") can arise. Depending on the situation, these types of errors can be uncorrelated or correlated in time and space.
A comprehensive study on the effect of distinct error types is out of the scope of this paper. Given the complexity of an analysis of the impact with a large number of degrees of freedom, the authors feel that an in-depth study regarding one type of detection error will provide better insights in the applicability of counting camera systems when this specific type of detection error is encountered. In the remainder of this paper only the effect of one certain specific error type will be studied, namely, that of a randomly occurring "false negative" error. Examples of this type of detection error are the occlusion of a child behind its parents or the lack of contrast between the colour of the pedestrian's clothes and the background. A "false negative" detection error always results in a lower amount of registered detection than the pedestrians that passed the counting camera and each pedestrian has the same chance to not be detected given a certain flow rate.
The effect of detection errors on the density estimation in an area can be determined if one knows what the chance is that a pedestrian is detected. There is limited knowledge on the average detection errors of counting cameras. Moreover, the details on the relation of the detection error and the flow rate are currently lacking. Therefore, some assumptions on the mathematical properties of the detection errors are assumed, namely, that the detection errors are random, independent, and not spatially and temporally correlated. Even though many detection errors might not adhere to these assumptions, preliminary insights into the impacts that can be expected under these relatively "nice" conditions are  deemed to be valuable to practitioners, especially given the fact that more complex types of detection errors will only deteriorate the density estimation results.
Logically speaking, three distinct situations can be defined for a randomly occurring "false negative" detection error with these mathematical properties, namely, (1) The detection error is not correlated with the flow.
(2) The detection error is correlated with the total flow at each entrance.
(3) The detection error is correlated with the total flow and the direction of flow. Figure 2 illustrates a few possible shapes of the function of the detection probability detect in situations 2 and 3 (i.e., detection error correlated with flow). This function defines the relation between the flow rate at a cross-section and the probability of detection of each individual that is part of that flow. As one can see, any detection probability function is limited by two boundaries, namely, (1) at detect = 1.0 the detection is completely accurate and (2) at the capacity of the entrance ( = capacity in P/s) as no more pedestrians can move through an entrance within a time instance. Besides that, the function can be concave (1), linear (2a) or nonlinear (2b). In this paper, a linear shape of the probability function is assumed. Even though a nonlinear function might be more realistic in this respect, the linear approximation, which has computational advantages, will still illustrate the main implications of a concave relation. As such, the shapes of the detection error are approximated by detect ( ) = 1 − * ( ) in case 2 and detect ( ) = 1 − , * ( ) in case 3, where the realizations of detect are dependent on area and entrance . Moreover, the detection error is assumed to be correlated with the total absolute flow rate at each entrance ( ), which represents the total number of pedestrians who passed a cross-section (i.e., ∑ , ( )). In the remainder of this section the effect of detection errors as a result of case 3 is determined, since this formulation can easily be simplified to the other two cases.

Impact of Detection Errors on the Mean Density.
In the paragraphs above a mathematical description was presented. In the following section the mathematical description is used to determine the mean of the maximum impact of the accumulation of this type of detection error, namely, the impact of the cumulative detection error at the end of a day of counting. This total error is computed step by step, in which the level of aggregation increases over the number of entrances and over time. The mean number of counted individuals for one location is given by (4), for a set of detectors, and a certain point in time is given by (5) and for an entire day it is given by (6).
The derivation illustrates that the expected amount of detected individuals during the day depends quadratically on the flow rate at each corridor. As a result, the mean error in the cumulative sum of the amount of pedestrians in an area, and as such the density, increases very quickly at the moments that large numbers of pedestrians enter and/or exit the area simultaneously. Additionally, the mean of the estimation of the cumulative number of pedestrians can be more or less than zero. The sign of the cumulative number of pedestrians depends on the exact realizations of the flows and the detection errors , . Consequentially, without knowing the dynamics that will occur in a pedestrian infrastructure, it is impossible to determine to what extent a counting camera system will underestimate the amount of individuals in an area. Moreover, based on theory, especially in pedestrian infrastructures with a very high demand, it might be difficult to use a counting camera system to determine the total amount of pedestrians in the infrastructure, as high flow rates induce relatively high detection errors.

The Impact of Detection Errors on the Variance of the
Density. The total amount of detected individuals at the end of the day also depends on the variance of the amount of detection. The variance in the amount of pedestrians that is detected by a detector at a given location at time instance is determined by If we assume that the variance of the detection in one minute is independent of the variance of the detection error in the following minute, the variance in the amount of detected pedestrians at a certain moment in time by all detectors in the system is defined by (8) and the variance in the cumulative amount of pedestrians that are present in the area, and as such the density, is defined by (9).
From (9) four things can be deduced about the variance of the total number of detected pedestrians at the end of a day given the presence of randomly occurring "false negative" detection errors. Firstly, this number is quadratically dependent on the total flow and can, therefore, become dominant very quickly in the estimation of the cumulative number of pedestrians in the area. Secondly, the variance is highly dependent on the distribution of the flows over the two exits ( , ) and the size of the flows, and, as a result, the variance can vary severely between cases and flow situations. Thirdly, the behaviour of the variance becomes more complex with an increase of the number of cameras that are needed to detect all in-and outflows of the area. Last of all, theoretically, the total variance of the system can become negative as a result of the third power of the flow rate in (9). However, in practice this is impossible, as the variance can never go below 0.
The results of this theoretical framework illustrate that systematic detection errors in counting camera systems can have a severe influence on the density state estimation in the area. Yet, this framework does not illustrate the size of the effect of these influences in a practical application of the system. For example, if the flows in the system remain small and a limited number of cameras is used, the theoretical insights above show that the influence of the detection errors on the density state estimation is limited. Whether this is the case is dependent on the flow rate, the exact counting camera system used, and the layout of the system. In order to get some feeling for the impact of a "false negative" systematic detection error in real-life cases, a case study is performed in Section 4.

Case Study Description
Section 4 studies the effect of distinct realizations of , by means of a case study containing three cases. The cases internalize the two different types of correlations between detect and , ( ). Before going into detail about the results of these case studies, this section first introduces the main parameters of the case study. In the following paragraphs the case study layout, the demand levels, and the description of the probability functions of the detection errors are detailed.

Case Study Research Aims and Control
Variables. The theoretical framework identified the fact that the type of relation between the detection error and the flow rate at the entrances severely influences the mean and variance of the density state estimation. Moreover, this framework illustrated the large impact of spatial and temporal differences in the flow rate on the mean and variance of the density state estimation. By means of a case study, this paper studies attempts to quantify this impact by means of the following two questions: (i) How large is the impact of the type of relation between a "false negative" detection error and the flow rate at an entrance on the statistics of the cumulative sum of the amount of pedestrians within the area at the end of the day?
(ii) How large is the impact of the demand pattern of the entrances on the statistics of the cumulative sum of the amount of pedestrians within the area at the end of the day?
In order to answer these two questions, the types of correlation and distinct types of demand patterns are adopted as Layout. The layout of the case study has been kept as simple as possible, while still ensuring that all degrees of freedom that are in the description of the function of the detection probability are also accounted for in the layout. A square with two entrances provides the possibility of studying the effect of counting errors that are dependent on the total flow at the entrances of an area with two entrances, which will hereafter be identified as a corridor, and are dependent on the direction of flow in the area. In Figure 3 a visualisation is provided of the case study area that is used in the remainder of this paper.
Cases. As mentioned in the theoretical framework, there are three possible scenarios with respect to the dependence of the probability of detection on the flow at an entrance, namely, (1) the detection error is not correlated with the flow, (2) the detection error is correlated with the total flow at an entrance but independent of the direction that is being counted, and (3) the detection error is correlated with the total flow and dependent on the direction of flow that is being counted. These three cases can be formalized by the three probability density functions, (10)- (13). Here, (10) represents situation 1, (11) situation 2, and (12)-(13) situation 3. Given that equations (12) and (13) are special cases of (11), these cases will not be treated in this study. The exact realizations of , 's are specified in the next section.
Demand Levels. The type of demand pattern is used to study the influence of the shape and size of the in-and outflow on the estimation of the total number of people in the area after 24 hours. Two distinct demand profiles have been adopted (see Figure 4). The first demand profile mimics a symmetrically loading and unloading demand profile. The in-and outflow at the entrances follow a similar pattern. The second demand profile mimics a nonsymmetric demand profile in which the inflow is gradual, but the outflow is abrupt. Especially, in situations where the detection error is dependent on the flow rate, these two demand profiles are expected to produce different density estimations at the end of the day.
Since there are two entrances in the case study, the parameters are used to specify the distribution of demand over entrances, where 1 = 1 / ∑ . For simplicity, it is assumed that remains stable throughout the day.
Simulation of the Probability of Detection. When computing the cumulative number of pedestrians within an area, the authors are especially interested in the distribution of the cumulative number of pedestrians at the end of the day. Here, it is assumed that an accurate estimation of the number of pedestrians will result in a distribution with a mean near 0 and a small variance. In this study, a Monte Carlo simulation has been used to determine the properties of this distribution after 24 hours. Whether or not a pedestrian is detected is determined using a random drawn number ,sim between 0 and 1. The function of the detection probability ((10)- (13)) is used as the threshold on the chance of detection given the demand , ( ) in the minute when the pedestrian passes the entrance or exit. A pedestrian for which ,sim ≤ detect is detected; otherwise it is not. In total, 10,000 simulations of the total demand curve ( Figure 4) have been run.

Case Study Results and Synthesis
This section presents the results of the case studies. The first subsection describes the simplest scenario, in which the counting error is uncorrelated with the flow. Subsequently, the two more complex scenarios are discussed. That is, Sections 4.2 and 4.3 describe a correlation of the counting error with the total flow through the corridor, given symmetric and nonsymmetric demand profiles. Afterwards, Section 4.4 synthesizes the results.

Case 1: Detection Error Uncorrelated with Flow.
If the detection error is uncorrelated with the flow, all individuals have the same chance of being detected. As a result, the distribution of the cumulative number of pedestrians in the area after 24 hours is only dependent on , . In this case study 0.5 ≤ , ≤ 1 has been adopted. Figure 5 shows the solution space of the Monte Carlo simulation for , = 0.95. As expected, the peak of the cumulative curve is underestimated and shifted backwards in time. Additionally, the increase in the number of pedestrians during the morning and the decrease in the number of pedestrians in the evening are underestimated. As a result, in the morning, a lower number of pedestrians is estimated than is actually within the area, while during the afternoon the number of pedestrians is overestimated. Moreover, during the day, the variance of the distribution increases.
The manner of the distribution of the cumulative number of pedestrians in the area after 24 hours depends on the distribution of flows over the two exits and the detection errors are displayed in Figure 6. In case of a "false negative" detection error that is not correlated with the total flow in the corridor, the mean of the distribution of the cumulative number of pedestrians in the area is not influenced by the distribution of the flows over the two exits, nor by the

Case 2: Counting Error Correlated with Flow-Symmetric
Demand. If the detection error is correlated with the flow, then the chance of being detected is governed by two types of detection errors. 1 governs the base detection error that exists independent of the flow rate, which is set to 1 = 0.01. This value is typically found in our work with counting cameras. 2 governs the increase in the detection error as a result of the increase in the flow rate , ( ) at the entrance. Literature does not provide information about the shape of the detection error. Therefore, the impact of several distinct flow rate of 10,000 people per hour, the additional detection error is still substantial. The solution space of the Monte Carlo simulation has been visualised for 2 = 0.00005 for two distinct distributions of the flow over the two entrances (see Figure 7). In the left situation flow is equally distributed over the two entrances, while in the right situation the flow is completely assigned to one of the two entrances. The less the flow is distributed over the entrances (i.e., 1 → 1), the more the solution differs with respect to the ground truth. Surprisingly, however, also in this case, at the end of the day, the mean error in the cumulative curves approximates 0 for all 's. This might, however, be the result of the choice for a symmetric demand curve. Even though the variance of the distribution increases throughout the day, the variance remains limited given the total flow through the area. Figure 8 shows that the mean of the distribution is not affected by the distribution over the exits nor by the size of the detection error. The standard deviation is, however, dependent on the distribution over the exits. The less the flow is distributed over the two exits, the lower the standard deviation becomes. This was also found in the theoretical framework, which describes that for very high flow levels the variance will decrease. Additionally, a nonlinear trend is found regarding the influence of the detection error on the standard deviation. For detection errors , ≤ 0.0001 the standard deviation of the number of pedestrians in the area after 24 hours increases, while for detection errors for which , > 0.0001 the standard deviation decreases again. This nonlinear trend in the simulation is, most likely, a result of the balance between the two components in the equation of the variance (see (9)). When the first part is dominant, the variance increases; when the second part is dominant the variance decreases.

Case 3: Detection Error Correlated with Flow-Nonsymmetric
Demand. Similar to case 2, the detection error is governed by two parameters, namely, 1 and 2 . Here, 1 represents the static detection error, while 2 represents the increase of the detection error as a result of an increase in the flow rate. Also in this case study 0.0000 ≤ 2 ≤ 0.0005 has been adopted. The main distinction between case 2 and case 3 is the demand curve. Where a symmetric demand curve has been adopted in case 2, in this case a smooth inflow and an abrupt outflow are simulated. Figure 9 depicts the visualisation of the solution space provided by the Monte Carlo simulation for two different distributions of the flow over the two entrances, namely, 1 = 0.5 (a) and 1 = 1.0 (b). The shape of the two graphs differs from Figures 5 and 7 in two respects. Firstly, a sharp drop in the number of pedestrians in the area occurs at the end of the day, around hour 20. This is the result of the abrupt outflow that is being simulated and not a direct consequence of the detection error. Secondly, in both graphs the mean number of pedestrians is not zero in the area at the end of the day. This is due to the fact that the detection error during the inflow phase is limited, while the detection error during the outflow phase is quite substantial as a result of the high flow rates.
The estimation error at the end of the day increases if a larger portion of the demand is directed towards one entrance. This is in contrast with the previous two cases, which found a limited estimation error at the end of the day because the detection error during the inflow phase was in balance with the detection error during the outflow phase.
A summary of the results for different distributions over the two entrances and different detection errors illustrates that the mean estimation error at the end of the day can be very large (i.e., approximately 30,000 pedestrians if 1 = 0.5 or 2 = 0.00025) (see Figure 10). The mean of the estimation error is highly dependent on both 1 and 2 . Unexpectedly, the mean estimation error is less for 2 > 0.0001. It is hypothesized that this is due the limiting effect of increased flow rates and increased detection errors on the estimation error. That is, if the detection error during the inflow phase is larger, the effect of a large detection error during the outflow phase is relatively smaller. When 2 ≤ 0 the first part of the equation becomes dominant, which causes a quadratic dependence on the mean estimation error on the flow rate, which is larger if higher flow rates are encountered (i.e., 1 → 1).
Also the variance of the distribution of the cumulative number of pedestrians in the area is found to be dependent on the distribution over the entrances and the detection error. As can be expected based on the theoretical framework, the standard deviation decreases with an increase of the detection error.

Synthesis Case Studies.
The case studies presented in Sections 4.1-4.3 illustrated the impact of the type of detection error on the distribution of the cumulative number of pedestrians in the area at the end of a day. Table 1 provides a summary of the impacts for each case. Based on this table several general conclusions can be drawn. Table 1 shows that impact of a randomly occurring "false negative" detection error is limited if the detection error is not correlated to the flow rate at the entrances. In that case, the cumulative number of pedestrians is underestimated in the morning and overestimated in the afternoon. Yet, as long as the static detection error is limited ( , ≤ 0.05), these impacts are limited too.
However, if the detection error is correlated to the flow rate at the entrances, the estimation of the cumulative number of pedestrians in an area, and as such the density, deviates more from the ground truth. Cases 2 and 3 illustrate that the demand profile at the entrances has a large impact on the density estimation in this case. For symmetric demand patterns, this effect is limited to an increase of the variance of the estimated density. However, for nonsymmetric demand patterns, the impact on both the mean and standard deviation of the density estimation after 24 hours is severe. The theoretical framework illustrates that these impacts especially exacerbate when high flow rates are encountered. Consequently, in situations where high flow rates and nonsymmetric demand  profiles are encountered, such as during most large-scale events, detection systems for which the detection error is correlated with the flow rate will produce unrealistic density estimations. Based on the cumulative curve presented in Figure 11 and the nonsymmetric demand pattern of the Europride 2016 at the Dam in Amsterdam, it can be concluded that it is very likely that the detection error of counting cameras during this event was flow dependent. As the authors have seen similar results during other large-scale events, this leads the authors to conclude that, given the insights presented in this paper, one should be very hesitant to perform density state estimation by means of counting cameras at large-scale events.

Conclusion and Future Research
This paper has studied the impact of one specific type of detection error on the functionality of counting camera systems for density state estimation during large-scale pedestrian events, namely, a randomly occurring "false negative". First, via a theoretical track, the theoretical impact of this type of detection error on the distribution of the density estimation (i.e., mean and variance) has been determined. Accordingly, the dynamics of the impact have been studied in more detail by means of a simulation case study.
Based on the theoretical framework and the results, this study concludes that counting camera systems, which have a randomly occurring "false negative" detection error that is not correlated with the flow rate, which makes use of cumulative curves, provide a reasonably good estimation of the density in an area. However, in real-life situations the demand generally changes dynamically during the day. This study illustrates that even under relatively "nice" conditions, it is already highly questionable whether the results from counting camera systems can be used in a real-time monitoring operation to determine the amount of pedestrians in an area. For offline analysis this type of system might be beneficial, as at least a part of the effect of the counting error can be rectified through the application of the massconservation law.
Moreover, this study shows that counting camera systems that have a detection error that is correlated with the flow rate should only be used in the situation where symmetric demand patterns are expected. In case of nonsymmetric demand patterns, the estimation of the number of pedestrians   in an area is unrealistic as the detection error during the inflow phase is in disbalance with the detection error during the outflow phase. Here, it needs to be noted that these conclusions only hold for the estimation methods featuring cumulative curves explored in this paper. Above all, this study illustrates that knowledge on the types of detection error in counting cameras is essential to enabling density state estimation by means of counting camera systems. Given that only the effect of a type of detection error has been studied, more research is needed into the effect of more complicated detection errors, for instance, "false positives", detection errors that are correlated in time and space, and combinations thereof. Once the error is known, algorithms can be developed that account for the missing detection. More importantly, if the detection errors of these systems are understood better, it becomes easier to identify in which situations these systems should or should not be used for state estimation purposes.

Conflicts of Interest
The authors declare that they have no conflicts of interest.