Journal of Computer Applications ›› 2016, Vol. 36 ›› Issue (8): 2322-2326.DOI: 10.11772/j.issn.1001-9081.2016.08.2322

Previous Articles     Next Articles

Rapid video background extraction algorithm based on nearest neighbor pixel gradient

ZHAO Shuyan, LU Yanxue, HAN Xiaoxia   

  1. College of Information Engineering, Taiyuan University of Technology, Taiyuan Shanxi 030024, China
  • Received:2016-01-13 Revised:2016-03-07 Online:2016-08-10 Published:2016-08-10
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61272534), the Project of Enhancing School with Innovation of Guangdong Ocean University (2015KQNCX056), the Science and Technology Program of Zhanjiang (2015B01009).

基于最近邻域像素梯度的视频背景快速提取

赵树言, 路艳雪, 韩晓霞   

  1. 太原理工大学 信息工程学院, 太原 030024
  • 通讯作者: 韩晓霞
  • 作者简介:赵树言(1990-),男,甘肃庆阳人,硕士研究生,主要研究方向:机器视觉、智能控制;路艳雪(1990-),男,河南安阳人,硕士研究生,主要研究方向:机器学习、多相催化建模与优化;韩晓霞(1976-),女,山西忻州人,副教授,博士,主要研究方向:智能信息处理、复杂系统建模与优化。
  • 基金资助:
    大学生创意百家基金资助项目(2014A0006)。

Abstract: For the instantaneity of video background extraction in embedded visual systems, a rapid algorithm based on the Nearest Neighbor Pixel Gradient (N2PG) stability was proposed. Firstly, background initialization was conducted with one single frame, and the N2PG matrix of this frame was calculated. Secondly, several frames of the subsequent video were operated as reference image for background update, and the N2PG matrix of those frames were calculated in the same way. Then, it was judged rapidly that each pixel of the background model was static or nonstatic by calculating the subtraction between the N2PG matrix of the background image and the N2PG matrix of the reference image, referencing the threshold value of gradient stability estimated in real-time. Finally, the current background was obtained by updating or replacing each background pixel. In the simulation tests, compared with Kalman filtering method and Gaussian mixture model, only 10 to 50 frames were needed to get background in the algorithm based on N2PG, and the average speed of processing frames was increased by 36% and 75% respectively; compared to the modified Visual Background Extractor (ViBe) algorithm, the speed of updating background by using N2PG algorithm was doubled with the same required number of the video frames and the similar background quality. Experimental results show that the proposed algorithm has the advantages of strong adaptability, high speed and small storage, and the background extraction accuracy is also above 90%, it can satisfy the application of real-time embedded visual systems in natural environment.

Key words: rapid background extraction, neighbor pixel gradient, video background, embedded system, machine vision

摘要: 针对嵌入式设备对视频背景的实时提取问题,提出一种基于最近邻域像素梯度(N2PG)稳定性的视频背景快速提取方法。首先,以视频中任意帧作为初始背景,并计算此背景图像的N2PG矩阵;然后,以背景帧之后若干帧图像作为背景更新图像,同理计算N2PG矩阵;最后,将背景图像N2PG矩阵与更新图像N2PG矩阵进行差分,并通过实时估计的梯度稳定性阈值快速判断背景模型中各像素点是静态背景像素点还是非背景像素点,进而对其更新或替换,以得到视频当前背景。经计算机仿真测试,与常用的卡尔曼滤波法和混合高斯法相比,基于N2PG的视频背景提取方法得到相同质量背景仅需10~50帧图像,并且平均处理速度分别提高36%和75%;和改进的视觉背景提取(ViBe)算法相比,在所需帧数和所得背景质量相近的情况下,该算法背景更新速度提升一倍。实验结果表明,基于N2PG的视频背景提取算法具有很强的自适应性,并且速度快、内存消耗小,背景提取准确度达到90%以上,可满足真实自然环境下嵌入式视觉设备的应用。

关键词: 快速背景提取, 邻域像素梯度, 视频背景, 嵌入式系统, 机器视觉

CLC Number: