# Robust Background Subtraction via the Local Similarity Statistical Descriptor
## 3 Background Modeling
### Foreground Detection
Moreover, the neighborhood diffusion step also enhances the spatial coherence and prevents the spread of background samples across boundaries. Even if a input sample is wrongfully diffused from one background model to another, the odds that it might be matched are much lower due to the use of the LSSD texture feature. ## 4 Experimental Results

### Evaluation Datasets

To evaluate the performance of our method and compare it with other state-of-the-art methods, a standard, publicly available dataset, CDnet2012, is considered [28]. This dataset consists of 31 videos from realistic scenarios with nearly 90,000 frames. These videos are grouped into six categories, namely: baseline, camera jitter, dynamic background, intermittent object motion, shadow, and thermal. Accurate human constructed ground-truths are available for all sequences, so exhaustive competitive comparison is possible with different methods. Figure 8 shows some sample images and their corresponding ground-truths. To our knowledge, this is one of the most complete datasets for background subtraction; a complete overview of this dataset is depicted in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Category** & **Videos** & **Total Pictures** & **Evaluation Pictures** \\ \hline baseline & 4 & 6049 & 4413 \\ cameraj & 4 & 6420 & 3134 \\ dynamic & 6 & 18,871 & 13,276 \\ intermittent & 6 & 18,650 & 12,111 \\ shadow & 6 & 16,949 & 14,105 \\ thermal & 5 & 21,100 & 18,055 \\ \hline Total & 31 & 88,039 & 65,094 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Overview of the CDnet2012 dataset. Figure 8: The CDnet2012 dataset [28]: The first row shows an original image from each category and the second row shows its corresponding ground-truth. From left to right: baseline, camera jitter, dynamic background, intermittent object motion, shadow, and thermal. Reproduced with permission from [28], Copyright Mitsubishi Electric Research Laboratories, Inc., 2012. ### Evaluation Metrics

In order to compare the methods, a total of seven different metrics have been defined to evaluate different quality characteristics. Let \(TP\) stand for the true positives which hold the number of pixels correctly labeled as foreground, \(TN\) stand for the true negatives which hold the number of pixels correctly labeled as background, \(FP\) stand for the false positives which hold the number of pixels incorrectly labeled as foreground, and \(FN\) stand for the false negatives which hold the number of pixels incorrectly labeled as background. According to [28], these metrics are defined as follows:

* Recall (Re) = \(\frac{TP}{TP+FN_{TN}}\)
* Specificity (Sp) = \(\frac{FP}{TN+FP}\)
* False positive rate (FPR) = \(\frac{FP}{FP+TN}\)
* False negative rate (FNR) = \(\frac{TP}{TP+FN}\)
* Percentage of wrong classifications (PWC) = \(100\cdot\frac{FN+FP}{TP+FN+FP+TN}\)
* Precision (Pr) = \(\frac{TP}{TP+FP}\)
* F-Measure (FM) = \(2\cdot\frac{Re.Pr}{Re+Pr}\)

The sums of all pixels in each category are used to calculate these metrics, and an overall category is defined based on the mean of each category. For PWC, FNR and FPR metrics, lower values indicate higher accuracy, but for Re, Sp, Pr and FM, higher values indicate better performance. During these metrics, we are especially interested in the F-Measure score, which is the most common metric used for background subtraction methods comparison in the literature. As the F-Measure metric is calculated by a combination of multiple evaluation metrics, the overall performance of a background subtraction method is highly correlated with its F-Measure performance. Most state-of-the-art background subtraction methods typically exhibit higher F-Measure scores than worse-performing background subtraction methods [28]. ### Parameters Setting

Our method consists of a few parameters which can be adjusted for optimal performance. Since we evaluated our algorithm on the CDnet2012 dataset [28], we used a universal parameter set for all videos to respect the competition rules.