In the beginning I tried to generalize motion tracking system. Previously I tried to detect a colored object and rotate the camera accordingly. The fundamental concept of operation is to detect movement by detecting changes between two consecutive frames. The camera rotates according to the movement and tries to keep the moving object in frame.
It uses OpenCV with Python bindings to run the computer vision routines. The whole computer vision subsystem contains image processing followed by contour detection. The camera rotation platform uses a stepper motor that is controlled by a Atmel ATmega8L micro-controller which is connected to the computer with a Bluetooth Serial modem.
There is a lot of room for improvement. I will continue to work on this.
This was my B. Tech Final Year Project.
All codes are on http://github.com/rivalslayer/MotionDetection including the AVR Studio Project files required to compile and program the micro-controller that is responsible for interfacing the camera rotation with the computer. The complete report is also here.