# A Background Subtraction Algorithm in Complex Environments Based on Category Entropy Analysis
## 4 Results and Discussion
### Performance Comparison with Other Algorithms
Figure 9 shows the foreground/background detection results obtained by the seven algorithms for one image in the skating sequence. Since this image sequence was taken in snowy weather, there were a lot of snowflakes and skaters in the image. A comparison of Figure 9d-j indicated that the codebook, GMM, PBBE, and SOBS algorithms were not able to adapt to snowy weather conditions--a kind of dynamic background--and incorrectly detected many foregrounds. Given the interfering effect of skaters in the initial background, SOBS and ViBe generated obviously incorrect foregrounds. Despite the tiny fragments in the foregrounds detected by EBBE because of the similarity of the skaters' clothing to the background, this method was still the closest to the ground-truth approach among the seven methods. Figure 10 shows the foreground/background detection results obtained by the seven algorithms for one image in the tramCrossroad_1 fps sequence, whose dataset only contained ground-truths in the region of interest (non-gray parts) shown in Figure 10c. Since this image sequence was taken at a busy intersection, there were a lot of moving vehicles in the image. The low frame rate also subjected the background to severe color disturbance. A comparison of Figure 10d-j indicated that codebook, KDE, PBBE, and SOBS could not adapt to the background disturbance because of the low frame rate, and thereby incorrectly detected many foregrounds. Moreover, affected by the buses in the initial image, SOBS and ViBe also generated significant ghosting, while both EBBE and GMM had good detection results for this image. Figure 11 shows the foreground/background detection results obtained by the seven algorithms for one image in the badminton sequence. Since this sequence was taken at a badminton court, there were some players in the image. Owing to the intense camera shake in this image sequence, the background pixels with relatively large changes of the surrounding colors in the images were likely to produce more than two kinds of color changes. A comparison of Figure 11d-j indicated that the codebook, GMM, KDE, PBBE, and SOBS algorithms were affected by intense camera shake, and thereby mistook many background contours for the foreground, whereas EBBE and ViBe had good adaptability to intense camera shake. Figure 12 shows the foreground/background detection results obtained by the seven algorithms for one image in the sofa sequence. Since this sequence was captured in a lobby, there were some guests in the image. A comparison of Figure 12d-j indicated that codebook, GMM, KDE, PBBE, SOBS, and ViBe were affected by the slow-moving objects in the sequence and generated significant ghosting. Despite the tiny fragments in the foregrounds detected by EBBE because of the similarity of the guests' clothing to the background, this method was still the closest to the ground-truth approach among the seven methods. Figure 13 shows the comparison of the PCC values of the seven algorithms. Our EBBE method has the highest PCC value for all tested images compared with other methods, suggesting that EBBE has a good detection accuracy. Table 4 shows the eight metrics values of seven algorithms across all test sequence. It should be noted that the higher PCC, Re, Sp, Pr, and F-Measure values indicate more accurate detection results. In addition, the lower FPR, FNR, and PWC values represent more accurate test results. According to the average ranking R, the EBBE is the best performing algorithm among the eight met  
Figure 11: Comparison of segmentation results of seven background subtraction methods for one frame taken from the badminton 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 12: Comparison of segmentation results of seven background subtraction methods for one frame taken from the sofa sequence.