1

I need some help to find a tutorial or help installing OpenCV-3.0 on my raspberry pi running debian wheezy. The OS was already pre-installed on the micro-sd. I followed some guides online but it seems they are outdated and usually get an error message when running 'make' command at about 56% after several hours of installing. Guide that I followed but didn't work: http://robertcastle.com/2014/02/installing-opencv-on-a-raspberry-pi/


P.S. I am trying to install OpenCV C++ version

  • What error message do you get? – Jacobm001 Jun 29 '15 at 3:08
  • Interestingly I was able to compile opencv 3.0.0 successfully on my rpi 2 without TBB support. Can you let us know which cmake flags are you using ? It would help us to understand what could be wrong in your case ? – dhruvvyas90 Jun 29 '15 at 7:33
  • I followed the guide on the link. sudo apt-get -y install build-essential cmake cmake-curses-guicmake @dastaan – saqehi Jun 29 '15 at 17:58
  • I wasn't able to see the 'make' error again as I succesfully installed version 2.4.9. I am interested to know how you were able to install v3.0 @dastaan – saqehi Jun 29 '15 at 18:29
  • @saqehi Like I said in my answer, I was having problems (and still having) in compiling 3.0.0 if I use -D BUILD_TBB=ON -D WITH_TBB=ON. When I tried compiling without these flags, it compiled fine. – dhruvvyas90 Jun 30 '15 at 0:02
2

If you just want to use OpenCV and can compromise with version, you can probably install it from the official Raspbian repository by following apt-get command. This is the easiest way if you don't want to deal with compilation errors and don't want to spend time compiling it on your own which takes about 10 hours on Rpi 1 and 2.5 hours on Rpi 2.

sudo apt-get install libopencv-dev python-opencv

This should install all the dependencies along with OpenCV 2.4.1 with Python support.

If you have an Rpi 2 and want to use TBB to gain advantage of multiple cores of Rpi 2, I would advice you to grab the source of 2.4.9 and build it with -D BUILD_TBB=ON -D WITH_TBB=ON cmake flags along with other flags as per your requirement. Because libtbb-dev is not available under official Raspbian-wheezy repository.

Hope it helps.

  • I am installing it the long route right now. I hope I don't get any errors this time around. Otherwise, I will try your approach. If I install with the Python support will still have the C++ full support as well? – saqehi Jun 29 '15 at 5:13
  • @saqehi Yes. It will have C++ support. :) – dhruvvyas90 Jun 29 '15 at 5:36
  • I was able to install the 2.4.9 with no inconvenience. libtbb was giving me troubles indeed as it is not available. I compiled and it look a long time as you specified. – saqehi Jun 29 '15 at 18:05
  • @saqehi If you're compiling it on Rpi 2, you can make use of make -j4 instead of just make. It will run 4 threads while compiling and hence speed up your compilation upto 4 times. – dhruvvyas90 Jun 30 '15 at 7:42
  • @saqehi You can mark this as a correct answer if It solved your problem. :) – dhruvvyas90 Jul 1 '15 at 13:44

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.