| Moving object detection is a key technology in the field of computer vision,which can not only be applied in practical scenarios such as security,autonomous driving,and smart home systems,but also provide valuable information for other computer vision tasks such as object recognition,tracking,and segmentation.This article mainly studies the ViBe algorithm based on background subtraction,and further analyzes and improves it to improve the accuracy of the detection algorithm.Through in-depth research and analysis of the ViBe algorithm,it has been found that its main problems include being prone to "ghosting",being susceptible to lighting effects,and poor performance in complex backgrounds.In order to solve these problems,this article makes improvements to the ViBe algorithm,which mainly includes the following three aspects:(1)An improvement of the ViBe algorithm combining Gaussian pyramid is proposed.Firstly,perform Gaussian pyramid processing on the video,and perform three frame difference operations on each layer of video,and then fuse the results of each layer.Secondly,improvements are made to the ViBe algorithm:Specifically,multiple frames are used for processing when initializing the background model;When updating the background,no longer randomly select sample points to update pixel values,but instead select the sample point with the largest Euclidean distance from the pixel value for updating,and perform a secondary judgment on the previous attractions.Finally,the results of the improved ViBe algorithm will be logically "AND" operated with the results of Gaussian three frame difference detection to obtain a more complete foreground area.(2)An improvement is proposed to the ViBe algorithm that integrates the Canny edge detection algorithm.Firstly,improvements are made to the traditional Canny operator,mainly by expanding the gradient direction to eight directions,making the detected target edges more complete.Additionally,OTSU thresholds are used to replace fixed thresholds to improve the accuracy of edge detection.Then,the improved Canny operator detection results are filled and fused with the foreground area detected by the improved ViBe algorithm to obtain the final result.(3)An improvement of the ViBe algorithm based on heat conduction is proposed.Firstly,an adaptive threshold is proposed,which effectively improves the adaptability of the improved algorithm and is beneficial for video preprocessing.Considering the detected binary image as a temperature field,and the grayscale values of the pixels can be correspond to the temperature.In the process of heat conduction,energy will be transferred from brighter pixels to their neighbors,making the noise darker and distinguishing it from moving targets.Finally,K-means clustering is used to further segment the foreground and background,obtaining more accurate detection results.The superiority of the algorithm proposed in this paper has been effectively demonstrated through experiments on video sets in the database.And the experimental results show that the robustness of our algorithm is superior to other algorithms,and it has high practical value. |