A fast algorithm for a weighted low rank approximation

Aritra Dutta, Xin Li

Abstract

Matrix low rank approximation, including classical Principal Component Analysis (PCA) and Robust PCA (RPCA), is a cornerstone of background modeling in video analysis. While RPCA offers robustness to outliers, it is often computationally prohibitive for large-scale video processing. This paper presents a highly efficient algorithm for a special Weighted Low Rank (sWLR) approximation. By leveraging a closed-form solution for specific matrix components, the proposed method achieves superior speed and accuracy, particularly in preserving static backgrounds and correctly identifying static foreground objects.

Introduction

Background modeling involves decomposing video frames into a low-rank component (the static background) and a sparse component (moving foreground objects). While standard PCA is computationally efficient, it lacks robustness to outliers. RPCA improves robustness but its computational cost scales poorly as the number of frames increases. This work introduces a middle ground: a weighted low-rank approach that incorporates prior knowledge—specifically, identifying frames that are predominantly background—to "anchor" the optimization process and improve both speed and fidelity.

Methodology: The sWLR Algorithm

The core of the proposed approach is the partition of the input matrix $A$ into two blocks: $A = [A_1, A_2]$. Here, $A_1$ contains frames suspected to be mostly background. The optimization problem is formulated as: $$\min_{X_1,X_2, \text{rank}([X_1, X_2])\le r} \{ \|(A_1 - X_1) \odot W_1\|_F^2 + \|A_2 - X_2\|_F^2 \}$$ where $W_1$ is a weight matrix assigning high importance to the background-heavy frames.

The authors derive a critical mathematical property (Theorem 2) showing that for a fixed $X_1$, the optimal $X_2$ can be determined via a closed-form solution involving projections and hard thresholding of singular values. This allows for an alternating iterative scheme that updates $X_1$ row-by-row and $X_2$ through the closed-form solution, significantly reducing the computational burden compared to generic weighted low-rank solvers.

Experimental Evaluation

The algorithm was rigorously tested using the Stuttgart synthetic video dataset, focusing on the "Basic" and "Noisy night" sequences. Each sequence consists of 600 frames and presents challenges such as dynamic backgrounds (swaying trees) and static foreground objects (parked vehicles).

Results and Discussion

The sWLR algorithm demonstrated significant improvements in both computational efficiency and visual quality over standard RPCA methods.

Computational Efficiency

In tests with the "Basic" sequence, sWLR maintained linear scaling as the number of frames increased. For a 600-frame sequence, sWLR completed processing in under 60 seconds, whereas standard RPCA methods like iEALM and APG exceeded 100 seconds. This efficiency makes sWLR a viable candidate for real-time applications.

Qualitative and Quantitative Accuracy

Quantitative evaluation using the Structural Similarity Index (SSIM) showed that sWLR consistently outperformed RPCA, particularly in frames containing static foreground objects. Visually, sWLR excels at removing "ghosting" artifacts—blurry trails left by moving objects—and correctly identifying static foreground objects that RPCA often mistakenly absorbs into the background.

Figure 3: Comparison of background estimation across different scenarios. The middle column shows the proposed sWLR results, which successfully remove artifacts highlighted by red boxes in the baseline results (right column).

As seen in the visual comparisons, the sWLR method produces a much cleaner background estimate. In Figure 1, the baseline method (a) leaves a visible ghost of the vehicle, whereas the sWLR method (b) effectively isolates the background.

Figure 1: Qualitative comparison on Frame 435. (a) shows ghosting artifacts from a baseline method, while (b) demonstrates the cleaner background estimate produced by the proposed sWLR algorithm.

Conclusion

The proposed sWLR algorithm offers a fast and robust alternative to RPCA for background modeling. By effectively utilizing prior frame knowledge through a weighted framework and a novel closed-form update rule, it achieves high performance without the computational overhead of nuclear norm regularization. Future work will focus on automating the selection of weights and the target rank $r$ to make the system fully autonomous.

Summary updated

BibTeX
@inproceedings{dutta2017fast,
  author = {Aritra Dutta and Xin Li},
  title = {{A fast algorithm for a weighted low rank approximation}},
  booktitle = {Mva},
  year = {2017},
  doi = {10.23919/mva.2017.7986798},
}
Figure