## 2 Detection Model
### Foreground Motion Blocks Extraction
#### 2.1.1 Sampling Areas Determination
Please note that the Gift-Wrapping algorithm performs as a convex hull scan method, in which the convex shape of the motion area is clearly formed. For alternating the cover area, we define the center of motion area \(i\) as:

\[\mathcal{C}_{m}^{i}(r,c)=\frac{1}{|\mathcal{B}_{E}^{i}|}\sum_{b_{E}\in\mathcal{ B}_{E}^{i}}b_{E}(r,c), \tag{22}\]

where \(\mathcal{C}_{m}^{i}(r,c)\) denotes the center coordinate (\((r,c)\) means row and column). We also declare an inflation factor \(\iota\) which controls the scaling extent of the mask. Given a fixed \(\iota\), the updated \"edge\" blocks \(b_{E}^{\prime}(r,c)\) can be expressed as:

\[ \begin{cases}b_{E}^{\prime}(r)&=b_{E}(r)+(\iota-1)\cdot(b_{E}(r)-\mathcal{C}_ {m}(r))\\ b_{E}^{\prime}(c)&=b_{E}(c)+(\iota-1)\cdot(b_{E}(c)-\mathcal{C}_{m}(c))\end{cases}  \tag{23}\]

To specify how \(\iota\) influences the mask shape, we change \(\iota\) from 1 to 1.4, the visual effects of which is displayed in Figure 9c,d. After acquiring the mask data, we can determine the result of foreground objects inside the mask. We use the extracting method in our previous work [14], it implements a multidimensional segmentation method with the Expectation Maximization (EM) algorithm to segment the mask data into an optimal number of clusters. Then, for each cluster inside the mask, it computes the KLD (\(D(p_{b}||p_{f})\)) between the background pixel histogram \(p_{b}(x)\) and foreground pixel histogram \(p_{f}(x)\). When \(D(p_{b}||p_{f})\) is below a threshold \(\xi_{x}\), the current cluster is treated as the background cluster and it is removed from the mask. At the end of each iteration, \(p_{b}\) is updated based on the removed clusters and sampling background blocks, see Formula 25 in our previous work [14] for details. ## 3 Experiments

### Visual Effect Analysis Experiments

#### 3.1.1 Parameters Settings

It is essential to set some parameters before performing the visual analysis experiment. For ROI inter model, two threshold \(th1\) and \(th2\) are set to 0.5 empirically since the score is normalized, and the norm of the real motion vector should satisfy \(||mv_{b_{i}}||>\sqrt{2}\) as a condition to determine whether block \(b_{i}\) belongs to motion mask \(\mathcal{M}\). For ROI intra model, the initial value of \(\vartheta(\tau,\mu,\Sigma)\) is set manually instead of a random value for reducing iteration steps. Practically, \(\tau\) is set initially as \(\{0.5,0.5\}\) for \(K=2\) classes, and \(\mu\), \(\Sigma\) are recommend to be acquired by running the K-means cluster (\(K=2\)) method first and use the outputs as their initial values. \(z_{i}\) is assigned by an uniform distributed binary array \(\{0,1,0,1,\dots\}\) with the same probability for each value. \(\beta\) is set as 1.5 and \(\xi_{1},\xi_{2}\) are initiated as 8 and 0.12 respectively. Besides, the max-iteration steps for EM algorithm are constrained to 10 for reducing the computing costs. Figure 9: Visual effects of mask drawing and mask inflation: (**a**) Raw sequences. (From top to bottom:

_CastGuard_, _Suzie_. (**b**)”edge” feature blocks. (**c**) Mask shape with \(\iota=1.4\). (**d**) Mask shape with \(\iota=1\). #### 3.1.2 Visual Comparisons on CDNet

In this sub-experiment, the performance of our method is evaluated by using five video clips from the change detection data set (CDNet) [61]. These clips contain: _Shade_ (periodic motion, shadow), _Office_ (slow-moving), _Highway_ (fast-moving) _Winter_ (camouflage), and _Canoe_ (dynamic background). They are displayed from top to bottom in Figure 10. Seven methods are included for visual comparisons, and they are classified into several categories: (1) Matrix completion approaches: Decolor [67], PCP [22], GROUSE [27]; (2) Probabilistic modeling: GMM [21], VBRPCA [26]; (3) Background modeling: Vibe [34], MKFC [38]. For fast-moving and slow-moving clips, all of these methods are able to reveal ROI details (moving objects) while some noise pixels especially in PCP [22] and GROUSE [27].