## 2 Detection Model
### Foreground Motion Blocks Extraction
#### 2.1.1 Sampling Areas Determination
To be specific, we categorize \(\mathbb{X}\) into two groups: \(\mathbb{X}_{diag}=\{\mathbf{X}_{1},\mathbf{X}_{3},\mathbf{X}_{5},\mathbf{X}_{7}\}\) and \(\mathbb{X}_{mid}=\{\mathbf{X}_{2},\mathbf{X}_{4},\mathbf{X}_{6},\mathbf{X}_{8}\}\). Also, define a set of vectors \(\mathbb{F}=\{\vec{f}_{1},\vec{f}_{2},\dots,\vec{f}_{N}\}\) that:

\[\vec{f}_{i}=\left(X_{o}-\mathbf{X}_{i}(x),Y_{o}-\mathbf{X}_{i}(y)\right)\ \mathbf{X}_{i}\in \mathbb{X}, \tag{12}\]

where \((X_{o},Y_{o})\) is the coordinate of the anchor point \(o\), and \((\mathbf{X}_{i}(x),\mathbf{X}_{i}(y))\) is the mean coordinate of \(\mathbf{X}_{i}\). For camera zoom-in status, the inner product of \(\mathcal{MV}(\mathbb{X})\) and \(\vec{f}\) is a positive value while it is negative in zoom-out status. We can compute the offset angle \(\Omega\) for zoom in and out by:

\[\Omega_{i}=\arccos\frac{\overline{mv_{i}}\cdot\vec{f}_{i}}{\mid\overline{mv_{ i}}\mid\mid\vec{f}_{i}\mid}. \tag{13}\]

Apparently, \(\Omega_{i}>0\) means \(\mathbf{X}_{i}\) is in the direction of zoom-in, otherwise zoom-out. We keep \(\Omega\) in a belief range \([\Omega_{l},\Omega_{r}]\), in which the max difference between \(\Omega_{r}\) and \(\Omega_{l}\) is set assigned with a constant value (marked in Figure 3 as gray solid arcs). Suppose \(\Omega\) obeys the normal distribution: \(\Omega\sim\mathcal{N}(\mu,\sigma)\). Then, the likelihood factor \(\mathcal{L}\) is given as:

\[ \begin{cases}\mathcal{L}(\Omega)&=2\pi\sigma^{-\frac{1}{2}}\exp(\frac{(\Omega -\mu)^{2}}{2\sigma^{2}})\\ \mathcal{L}(\Omega)&=\mathcal{L}(\Omega)/\mathcal{L}(\mu).\end{cases} \]

Please note that \(\mathcal{L}(\Omega)\) is normalized to unify the range. Besides, a 'hit and miss' voting scheme is induced: for the zoom-in situation, if \(\Omega_{i}>\sigma\), we say that sampling area \(i\) misses the zoom-in contribution, otherwise hit; for the zoom-out situation, if \(\pi-\Omega_{i}>\sigma\), we say miss, otherwise hit. Now, the voting rate for zooming situation is declared as:

\[V(\mathbb{X})=\frac{1}{N}\sum_{i}\delta(\Omega_{i},\sigma)\ 1\leq i\leq N \tag{14}\]

Figure 3: An illustration of the camera zoom in and out status. where \(\delta(\Omega_{i},\sigma)\) is also an indicator function: \[\delta(\theta_{i},\sigma)= \begin{cases}1&\Omega_{i}<\sigma\text{ and }\overline{mv_{i}}\cdot\vec{f}_{i}>0\\ -1&\pi-\Omega_{i}<\sigma\text{ and }\overline{mv_{i}}(x)\cdot\vec{f}_{i}<0\\ 0&\text{otherwise.}\end{cases} \] (15) When \(|V(\mathbf{X}_{i})|\geq p\), the voting rate's error is given as \(1-p\). It can be seen that the sampling areas with opposite motion directions show more negative contributions on \(V(\mathbf{X})\) than ones with higher variances, which is reasonable since motion direction plays an important role in zoom judging. Another factor that influences zoom judging is the norm of \(\mathcal{MV}(\mathbb{X})\), it satisfies: \[E(|\overline{\mathcal{MV}(\mathbb{X}_{diag})}|)\simeq\frac{h}{\sqrt{w^{2}+h^{ 2}}}E(|\overline{\mathcal{MV}(\mathbb{X}_{mid})}|),\] (16) where \(w\) and \(h\) are width and height of a frame, \(|\overline{\mathcal{MV}(\mathbb{X}_{diag})}|\) stands for the average norm of MVs in \(\mathbb{X}_{diag}\). Observe that this equation is the approximate one, and its relative error \(\varepsilon\) can be defined as: \[\varepsilon=\frac{2|E(|\overline{\mathcal{MV}(\mathbb{X}_{diag})}|)-\frac{h}{ \sqrt{w^{2}+h^{2}}}E(|\overline{\mathcal{MV}(\mathbb{X}_{mid})}|)|}{E(| \overline{\mathcal{MV}(\mathbb{X}_{diag})}|)+\frac{h}{\sqrt{w^{2}+h^{2}}}E(| \overline{\mathcal{MV}(\mathbb{X}_{mid})}|)}\] (17) Finally, the score for deciding camera zooming is given below: \[S_{z}=\frac{(1-\varepsilon)V(\mathbb{X})}{N}\sum_{i}\tilde{\mathcal{L}}( \Omega)\ (1\leq i\leq N)\] (18) When \(S_{z}\) is negative, it is inclined to zoom-out situation, otherwise zoom-in. In addition, we have to set a threshold \(t_{h}\) that must satisfy \(|S_{z}|>t_{h}\) for the zooming circumstances.