An object tracking algorithm combining spatial structure and motion continuity