Tracing method and device based on target space and time consistency and local sparse representation

The invention discloses a tracing method and device based on target space and time consistency and local sparse representation. The method includes the steps that first, a positive sample set and a candidate sample set are acquired according to a known tracing result; second, samples are blocked through fixing grids and provided with marks; third, sparse coding is performed on local sample image blocks, and the average value of codes of the positive sample image blocks with the same marks is calculated; fourth, target space and time consistency measurement is defined, and all the candidate samples are graded according to the measurement; fifth, candidate particles with the highest space and time consistency grade are selected from the candidate sample set and serve as tracing targets. According to the method and device, by calculating the space and time consistency of the samples, the shielding problem is effectively solved, and tracing accuracy is improved. Besides, through local image block sparse representation, influences of outside illumination changes and target posture changes on tracing are eliminated, and target tracing efficiency is also improved.