I am looking for a tracking algorithm which can even handle deformation of the object i.e. if the object changes its size it should stick to it as if its the same object and if for some reason the object changes its shape it should again keep on tracking the same object. Plus if the object leaves the field of view the tracking window should also disappear.