## 2 Detection Model
### Foreground Motion Blocks Extraction
#### 2.1.1 Sampling Areas Determination
When it faces to the shadow or dynamic background source, most of these methods fail because it is hard to handle backgrounds with varying ambient variations. The proposed method shows better results since it ignores ambient variations by object filtering. When processing some sequences like _Winter_, the proposed method fades in ROI details a little bit since the target contains too small pixels for \(\mathcal{M}\) to retrieve, but it still meet a satisfactory result compared with other approaches. #### 3.1.3 Visual Comparisons On AVC/HEVC Sequences

In this sub-experiment, we test the proposed method among real AVC/HEVC (H.264/H.265) video sample sequences by comparing with other approaches. All the methods are performed based on the standard video compression software named HM13.0 for HEVC. The tested sequence are introduced with a raster order in Figure 11a correspondingly: _BQSquare_ (zooming, slowly move), _Carphone_ (dynamic background), _Container_ (slowly and fast move), _Ice_ (low-contrast fore-background move), _KristenAndSara_ (slowly high definition move), _Mobile_ (zooming, low-contrast fore-background move), _Racchorse_ (large ROI fast move), _Stefan_ (panning, fast move). For comparison purpose, two well-suited for real-time processing embedded in video codec methods are introduced. They are SSGoDec [29] and \(\Sigma-\Delta\) motion detection [68], where the former uses outlier pursuit (OP) for low-rank matrix estimation while the latter consists a simple non-linear recursive approximation for background image based on an elementary increment/decrement value. The visual effect result is displayed in Figure 11, where the motion vector output \(\mathcal{M}\) (represented as blocks) is displayed in Figure 11b after global motion detection and compensation. One can see that the proposed method achieves better performance especially on sequences with global motion (i.e., _Mobile_, _Stefan_) than others. \(\Sigma-\Delta\) can extract an explicit margin details specifically in low-contrast fore-background sequences (i.e., _Ice_), however, it also brings stable details such as the barricades. Our method is able to provide similar object details as \(\Sigma-\Delta\) and it also focuses on moving objects with stable details neglected. Similar result can be found in _Racchorse_. Figure 10: Visual effect comparisons through different methods on CDNet. (**a**) Source frames. (**b**) Ground truth. (**c**) The proposed method. (**d**) VBRPCA [26]. (**e**) GROUSE [27]. (**f**) MKFC [38]. (**g**) PCP [22]. (**h**) ViBe [34]. (**i**) GMM [21]. (**j**) Decolor [67]. #### 3.1.4 Miscellaneous Analysis

The performance of ROI detection and the computing time for different approaches are analyzed in this sub-experiment. A state-of-the-art measurement for the performance analysis is to plot the ROC curve and compute the area under the curve (AUC). The collected data for test includes the ROI data (white pixels) of the ground truth together with the same amount of the non-ROI data (black pixels), to make sure that we have the same positive and negative samples. The label of classifier is marked as 1 if it belongs to ROI and 0 if not. Unfamiliar with visual effect comparisons, the outputs \(I_{O}\) of these detection methods are gray-scale image (0-255) without binarization by threshold \(th\), and the tested data is sorted by a score metric \(\hat{s}(x)\) in a descend order. Also, this sub-experiment addressed some performance metrics analyzes including recall, false positive rate (FPR), false negative rate (FNR), precision (Prec), and F-measure, whose definitions are given by:

\[ \begin{cases}\text{Recall}&=\text{tp}/(\text{tp}+\text{fn});\ \text{Prec}=\text{tp}/(\text{fp}+\text{tp});\\ \text{FNR}&=\text{fn}/(\text{fn}+\text{tp});\ \text{FPR}=\text{fp}/(\text{fp}+\text{ tn});\\ \text{F-measure}&=(2\times\text{Recall}\times\text{Prec})/(\text{Recall}+\text{ Prec})\end{cases}  \tag{24}\]

where tp, fp, tn, fn denote true positive, false positive, true negative, false negative rate respectively.