├── LICENSE ├── Older Releases ├── opencv-3.1.0-armhf.deb └── opencv3.1_armhf.deb ├── README.md ├── latest-OpenCV.deb └── lazy_install.sh /LICENSE: -------------------------------------------------------------------------------- 1 | License Agreement 2 | For Open Source Computer Vision Library 3 | (3-clause BSD License) 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 7 | Neither the names of the copyright holders nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission. 8 | This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of 9 | the use of this software, even if advised of the possibility of such damage. 10 | -------------------------------------------------------------------------------- /Older Releases/opencv-3.1.0-armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jabelone/OpenCV-for-Pi/d4253fcd47f0f473a0f319d6895c6b7fa11144e2/Older Releases/opencv-3.1.0-armhf.deb -------------------------------------------------------------------------------- /Older Releases/opencv3.1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jabelone/OpenCV-for-Pi/d4253fcd47f0f473a0f319d6895c6b7fa11144e2/Older Releases/opencv3.1_armhf.deb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenCV for Pi 2 | A pre-compiled binary of OpenCV for the Raspberry Pi. It is available in a ".deb" package and will save you countless hours not having to compile it yourself. This may or may not stay updated as I have to manually compile each version. I will try to make available most major versions. This was compiled on a Raspberry Pi 3 Model B+ running raspbian jessie. This version was built with TBB which enables automagic multithreading in many OpenCV algorithms. 3 | 4 | # Super Lazy Version 5 | ``` 6 | curl -sSf https://github.com/jabelone/OpenCV-for-Pi/raw/master/lazy_install.sh | sh 7 | ``` 8 | Remember to check the script before piping it into your bash! ¯\\_(ツ)_/¯ 9 | 10 | # Instructions 11 | 0) Always good practice to update everything before you install stuff: 12 | ``` 13 | sudo apt-get update 14 | sudo apt-get upgrade 15 | ``` 16 | 1) We need to install some packages that allow OpenCV to process images: 17 | ``` 18 | sudo apt-get install libtiff5-dev libjasper-dev libpng12-dev 19 | ``` 20 | If you get an error about libjpeg-dev try installing this first: 21 | ``` 22 | sudo apt-get install libjpeg-dev 23 | ``` 24 | 2) We need to install some packages that allow OpenCV to process videos: 25 | ``` 26 | sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev 27 | ``` 28 | 3) We need to install the GTK library for some GUI stuff like viewing images. 29 | ``` 30 | sudo apt-get install libgtk2.0-dev 31 | ``` 32 | 4) We need to install some other packages for various operations in OpenCV: 33 | ``` 34 | sudo apt-get install libatlas-base-dev gfortran 35 | ``` 36 | 5) We need to install pip if you haven't done so in the past: 37 | ``` 38 | wget https://bootstrap.pypa.io/get-pip.py 39 | sudo python get-pip.py 40 | ``` 41 | 6) Now we can install NumPy - a python library for maths stuff - needed for maths stuff. 42 | ``` 43 | sudo pip install numpy 44 | ``` 45 | 7) Download and install the file from this repo called "latest-OpenCV.deb". 46 | ``` 47 | wget "https://github.com/jabelone/OpenCV-for-Pi/raw/master/latest-OpenCV.deb" 48 | sudo dpkg -i latest-OpenCV.deb 49 | ``` 50 | 8) Test it installed correctly by doing the following: 51 | Open a python shell 52 | ``` 53 | python 54 | ``` 55 | Run the following commands, it should return the same version you installed. 56 | ``` 57 | import cv2 58 | cv2.__version__ 59 | ``` 60 | 61 | 9) Have fun with OpenCV and open an issue on GitHub if you have any problems or I forget to update it. [pyimagesearch](http://www.pyimagesearch.com/) is a great resource to get started! 62 | -------------------------------------------------------------------------------- /latest-OpenCV.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jabelone/OpenCV-for-Pi/d4253fcd47f0f473a0f319d6895c6b7fa11144e2/latest-OpenCV.deb -------------------------------------------------------------------------------- /lazy_install.sh: -------------------------------------------------------------------------------- 1 | sudo apt-get update 2 | sudo apt-get upgrade -y 3 | sudo apt-get install libtiff5-dev libjasper-dev libpng12-dev libjpeg-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk2.0-dev libatlas-base-dev gfortran -y 4 | 5 | wget https://bootstrap.pypa.io/get-pip.py 6 | sudo python get-pip.py 7 | 8 | sudo pip install numpy 9 | 10 | wget "https://github.com/jabelone/OpenCV-for-Pi/raw/master/latest-OpenCV.deb" 11 | sudo dpkg -i latest-OpenCV.deb 12 | --------------------------------------------------------------------------------