针对连续自适应均值漂移(CAM Shift)目标跟踪算法只适用于特定颜色目标跟踪且容易受到光照变化影响和背景色干扰的缺点,提出了一种改进的CAM Shift目标跟踪算法。该算法采用颜色空间三基色权重直方图建立目标模型,并用目标边缘特征增加目标权重。首先通过颜色空间三基色均匀量化获得特征值,建立基于核函数概率密度估计的目标模型;然后用Sobel算子检测目标边缘特征,结合颜色特征,分别赋予不同的权重投影生成概率密度分布图;最后用MeanShift算法迭代寻找目标,并通过矩运算调整跟踪窗口大小和方向。实验结果表明:该算法可以有效跟踪多色彩目标,并能够抵御一定光照变化和大面积同色干扰的影响。
As well known,the continuously adaptive mean shift(CAM Shift) tracking algorithm is only adapt to the track of special object,and is apt to the effect to light and background color.In order to overcome this shortcoming,an improved CAM Shift tracking algorithm is developed in this paper,in which the target model is established via multidimensional histogram in color space and the target weight is added via edge feature.Firstly,the multidimensional colors are uniformly quantized to attain the eigenvalue,and the target model is established based on the estimate on probability density of kernel function.And then,Sobel operator is utilized to detect the feature of target edge.By combining with color feature,the target probability distribution image is determined via giving their different weights.Finally,the target is searched via Mean Shift algorithm,in which the search window size and orientation are determined by calculating moments.The experiments show that the proposed algorithm can track multi-color target and effectively attenuate the effect of disturbance including light and color.