## 2 Detection Model
### Foreground Motion Blocks Extraction
#### 2.1.1 Sampling Areas Determination
a denotes the scaling factor, which has the following expression:

\[\alpha=\frac{1}{N}\sum_{i=0}^{N}\frac{|\overline{mrg_{i}}|}{|\widehat{f_{i}}|}. \tag{20}\]

Last but not least, if \(h=C^{\prime}\), we check whether the combination of panning and zooming occurs first, if so, \(mrg_{g}(b_{i})\) is composed of the two motion vectors and \(mv_{r}(b_{i})\) can be acquired by (19) and (20). Otherwise, it is recommended to check out the previous result of \(h\) in the reference frame buffer for the current one. If the current one is \(I\) frame (has no reference frame), or \(h_{ref}=C^{\prime}\) without combining the cases of panning and zooming, we have to ignore \(mv_{g}(b_{i})\) and leave it as zero since lacking of global motion information. If \(h_{ref}\
eq C^{\prime}\), we use \(mrg_{g}(b_{i})^{\prime}\) of the reference frame instead of this one as the last choice. #### 2.1.4 Discussion

Figure 6 displays some extracted motion blocks for ROI foreground objects via different approaches. Each method is introduced in brief:

* Gradient-Descent (GD) [63]: It aims to compute the gradient by Newton-Raphson method for the error distance between the true and the estimated MVs, then it updates parameters based on the gradient descend direction so that the error distance is reduced. * Least-Sum-Square M-Estimator (LSS-ME) [64]: It involves formulating the error distance by an over-determined regression: \(\mathbf{A}^{T}\mathbf{A}\mathbf{m}=\mathbf{A}^{T}\mathbf{b}\), where \(\mathbf{A}\in\mathbb{R}^{2N\times 8}\), \(\mathbf{b}\) is a \(2N\) vector of transformed coordinates \((x^{\prime},y^{\prime})\), and \(N\) is the total number of MVs. It also uses iterative outlier rejection through a robust M-Estimator to estimate motion components \(\mathbf{m}\). * RANSAC [65]: This method induces a statistical method for GME in different computer vision problems. It computes the homography matrix via a large number of iterations to achieve the maximum transformed matching points between the current and the reference frames. One can see that the proposed method retrieves the foreground MV blocks more accurately than others by eliminating \"noisy\" background blocks. Instead of using the regression (GD, LSS-ME) or

Figure 6: Visual comparisons of foreground motion blocks extraction with global motion among different approaches. (**a**) Sequences (From the top to bottom): _Coastguards_, _Flower_, _[PERSON]_. (**b**) Motion blocks distribution. (**c**) Our method. (**d**) The GD approach [63]. (**e**) The LSS-ME approach [64]. (**f**) The RANSAC approach [65]. statistical (RANSAC) methods to estimate the global motion parameter \(\mathbf{m}\), the proposed decision tree model is efficient on judging the global camera status. The average running time (sec/frame) performances are tested on OpenCV (C++) with a 2.8 GHZ Core i/? CPU. Table 1 displays that the proposed method achieves a better result in time performance since high computation costs of matrix SVD and iterations are substituted by the tree model with \(O(n)\) complexity. To justify how these thresholds influence the classifier's performance, several sequences are collected for test with different characteristics. These sequences are pre-analyzed by the photographer's comments for status judgements, and any decision result which obeys the objective comments is treated as the misjudgement. For performance evaluation purpose, we extract partial frames in each sequence to ensure that each sequence has at least two camera states. Frames with main status are regarded as positive samples while others are negative samples. Without loss of generality, we select the number of negative samples nearly the same as the positive ones. For example, in _foreman_, frames between 47-81 are commented as the stable state and 82-115 are commented as the panning state. Table 2 displays some performance indexes (e.g., recall, precision, F-score) for different settings of threshold \(th1\) and \(th2\).