I successfully installed:


on my pi and compiled "red_object_tracking.cpp".

Code located here: http://cvblob.googlecode.com/svn/trunk/samples/red_object_tracking.cpp

when I executed "./red_object_tracking.c" I see the GUI pop up and I see the first few video frames my webcam captures, however, after 5 seconds it freezes and the frames don't update anymore. The program doesn't crash because when I execute "top" I can see it is using 93% of CPU and like 30% of memory.

When I tried building and executing the same program on my mac it worked perfectly (i.e. the frames were updating and when I placed my red pen in front of the camera it correctly boxed only the red parts within a rectangle.

Does anyone know why it's not working properly on my pi?

I"m running the latest version of Raspbian Wheezy and using Open CV 2.3.1.

1 Answer 1


The Raspberry Pi only has a small fraction of your Mac's performance and since there is no GPU support for OpenCV it might be the case that it is just too slow to perform this task.

Take a look here: Can I use OpenCV?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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