传统的基于直方图的粒子滤波器算法常常需要在准确表达颜色分布和计算效率之间做出妥协,从而影响跟踪算法的性能甚至导致跟踪算法失败.针对这一问题,文中提出一种新颖的基于颜色信息的粒子滤波器跟踪算法.该算法采用自适应剖分颜色空间的概率模型,能够用较少的子空间准确地表达目标的颜色分布.文中进一步提出一种推广的积分图像,通过在该积分图像上进行数组索引操作得到每一个子空间的像素数目、均值向量和协方差矩阵,从而能够快速地计算出颜色模型.然而在CPU上计算积分图像十分耗时,为此文中提出一种基于GPU的并行算法快速计算积分图像.该并行算法在显卡的GPU上创建3个线程网格,分别顺序执行3个Kernel函数,依次完成创建原始积分图像以及对它的行和列执行前缀求和算法的任务.同传统的基于直方图的粒子滤波器算法相比,新算法每帧平均跟踪时间显著减少,同时跟踪准确性和鲁棒性都有较大提高.
The traditional histogram based particle filter often has to compromise between accurate representation of color distribution and computational efficiency, which affects the performance of the tracking algorithm or even results in tracking failures. To address this problem, the paper presents a novel color based particle filter algorithm for object tracking. The proposed algorithm utilizes a model based on adaptive partition of color space, which can represent accurately the color distribution of the object with smaller number of subspaces. The paper proposes extended integral images, by which the pixel number, mean vector and covariance matrix of each subspace can be obtained in simple array read operations that results in fast computation of the color model. The construction of the proposed integral images on CPU is, however, time-consuming, thus this paper proposes a GPU based parallel algorithm for fast computation of the integral images. The parallel algorithm consists of three thread grids respectively executing three Kernel functions with GPU on the video card, which sequentially builds the raw integral images, performs prefix sum with respect to rows and then with respect to columns of the original integral images. Compared to the traditional histogram based particle filter algorithm, the proposed one has much shorter tracking time, and in the meantime, attains improved tracking accuracy and robustness.