**2.2 RPCA via Robust Subspace Learning**

2 Will-be-set-by-IN-TECH

Assuming that the video is composed of *n* frames of size *width* × *height*. We arrange this training video in a rectangular matrix *<sup>A</sup>* <sup>∈</sup> *<sup>R</sup>m*×*<sup>n</sup>* (*<sup>m</sup>* is the total amount of pixels), each video frame is then vectorized into column of the matrix *A*, and rows correspond to a specific pixel and its evolution over time. The PCA firstly consists of decomposing the matrix *A* in the product *USV*� . where *<sup>S</sup>* <sup>∈</sup> **<sup>R</sup>***n*×*n*(*diag*) is a diagonal matrix (singular values), *<sup>U</sup>* <sup>∈</sup> **<sup>R</sup>***m*×*<sup>n</sup>* and *<sup>V</sup>* <sup>∈</sup> **<sup>R</sup>***n*×*<sup>n</sup>* (singular vectors) . Then only the principals components are retained. To solve this

This imply singular values are straightly sorted and singular vectors are mutually orthogonal

*ij* =

*Bg* = *UU*�

where *v* is the current frame. The foreground dectection is made by thresholding the difference between the current frame *v* and the reconstructed background image (in Iverson

Results obtained by Oliver et al. (1999) show that the PCA provides a robust model of the probability distribution function of the background, but not of the moving objects while they do not have a significant contribution to the model. As developped in Bouwmans (2009), this

�

±1 *if i* = *j*

<sup>0</sup>*V*<sup>0</sup> = *In*). The solutions *S*0, *U*<sup>0</sup> and *V*<sup>0</sup> of (1) are not unique.

*<sup>F</sup>* , 1 ≤ *k* ≤ *r* subj

⎧ ⎪⎨

*U ki U kj* <sup>=</sup> *<sup>V</sup> ki V*

*S*

<sup>0</sup> *elsewhere* , *<sup>m</sup>* <sup>&</sup>gt; *<sup>n</sup>* (2)

*v* (4)

, 1 ≤ *j* ≤ *k* (3)

*Fg* = [ |*v* − *Bg*| < *T* ] (5)

*kj* <sup>=</sup> 1 if *<sup>i</sup>* <sup>=</sup> *<sup>j</sup>*

(1)

*ij* <sup>=</sup> <sup>0</sup> if *<sup>i</sup>* �<sup>=</sup> *<sup>j</sup>*

⎪⎩

• RPCA via Robust Subspace Learning (RSL) (Torre & Black (2001); Torre & Black (2003))

• RPCA via Templates for First-Order Conic Solvers (TFOCS1) (Becker et al. (2011)) • RPCA via Inexact Augmented Lagrange Multiplier (IALM2) (Lin et al. (2009))

• RPCA via Principal Component Pursuit (PCP) (Candes et al. (2009))

decomposition, the following function is minimized (in tensor notation):


We can define *U*<sup>1</sup> and *V*1, the set of cardinality 2min(*n*,*m*) of all solution;

*U ij* <sup>=</sup> *<sup>U</sup>*<sup>1</sup> *ij*

<sup>2</sup> http://perception.csl.uiuc.edu/matrix-rank/sample\_code.html

*U*<sup>1</sup> = *U*0*R* , *V*<sup>1</sup> = *RV*<sup>0</sup> , *R*

• RPCA via Bayesian Framework (BRPCA) (Ding et al. (2011))

**2.1 Principal component analysis**

(*S*0, *U*0, *V*0) = argmin

(*U*�

<sup>0</sup>*U*<sup>0</sup> = *V*�

notation):

*S*,*U*,*V*

We choose *k* (small) principal components:

The background is computed as follows:

where *T* is a constant threshold.

<sup>1</sup> http://tfocs.stanford.edu/

min(*n*,*m*) ∑ *r*=1

Torre & Black (2003) proposed a Robust Subspace Learning (RSL) which is a batch robust PCA method that aims at recovering a good low-rank approximation that best fits the majority of the data. RSL solves a nonconvex optimization via alternative minimization based on the idea of soft-detecting andown-weighting the outliers. These reconstruction coefficients can be arbitrarily biased by an outlier. Finally, a binary outlier process is used which either completely rejects or includes a sample. Below we introduce a more general analogue outlier process that has computational advantages and provides a connection to robust M-estimation. The energy function to minimize is then:

$$\rho(\mathbf{S}\_{0\prime}\,\mathrm{U}\_{0\prime}\,V\_{0}) = \underset{\mathrm{S},\mathrm{L},\mathrm{V}}{\mathrm{argmin}} \sum\_{r=1}^{\min(n,m)} \rho(A - \mu\mathbf{1}\_{\mathrm{n}}\,' - \underset{\mathrm{kk}}{\mathrm{S}}\,\mathrm{U}\,\mathrm{V}) \quad , \; 1 \le k \le r \tag{6}$$

where *μ* is the mean vector and the *ρ* − *f unction* is the particular class of robust *ρ*-function (Black & Rangarajan (1996)). They use the Geman-McClure error function *<sup>ρ</sup>*(*x*, *<sup>σ</sup>p*) = *<sup>x</sup>*<sup>2</sup> *x*<sup>2</sup>+*σ*<sup>2</sup> *p* where *σ<sup>p</sup>* is a scale parameter that controls the convexity of the robust function. Similar, the penalty term associate is ( *Lpi* <sup>−</sup> <sup>1</sup>)2. The robustness of De La Torre's algorithm is due to this *ρ* − *f unction*. This is confirmed by the results presented whitch show that the RSL outperforms the standard PCA on scenes with illumination change and people in various locations.

#### **2.3 RPCA via Principal Component Pursuit**

Candes et al. (2009) achieved Robust PCA by the following decomposition:

$$A = L + S \tag{7}$$

where *L* is a low-rank matrix and *S* must be sparse matrix. The straightforward formulation is to use *L*<sup>0</sup> norm to minimize the energy function:

$$\underset{L, \mathcal{S}}{\text{argmin}} \; Rank(L) + \lambda ||\mathcal{S}||\_0 \quad \text{subj} \; \ A = L + \mathcal{S} \tag{8}$$

where *λ* is arbitrary balanced parameter. But this problem is NP-hard, typical solution might involve a search with combinatorial complexity. For solve this more easily, the natural way is

**2.6 RPCA via Bayesian framework**

• Singular vector (*U* and *V*�

distribution

**3. Comparison**

provided for each dataset.

**3.1 Wallflower dataset** <sup>4</sup>

testimages.htm

assumption about components distribution are done:

convex optimization (Wright et al. (2009)).

• Singular sparness mask (*BL* and *BS*) from bernouilli-beta process.

for Background Subtraction: Systematic Evaluation and Comparative Analysis

follows:

Ding et al. (2011) proposed a hierarchical Bayesian framework that considered for decomposing a matrix (*A*) into low-rank (*L*), sparse (*S*) and noise matrices (*E*). In addition, the Bayesian framework allows exploitation of additional structure in the matrix . Markov dependency is introduced between consecutive rows in the matrix implicating an appropriate temporal dependency, because moving object are strongly correlated across consecutive frames. A spatial dependency assumption is also added and introduce the same Markov contrain as temporal utilizing the local neightborood. Indeed, it force the sparce outliers component to be spatialy and temporaly connected. Thus the decomposition is made as

<sup>227</sup> Robust Principal Component Analysis

Where *L* is the low-rank matrix, *S* is the sparse matrix and *E* is the noise matrix. Then some

Note that *L*<sup>1</sup> minimization is done by *l*<sup>0</sup> minimization (number of non-zero values fixed for

The matrix *A* is assumed noisy, with unknown and possibly non-stationary noise statistics. The Bayesian framework infers an approximate representation for the noise statistics while simultaneously inferring the low-rank and sparse-outlier contributions: the model is robust to a broad range of noise levels, without having to change model hyperparameter settings. The properties of this Markov process are also inferred based on the observed matrix, while simultaneously denoising and recovering the low-rank and sparse components. Ding et al. (2011) applied it to background modelling and the result obtain show more robustness to noisy background, slow changing foreground and bootstrapping issue than the RPCA via

In this section, we present the evaluation of the five RPCA models (RSL, PCP, TFOCS, IALM, Bayesian) and the basic average algorithm (SUB) on three different datasets used in video-surveillance: the Wallflower dataset provided by Toyama et al. (1999), the dataset of Li et al. (2004) and dataset of Sheikh & Shah (2005). Qualitative and quantitative results are

We have chosen this particular dataset provided by Toyama et al. Toyama et al. (1999) because of how frequent its use is in this field. This frequency is due to its faithful representation of real-life situations typical of scenes susceptible to video surveillance. Moreover, it consists of seven video sequences, with each sequence presenting one of the difficulties a practical task is

<sup>4</sup> http://research.microsoft.com/en-us/um/people/jckrumm/wallflower/

the sparness mask), afterwards a *l*<sup>2</sup> minimization is performed on non-zero values.

) are drawn from normal distribution. • Singular value and sparse matrix (*S* and *X*) value are drawn from normal-gamma

*A* = *L* + *S* + *E* = *U*(*SBL*)*V*� + *X* ◦ *BS* + *E* (14)

to fix the minimization with *L*<sup>1</sup> norm that provided an approximate convex problem:

$$\underset{L, \mathcal{S}}{\text{argmin}} ||L||\_\* + \lambda ||\mathcal{S}||\_1 \quad \text{subj} \quad A = L + \mathcal{S} \tag{9}$$

where ||.||∗ is the nuclear norm (which is the *L*<sup>1</sup> norm of singular value). Under these minimal assumptions, the PCP solution perfectly recovers the low-rank and the sparse matrices, provided that the rank of the low-rank matrix and the sparsity matrix are bounded by the follow inequality:

$$\text{rank}(L) \le \frac{\rho\_r \max(n, m)}{\mu(\log \min(n, m))^2} \quad \text{ } ||S||\_0 \le \rho\_s mn \tag{10}$$

where, *ρ<sup>r</sup>* and *ρ<sup>s</sup>* are positive numerical constants, *m* and *n* are the size of the matrix *A*.

For further consideration, lamda is choose as follow:

$$
\lambda = \frac{1}{\sqrt{\max(m, n)}}\tag{11}
$$

Results presented show that PCP outperform the RSL in case of varying illuminations and bootstraping issues.

#### **2.4 RPCA via templates for first-order conic solvers**

Becker et al. (2011) used the same idea as Candes et al. (2009) that consists of some matrix *A* which can be broken into two components *A* = *L* + *S*, where *L* is low-rank and *S* is sparse. The inequality constrained version of RPCA uses the same objective function, but instead of the constraints *L* + *S* = *A*, the constraints are:

$$\underset{L,S}{\text{argmin}} ||L||\_\ast + \lambda ||S||\_1 \quad \text{subj} \quad ||L + S - A||\_\infty \le \mathfrak{a} \tag{12}$$

Practically, the *A* matrix is composed from datas generated by camera, consequently values are quantified (rounded) on 8 bits and bounded between 0 and 255. Suppose *<sup>A</sup>*<sup>0</sup> ∈ R*m*×*<sup>n</sup>* is the ideal data composed with real values, it is more exact to perform exact decomposition onto *<sup>A</sup>*0. Thus, we can assert ||*A*<sup>0</sup> <sup>−</sup> *<sup>A</sup>*||<sup>∞</sup> <sup>&</sup>lt; <sup>1</sup> <sup>2</sup> with *A*<sup>0</sup> = *L* + *S*.

The result show improvements for dynamic backgrounds 3.

#### **2.5 RPCA via inexact augmented Lagrange multiplier**

Lin et al. (2009) proposed to substitute the constraint equality term by penalty function subject to a minimization under *L*<sup>2</sup> norm :

$$\underset{L,S}{\text{argmin}}\;Rank(L) + \lambda ||S||\_0 + \mu \frac{1}{2} ||L + S - A||\_F^2 \tag{13}$$

This algorithm solves a slightly relaxed version of the original equation. The *μ* constant lets balance between exact and inexact recovery. Lin et al. (2009) didn't present result on background subtraction.

<sup>3</sup> http://www.salleurl.edu/~ftorre/papers/rpca/rpca.zip
