3

I have tried to install OpenCv onto my Raspberry pi many times and some of the times it has worked and some of the times it hasn't worked. When it works I try to do a simple program with my raspi-cam and the window that displays the camera's view is so small that you can't see anything and if you try to drag the window out it doesn't do anything.

2 Answers 2

4

To easily install OpenCV so that it works.

sudo apt-get update

sudo apt-get install python-opencv

The rest is down to reading and understanding the documentation so perhaps add

sudo apt-get install opencv-doc

3
  • Not sure why you think OP is using Python? Commented Jun 13, 2016 at 20:09
  • @MarkSetchell I'm not assuming the OP is using Python. I just felt that the python-opencv package was the simplest way to make sure the needed libraries were dragged in.
    – joan
    Commented Jun 13, 2016 at 20:26
  • yeah I'm using python on my raspberry pi so i will give this a try Commented Aug 15, 2016 at 15:08
1

There is no easiest way or the shortest way in installing OpenCv in raspberry.. You have to do it with the conventional method only..

Step 1: Go openCv site opencv.org and download the latest version for Linux arch. You could possibly get a package downloaded.

Step 2: Extract it into a separate folder. Initially there would be two folders , one would be Source and the other one I barely remember.

Step 3: Create a new folder called release in the OpenCv directory.

Step 4: Go to terminal and type sudo apt-get cmake-gui. This a software used to build up the libraries of OpenCv.

Step 5: Cmake-gui application will be present on the start command. So once it opened, it will ask for the directories.. For the source directory select the source folder in the OpenCv installation directory. For the build , select the release folder that you have created in the OpenCv installation directory.

Step 6: Then click the configure button.It will ask for build type select the Linux archi. First time once the configuration finished the list view will be red. Again click the configure button. This time the list view will white.. Then click the generate button.

Step 7: Once the generate finished. Go to terminal, navigate to release folder in the OpenCv installation directory. Type make and press enter. It take quite some time to build the libraries of OpenCv..once the 100% completed.. type make install or make-install and press enter. Once it done , OpenCv is successfully installed.

2
  • If you are using it with Python .. Then let me know in the comment Commented Jun 14, 2016 at 7:54
  • yeah I'm planning to use it on my Raspberry pi with python Commented Aug 15, 2016 at 15:07

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.