The traditional mean shift algorithm used fixed kernels or symmetric kernel function, which will cause the target tracking lost or failure. The target tracking algorithm based on mean shift with adaptive bandwidth was proposed. Firstly, the signed distance constraint function was introduced to produce the anisotropic kernel function based on signed distance kernel function. This anisotropic kernel function satisfies that the value of the region function outside the target is zero, which provides accurate tracking window for the target tracking. Secondly, calculate the mean shift window center of anisotropic kernel function template, the theory basis is the sum of vector weights from the sample point in the tracking window to the center point is zero. Thirdly, anisotropic kernel function templates adaptive update implementation by similarity threshold to limit the change of the template between two sequential pictures, so as to realize real-time precise tracking. Finally, the contrast experimental results show that our algorithm has good accuracy and high real time.