Extracting Crowd Velocities at High Density

Velocity is a fundamental property of foot traffic flow. Monitoring the change of velocity patterns at high pedestrian densities may provide valuable insights on foot traffic dynamics. In this paper, a closer look is taken to explore the capability of the Particle Image Velocimetry (PIV) technique on extracting crowd velocities from surveillance camera images. Experiments are performed to report the accuracy of pedestrian velocity extraction with PIV. Quantitative accuracy is reported with manual tracking of pedestrians, surveying correlation misses at different window sizes and compute times. The results indicate that the PIV algorithm can be a good candidate for velocity extraction in real-time.


Introduction
Particle Image Velocity or PIV is a widely used technique in experimental fluid dynamics [1]. Recently, a number of studies have been able to apply the technique outside the domains of fluid dynamics [2], [3]. Some preliminary studies have also been performed on crowd velocity extraction [4]. However, the scope and limitations of the PIV technique for crowd velocity extraction is still not thoroughly known. The objective of the current work is to analyse the PIV velocity extraction from both the qualitative and quantitative accuracy perspectives. The PIV application may also be suitable for real-time velocity extraction for its superior timing compared to the Optical Flow technique [5]. The study focuses on the processing of images acquired from a dense crowd event known as the Hajj. In order to properly process these images, an automated background detection and camera angle perspective correction approach have also been implemented.
The paper is organized as follows: Section 2 outlines the PIV, background removal and perspective correction techniques. Section 3 provides results on the PIV accuracy and timings. Finally, conclusions are drawn in Section 4.

Materials and Methods
A brief description is provided of the methods involved in crowd image processing. The PIV technique is discussed in section 2.1, followed by automated background removal in section 2.2 and perspective correction in section 2.3.

Particle Image Velocimetry(PIV)
The Particle Image Velocimetry (PIV) technique takes a sequence of two images that are separated by a small time-gap and produces vectors indicating the direction of movement. It operates in two stages: 1) Cross correlation and 2) Sub pixel displacement estimation. To facilitate the processing, the input image is being divided into smaller sub images called interrogation spots (spot size). The cross-correlation operation produces one correlation surface per interrogation spot with a single peak at the centre. In Figure 1, a sample interrogation spot and the corresponding correlation surface can be seen.
Once the correlation surface is obtained, the next step is to fit a Gaussian between the central peak and its neighbouring peaks. The Gaussian fit produces the pixel displacements with sub pixel accuracy [6].

Background Removal
The surveillance camera images can come in various settings. As image noise is typically high, the background removal is important. Here, for background removal, some representative sections of the background are collected during pre-processing. Then, during operation, a chi-square based distance function is evaluated for each interrogation spot. If the interrogation spot exceeds a threshold of distance (greater than 0.84) then it is considered as background. The results for automated background removal can be seen in Figure 2. More details can be found in [6].

Correction of Perspective
In real life, the surveillance cameras are not mounted orthogonally to the direction of crowd movement. As a result, different portions of the image will correspond to different displacement values in physical units. A correction scheme is applied to rectify the issue that is based on pin-hole camera and projective geometry [6].

Experiments and Results
Results of the accuracy and timings of the PIV technique in obtaining crowd velocities are presented in this section. In section 3.1 the accuracy results are reported and in section 3.2 the compute times are presented.

Quantitative Accuracy
Quantitative accuracy is reported through finding correlation misses varying spot window sizes and manual tracking of pedestrians.

Correlations Miss
Successful correlation is dependent on optimal spot window size. In order to process crowd images, 150x150 pixels wide spot windows were chosen. During experiments, it was found that when the spot size is increased from 2x2 pixels, the correlation misses start to decrease. Beyond a window of 40x40 pixels, no misses at all were found.

Manual Tracking of Pedestrians
Proceedings from the 9th International Conference on Pedestrian and Evacuation Dynamics (PED2018) Lund, Sweden -August 21-23, 2018 The movement of pedestrians at 6 random locations were manually tracked and displacements were compared with PIV displacements. Results can be seen in Table 1.  Table 2 shows the results of timings for PIV and Optical Flow in processing crowd images of various sizes. The experiments are performed in a 4-core laptop with 1.8 GHz processor and 8 GB main memory.

Conclusion
PIV technique has been able to successfully extract pedestrian velocities from surveillance camera images. It also has superior timing compared to the Optical Flow technique. However, more experiments are needed in various image illumination levels and different camera angles in order to see what possible limitations this technique is susceptible to.