# Robust Principal Component Analysis

RPCA is a method to divide a matrix $M$ into a low-rank matrix $L$ and a sparse matrix $S$.

There are several open source algorithms to solve this problem. For more details, please visit https://people.eecs.berkeley.edu/~yima/matrix-rank/sample_code.html.

# Application

## Background Modeling

During surveillance, the camera is fixed, and the background in the video is also fixed, which some foreground might have some differences. So, the foreground can be treated as a sparse matrix, and the background is a low-rank matrix. Using RPCA can distinguish background with foreground.

## Removing overexposed patches from images

We can first take several photos of an object (wrapped by a semi-transparent plastic bag_(can produce overexposed area because of its texture)_) in different perspectives. With different perspectives, there will be different areas of overexposed pixels of the same object. We can use feature points matching and perspective transformation to project all the image sequences into one perspective but with different overexposed areas.

So to eliminate the overexposed patches and get a correctly exposed image, we can understand this as a RPCA problem now. Overexposed areas in different frame can be seen as a sparse matrix and the original correctly exposed object image is a low-rank matrix.

In this method, since the feature points detection is not pixel-aligned, the low-rank matrix extracted by RPCA will be quite blurred. There’s someone else came up with a optflow idea to solve this problem.