Add moving image to videos

Hey there,

let’s say I add an image to an existing video. There’s a good tutorial on this to start with when searching for AVFoundation. Cool stuff. But what if the image is supposed to cover a moving object in the video? How to achieve the best looking covering on top of the object? Should I extract the coordinates of the moving parts in the video first and apply a simple frame animation to the image according to the coordinates then? Or is there a better way, like defining an anchor point which the image view sticks to?

Thanks for your input.