The invention discloses a Camshift
algorithm for tracking a
centroid correction model on the basis of
Grabcut and an LBP (Local Binary Pattern). A target object is separated from an environment through the constant value enhancement tracking of a video
stream and
Grabcut foreground segmentation to cause the Camshift to obtain a pure
histogram. Meanwhile, a
Kalman filter assists the Camshift to predict a target movement locus. During a tracking period, carrying out LBP transform on an image in a target frame to obtain a template and current LBP
histogram data, a judgment coefficient and a frame body change situation are obtained through comparison, and an S-
Grabcut algorithm is executed if the target object is blocked by an object with a similar color, a
centroid is removed, and normal tracking is continuously carried out. Compared with a traditional Camshift
algorithm, the algorithm disclosed by the invention reduces the interference of
background noise to a large extent, and the problem of quick movement and blocking is solved since the
Kalman filter is added. Meanwhile, interference brought by the blocking of the object with the similar color can be favorably solved by the
centroid correction model. Experiment results indicate that the algorithm has good robustness, meets the requirements of instantaneity and accuracy in tracking and causes the target to be more stably tracked under a complex environment.