Clean template matching and meanshift.