针对几种传统算法运算复杂、实时性差、得到的背景易失真等不足,本文给出了一种实用的背景提取及更新算法.通过平均法求系列图像的均值和平均差值,之后去除差异大的点,然后再次求平均得到初始背景.背景更新时,利用三帧差分和自适应阈值法得到当前帧的二值图像,并考虑前景目标后更新得到新的背景.实验表明,上述算法所取得的背景效果良好,并可快速有效地对背景进行更新.
In view of the complex computation, the real-time problem,and the distortional background in the several commonlyused algorithms,a practical algorithm for extraction and update of background is presented in this paper. For a series of frames in video,we calculated the average value and the average difference for each pixel,then excluded those pixels that have large differences. After that,we averaged the values again on the remained pixels to obtain the initial background. During background updating,we first used three-frame differences and adaptive threshold methods to get the binary image of current frame,then by considering the foreground moving targets in the frame we obtained the new background. Our experiments show that the algorithm proposed in this paper can be used to extract backgrounds effectively and quickly when the scene changes.