I'm playing around with motion detection through a webcam connected to RaspberryPi using OpenCV and cvBlob in C++. I want to kick it up a notch and make a robot that detects and tracks movement driving towards it and turning left/ring to keep the moving object in the center of view. But I quickly hit a roadblock - I cannot find any materials about motion tracking with an active, moving camera that are more on an amateur level. I found only academic papers e.g. on optical flow. Sure, I can try to get through one of them, if I knew that's the algorithm that suits my needs, but going through all the papers and choosing the one among them is beyond my level of understanding.

So I would be grateful, If someone could point me to the simplest possible method (after all, RaspberryPi has quite limited resources) that would allow me to determine if the selected blob (I plan to track the movement of the biggest blob exceeding a set size) moves on the horizontal axis, compared to the movement of the background caused by the movement of the robot on which the camera is mounted The movement in the vertical axis is irrelevant in this application.


Opencv seems like an obvious solution but getting it to work is a PAIN. I found another program called motion but I have not had the chance to sit down and try to use it like I have on opencv. I have also found several youtube videos where people claim to be using the Pi to track motion but unfortunately they do not provide any additional information.

  • 2
    motion is more of a security app than real-time tracking. I use it to detect motion and capture video whenever something goes into monitored areas. Do not see how it can be applied to this problem
    – Tevo D
    Jun 23 '13 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.