Ich habe mal den kommentierten Quellcode vom Trackingdingsbumms hochgeladen:

I got a lot of requests for the matlab source code of my tracking algorithm. As you will see, it is not that complicated. I did not upload the complete source code, because that doesn't make too much sense. My GUI for example, contains a lot of code and it is most likely irrelevant to most of you. I left out the calculations of the different parameters for my PID control loop too, they will make things appear more complicated than they really are.

Here comes the code:
http://www.villalachouette.de/willia...ertracking.htm

If you have questions, I would suggest that you put them into the comments for this post. Doing so, more people might benefit from it.