All Projects → Tes3awy → Opencv 3.2.0 Compiling On Raspberry Pi

Tes3awy / Opencv 3.2.0 Compiling On Raspberry Pi

Licence: agpl-3.0
Download, Compile, Build, and Install OpenCV 3.2.0 with Extra Modules on RPI running Jessie

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Opencv 3.2.0 Compiling On Raspberry Pi

Gassistpi
Google Assistant for Single Board Computers
Stars: ✭ 911 (+1301.54%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Openvoiceos
OpenVoiceOS is a minimalistic linux OS bringing the open source voice assistant Mycroft A.I. to embbeded, low-spec headless and/or small (touch)screen devices.
Stars: ✭ 64 (-1.54%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Rpi gpio
Ruby conversion of RPi.GPIO Python module
Stars: ✭ 185 (+184.62%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Enclosure Picroft
Mycroft interface for Raspberry Pi environment
Stars: ✭ 649 (+898.46%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Repo 2018
Deep Learning Summer School + Tensorflow + OpenCV cascade training + YOLO + COCO + CycleGAN + AWS EC2 Setup + AWS IoT Project + AWS SageMaker + AWS API Gateway + Raspberry Pi3 Ubuntu Core
Stars: ✭ 163 (+150.77%)
Mutual labels:  raspberry-pi, raspberry-pi-3, opencv
Raspberrypi tempmon
Raspberry pi CPU temperature monitor with many functions such as logging, GPIO output, graphing, email, alarm, notifications and stress testing. Python 3.
Stars: ✭ 52 (-20%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Rpi Battery Monitor
Monitor battery voltage from a Raspberry Pi
Stars: ✭ 51 (-21.54%)
Mutual labels:  raspberry-pi, raspberry-pi-3, rpi
Raspberrypipkg
DEPRECATED - DO NOT USE | Go here instead ->
Stars: ✭ 758 (+1066.15%)
Mutual labels:  raspberry-pi-3, rpi
Gentoo On Rpi 64bit
Bootable 64-bit Gentoo image for the Raspberry Pi4B, 3B & 3B+, with Linux 5.4, OpenRC, Xfce4, VC4/V3D, camera and h/w codec support, weekly-autobuild binhost
Stars: ✭ 831 (+1178.46%)
Mutual labels:  raspberry-pi, rpi
Facerec Lock
Face recognition to control servo lock using Raspberry Pi and OpenCV
Stars: ✭ 7 (-89.23%)
Mutual labels:  raspberry-pi, opencv
Homebridge Raspbian Image
Official Homebridge Raspberry Pi Image based on Raspbian Lite.
Stars: ✭ 534 (+721.54%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Raspberryrobot
基于树莓派的智能机器人
Stars: ✭ 11 (-83.08%)
Mutual labels:  raspberry-pi, opencv
Woa Installer Rpi
This repository was deprecated, use:
Stars: ✭ 865 (+1230.77%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Ubuntu64 Rpi
适用于树莓派3b/3b+的64位系统.
Stars: ✭ 652 (+903.08%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Fotobox
Python based photo-booth script for Raspberry Pi and RPi Camera
Stars: ✭ 22 (-66.15%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Raspberryio
The Raspberry Pi's IO Functionality in an easy-to-use API for Mono/.NET/C#
Stars: ✭ 593 (+812.31%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Fiscalberry
[JSON ↔ HW] Connect things using JSON API with the fiscalberry websocket server interact easily with any kind of Hardware. Another IoT solution...
Stars: ✭ 44 (-32.31%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Embedio
A tiny, cross-platform, module based web server for .NET
Stars: ✭ 1,007 (+1449.23%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Pi Camera In A Box
Stream your Raspberry Pi Camera Module directly to your web browser
Stars: ✭ 49 (-24.62%)
Mutual labels:  raspberry-pi, raspberry-pi-3
Pi Timolo
Raspberry PI-TIMOLO ( PI-TImelapse, MOtion, LOwLight ) uses RPI picamera and OpenCV for Remote Headless Security Monitoring using Motion Tracking, Rclone Auto Sync files with remote storage services. Auto Twilight Transitions and Low Light Camera Settings. Panoramic images using PanTiltHat and More. This project is featured on GitHub Awesome software.
Stars: ✭ 441 (+578.46%)
Mutual labels:  raspberry-pi, opencv

Compile OpenCV 3.2.0 + OpenCV Contrib for Python on Raspberry Pi

I assume you have downloaded Raspbian and installed it on your Pi. Also I assume your RPi is running and functioning perfectly.

Make sure you have extended your disk before performing any step from below.

Step 0:

If you have problems related to low RAM you can follow these points, otherwise you can go to step 1.

Disable swap service

$ sudo dphys-swapfile swapoff

Edit the swap file

As root, edit the file /etc/dphys-swapfile and modify the variable CONF_SWAPSIZE (The size here is in MB):

$ CONF_SWAPSIZE = 2048

To modify the swap file, edit the variable CONF_SWAPFILE, and run dphys-swapfile setup which will create and initialize the file.

Restart the swap service

$ sudo dphys-swapfile swapon

Step 1:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo rpi-update (can be skipped, but recommended) (don't do it if you will use the RPI cam as recommended by official RPI Website)
$ sudo reboot now

Step 2:

$ sudo apt-get install build-essential cmake pkg-config

Step 3:

$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev

Step 4:

$ sudo apt-get install libgtk2.0-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libv4l-0 libv4l-dev

Step 5:

$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev

Step 6:

$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install python-numpy python-scipy python-matplotlib
$ sudo apt-get install default-jdk ant
$ sudo apt-get install libgtkglext1-dev
$ sudo apt-get install v4l-utils

Step 7:

install pip

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py

Step 8:

$ sudo apt-get install python2.7-dev

Step 9:

$ sudo pip install numpy

Step 10:

Download OpenCV 3.2.0 and unpack it

$ cd ~
$ wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.2.0.zip
$ unzip opencv.zip

Contrib Libraries (Non-free Modules)

$ wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.2.0.zip
$ unzip opencv_contrib.zip

Step 11:

preparing the build

$ cd ~/opencv-3.2.0/
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
	-D CMAKE_INSTALL_PREFIX=/usr/local \
	-D INSTALL_C_EXAMPLES=OFF \
	-D INSTALL_PYTHON_EXAMPLES=ON \
	-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules \
	-D BUILD_EXAMPLES=ON \
	-D ENABLE_NEON=ON ..

Step 12:

takes about 3.5 to 4 hours

$ sudo make -j3 (I prefer -j3, because it doesn't use all the cores so it keeps the RasPi cool enough)

# If any errors occurs and the process fails to continue, execute

$ sudo make clean

# Sometimes using multicores can cause problems, so if you face any problems just execute 
$ sudo make
# but keep in mind that it will take much longer so be patient as much as you can and grab your cup of tea or coffee :p.

Step 13:

installing the build prepared in step 11

$ sudo make install
$ sudo ldconfig

Step 14:

$ sudo nano /etc/ld.so.conf.d/opencv.conf

opencv.conf will be blank, add the following line, then save and exit nano:

/usr/local/lib          # enter this in opencv.conf, NOT at the command line
			(leave a blank line at the end of opencv.conf)

save opencv.conf by pressing ctrl+o get back again to the command line by pressing ctrl+x

$ sudo ldconfig

$ sudo nano /etc/bash.bashrc

add the following lines at the bottom of bash.bashrc

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig       
export PKG_CONFIG_PATH

(leave a blank line at the end of bash.bashrc) save bash.bashrc changes (ctrl+o), then back at the command line (ctrl+x),

Step 15:

Reboot

$ sudo shutdown -r now

Step 16 Last Step:

verifying the installation

Open Python 2 IDLE on RasPi Type the following lines in the python shell:

>>> import cv2
>>> print cv2.__version__

the following line should appear then:

'3.2.0'

Done

TODO

  • [ ] Connect to RPi without internet connection.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].