-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcv_final.sh
More file actions
37 lines (36 loc) · 1.12 KB
/
cv_final.sh
File metadata and controls
37 lines (36 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libatlas-base-dev gfortran
cd ~/Desktop
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo apt-get install python3.4-dev
pip3 install numpy
cd ~/Desktop
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 3.0.0
cd ~/Desktop
git clone https://github.com/Itseez/opencv_contrib.git
cd opencv_contrib
git checkout 3.0.0
cd ~/Desktop/opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..
make -j4
sudo make install
sudo ldconfig
ls -l /usr/local/lib/python3.4/dist-packages/
cd /usr/local/lib/python3.4/dist-packages/
sudo mv cv2.cpython-34m.so cv2.so
#ln -s /usr/local/lib/python3.4/site-packages/cv2.so cv2.so