OpenCV python bindings in cturtle [closed]

asked 2012-05-31 07:01:37 -0500

StFS gravatar image

updated 2014-01-28 17:12:31 -0500

ngrennan gravatar image


I'm trying to get the OpenCV python bindings up and running in CTurtle (on Ubuntu 10.04). I have the ros-cturtle-vision-opencv package installed but that only seems to set up the C++ API correctly.

I see that there is a /opt/ros/cturtle/stacks/vision_opencv/opencv2/opencv/lib/python2.6/site-packages/ directory in the package but that directory is empty.

Now, there is an python-opencv package that I can see in aptitude but as far as I understand, that package depends on the official opencv packages from the Ubuntu repository which means that installing that would result in me having two versions of OpenCV installed (one from the ros package which the C++ stuff would link against and then also the official ones from the Ubuntu repository which should then work for Python). I don't really like that idea! Nevertheless I tried installing it but I still couldn't load the cv module in Python. It turns out that I had to manually add '/usr/share/pyshared/opencv' to my Python path?!

I also found a PPA repository for OpenCV 2.1 ( but basically that has the same problem. It does provide a newer version of OpenCV than the one in the official Ubuntu repository but it's still a different version than the one from the ROS package.

So my question is basically, how can I enable the Python bindings for the OpenCV that comes with ROS CTurtle? In other words, how and with what do I populate the /opt/ros/cturtle/stacks/vision_opencv/opencv2/opencv/lib/python2.6/site-packages/ directory?

Kind regards, Stefán Freyr.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-04-03 15:21:29