Tracking a given object in a video using template matching