I have searched the net for the process but have not yet found any useful help for the query. Following are the links,
http://www.linuxcircle.com/2015/05/18/open-computer-vision-opencv3-with-python-3-on-raspberry-pi-2/
http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/
Many of these guides make use of the Virtual Environments which I do not wish to use due to unnecessary complications. Please post step by step guide in simple language for this.
3 Answers 3
@Ashwin Pajanakr
I too have struggled getting OpenCV3 installed on my system. Fortunately, I found this youtube video to be extremely helpful.
https://www.youtube.com/watch?v=6j-Wy9j0TCs
I do not know for sure if it is specific to Python 3. But I do know that he was using python to test it out.
When you get to the point of compiling OpenCV from the source code, I would suggest using the cmake-gui
sudo apt-get install cmake-gui
The gui will allow you to see and enable/disable - graphically - all of the modules associated with OpenCV.
When configuring on the RPi, make sure you uncheck any references to cuda
. This is the only REQUIRED step for you to take to get the library compiled. But there are lots of other things you can add on.
NOTE: when you run make
It will take FOREVER on your PI. I would suggest running:
sudo make -j3
So that you run the compilation using 3 cores instead of 1. This will cut down the compilation from about 3-4 hours down to around 1-2.
I hope this helps...
Installing OpenCV is pretty much straightforward process, it just take a lot of time. I googled a lot for the last few months to make a cheat sheet, and I made one. You can download my cheat sheet and try it out. I don't like Virtual Environment as well. It's better, though. It isolates your installation from getting later errors when using after installation. I recommend you install OpenCV for Python 2 not 3. If you want for Python 3 just change the appropriate lines in the cheat sheet. I also recommend that you stick to the cheat sheet especially in step 12. Sometime when you use all the processor cores the process fails to continue. You should always use a 2A, 5V Adapter. your Pi 3 Peripherals are current hungry, and if current is not sufficient, the Pi shuts down automatically, as it's short-circuit protected.
Here is how I installed opencv2.4 on raspberry pi 3, raspbian OS. This doesn't need building the source code.
1) Make sure you don't have multiple opencv versions by following command.
sudo dpkg --get-selections | grep opencv
If above shows an output uninstalled it first as follows. If it gives empty output you may don't have other opencv versions.
dpkg -r opencv3.1
"opencv3.1" should be replaced by your version.
2) Then follow these steps to install "python-opencv"
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-setuptools
sudo apt-get install python-pip
sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame
this blog explains installation process