Skip to content

Installation

Yossi edited this page Oct 30, 2016 · 7 revisions

Step 1

Make sure everything is up to date

$ sudo apt-get update
$ sudo apt-get upgrade

Step 2

$ sudo apt-get install build-essential

Step 3

$ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libjasper-dev python2.7-dev

Step 4 - Install pip

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

Step 5 - Install Numpy

pip install numpy

Step 5 - Download and install OpenCV

$ cd ~
$ git clone https://github.com/Itseez/opencv.git
$ cd opencv
$ git checkout 3.1.0

Build

$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local ..

Make

$ make -j4

4 is the number of available cores on your processor

Install

$ sudo make install
$ sudo ldconfig

Test if OpenCV is installed on your system

$ python
>>> import cv2
>>>> cv2.__version__
'3.1.0'

Step 6 - Install Cardigan

$ cd ~
$ git clone https://github.com/CardiganCam/Cardigan.git
$ cd Cardigan

Run Cardigan

python ~/Cardigan/main.py

make it run on startup

$ sudo nano /etc/rc.local

Add this 2 lines

node /home/Dride/dride-ws/server/app.js
python /home/Dride/mainPi.py