## 4 Experiments
### Omnidirectional Bee Traffic
The video frame size was \(640\times 480\), the interrogation window size was 90, and the interrogation window overlap was 60%. Let \(C_{1}\), \(C_{2}\), and \(C_{3}\) be the counts returned by the proposed DPIV-based algorithm, the MOG2/VGG16 algorithm, and the human counter, respectively. Of course, these counts cannot be directly compared, because the former are motion vector counts while the two latter are actual bee motion counts. Several motion vectors returned by the proposed algorithm may correspond to a single bee motion. To make a meaningful comparison, we standardized these three variables to be on the same scale by calculating the mean \(\mu\) and the standard deviation \(\sigma\) for each variable, subtracting each observed value \(v\) from \(\mu\), and dividing by \(\sigma\). Thus, the three standardized variables (i.e., \(C_{1}^{*}\), \(C_{2}^{*}\), and \(C_{3}^{*}\)) had an approximate \(\mu\) of 0 and a \(\sigma\) of 1. Figure 5 gives the plots of the three standardized variables, \(C_{1}^{*}\), \(C_{2}^{*}\), and \(C_{3}^{*}\), for each of the four videos. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Video** & **Num. Frames** & **VGG16** & **ResNet32** & **ConvNetGS3** & **ConvNetGS4** & **Human Count** \\ \hline NT\_Vid.mp4 & 742 & 151 & 75 & 182 & 127 & 73 \\ LT\_Vid.mp4 & 744 & 47 & 25 & 57 & 43 & 353 \\ MT\_Vid.mp4 & 743 & 1245 & 145 & 597 & 316 & 2924 \\ HT\_Vid.mp4 & 744 & 16,647 & 13,362 & 16,569 & 15,109 & 5738 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance of the system on the four evaluation videos: the columns VGG16, ResNet32, ConvNetGS3, and ConvNetGS4 give the bee motion counts returned by the configurations MOG2/VGG16, MOG2/ResNet32, MOG2/ConvNetGS3, and MOG2/ConvNetGS4, respectively; and the last column gives the human bee motion counts for each video. The plots in Figure 5 of the three standardized variables \(C_{1}^{*}\), \(C_{2}^{*}\), and \(C_{3}^{*}\) can be construed as time series and compared as such. A classical approach for calculating similarity between two time series is by using Dynamic Time Warping (DTW) (e.g., [24; 25]). DTW is a numerical similarity measure of how two time series can be optimally aligned (i.e., _warped_) in such a way that the accumulated alignment cost is minimized. DTW is based on dynamic programming in that the method finds all possible alignment paths and selects a path with a minimum cost. \[D(i,j)=d_{i,j}+min\{D(i-1,j-1),D(i-1,j),D(i,j-1)\} \tag{5}\]  
Figure 5: Plots of the three standardized variables on four evaluation videos, no traffic (NT_Vid.mp4), low traffic (LT_Vid.mp4), medium traffic (MT_Vid.mp4), and high traffic (HT_Vid.mp4). The total number of frames examined were 216,956 video frames. The x-axis is the time (in seconds) when each video frame is captured. The y-axis is the values of the standardized variables \(C_{1}^{*}\) (DPIV), \(C_{2}^{*}\) (MOG2/VGG16), and \(C_{3}^{*}\) (Human Count). \(C_{3}^{*}\) is the ground truth. Let \(F_{t}\) and \(F_{t+1}\) be two consecutive frames captured at times \(t\) and \(t+1\), \(1\leq t\leq 29\). \(C_{1}^{*}(t+1)\) is the standardized value of \(T_{f}(F_{t},F_{t+1})\), \(C_{2}^{*}(t)\) is the standardized value of the count returned by the MOG2/VGG16 algorithm for \(F_{t}\), and \(C_{3}^{*}\) is the standardized value of the count returned by the human counter for \(F_{t}\). \(C_{1}^{*}(1)=C_{2}^{*}(1)=C_{3}^{*}(1)=0\). Let \(X\) and \(Y\) be two time series such that \(X=(x_{1},x_{2},\ldots,x_{i},\ldots,x_{n})\) and \(Y=(y_{1},y_{2},\ldots,y_{j},\ldots,y_{m})\), for some integers \(n\) and \(m\). An \(n\times m\) distance matrix \(D\) is created where each cell \(D(i,j)\) is the cumulative cost of aligning \((x_{1},\ldots,x_{i})\) with \((y_{1},\ldots,y_{j})\) defined in Equation (5), where \(d(i,j)=d(x_{i},y_{j})=(x_{i}-y_{j})^{2}\) is the local distance (e.g., Euclidean) between the points \(x_{i}\) and \(y_{j}\) from \(X\) and \(Y\), respectively.