# A Background Subtraction Algorithm in Complex Environments Based on Category Entropy Analysis
## 4 Results and Discussion
### Performance Comparison with Other Algorithms  
In this study, we compared our proposed algorithm to six popular background subtraction methods: (i) background modeling and subtraction by codebook construction (codebook, [17]); (ii) adaptive background mixture models for real-time tracking (GMM, [13]); (iii) background and foreground modeling using nonparametric kernel density estimation for visual surveillance (KDE, [15]); (iv) an effective object segmentation system using a probability-based background extraction algorithm (PBBE, [19]); (v) a self-organizing approach to background subtraction for visual surveillance applications (SOBS, [20]); and (vi) ViBe, a universal background subtraction algorithm for video sequences (ViBe, [21]). In order to test the detection capability of the algorithms in a complex background environment, we chose to start the initial-background extraction when there were moving objects in the image sequence, using the start image number of selected image sequences shown in Table 3. Figures 7-10 show the foreground/background detection results of the seven algorithms under different circumstances, with (a) representing the \(n\)th input image (initial image), (b) representing the \(n+99\)th input image, and (c  
Figure 7 shows the foreground/background detection results obtained by the seven algorithms for one image in the Carnegie Mellon sequence. Owing to the slight camera shake in this image sequence, the background pixels (such as those on the background profile) with relatively large changes of the surrounding colors in the images were likely to produce more than two kinds of color changes. Figure 8: Comparison of segmentation results of seven background subtraction methods for one frame taken from the highway sequence. (**a**) Frame \(n\) (start image), (**b**) frame \(n+99\), (**c**) ground-truth, (**d**) EBBE (proposed), (**e**) codebook, (**f**) GMM, (**g**) KDE, (**h**) PBBE, (i) SOBS, and (**j**) ViBe. Figure 10: Comparison of segmentation results of seven background subtraction methods for one frame taken from the tramCrossroad_1 fps sequence. (**a**) Frame \(n\) (start image), (**b**) frame \(n+99\), (**c**) ground-truth, (**d**) EBBE (proposed), (**e**) codebook, (**f**) GMM, (**g**) KDE, (**h**) PBBE, (i) SOBS, and (**j**) ViBe. Figure 9: Comparison of segmentation results of seven background subtraction methods for one frame taken from the skating sequence. (**a**) Frame \(n\) (start image), (**b**) frame \(n+99\), (**c**) ground-truth, (**d**) EBBE (proposed), (**e**) codebook, (**f**) GMM, (**g**) KDE, (**h**) PBBE, (i) SOBS, and (**j**) ViBe. A comparison of Figure 7d-j indicated that the GMM, KDE, PBBE, and SOBS algorithms were affected by camera shake, and thereby mistook many background contours for the foreground, whereas EBBE, codebook, and ViBe had good adaptability to camera shake. However, some of the backgrounds in the initial images were temporarily obscured by a pedestrian, causing codebook, KDE, SOBS, and ViBe to generate many false foregrounds (ghosting) at the position where the pedestrian first appeared on the right side of the images. Only EBBE showed good detection results in scenarios with camera shake and initial-background masking. Figure 8 shows the foreground/background detection results obtained by the seven algorithms for one image in the highway sequence. Given the effect of a floating cloud on the image lighting, there were slight changes in image brightness. Moreover, there were shaking trees, as well as a large number of moving vehicles, on the left side of the image. A comparison of Figure 8d-j indicated that the codebook, KDE, PBBE, and SOBS algorithms could not adapt to dynamic background environments such as those with a light change and shaking trees, and thereby generated many incorrect foregrounds. With the exception of EBBE, the other algorithms could not overcome the background masking issue due to a large number of moving objects in the background extraction process and generated many erroneous foreground-detection results.