-
Notifications
You must be signed in to change notification settings - Fork 0
/
opencv-imagemagick
62 lines (58 loc) · 1.22 KB
/
opencv-imagemagick
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apt-get -y update
apt-get -y install \
build-essential \
checkinstall \
cmake \
curl \
git \
wget \
unzip \
python \
python-pip \
python-tk \
python-numpy \
imagemagick \
cmake \
yasm \
gfortran \
libatlas-base-dev \
libgtk2.0-dev pkg-config \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libswscale-dev \
libavcodec-dev \
libavformat-dev
pip install --upgrade pip
pip install \
boto \
cython \
numpy \
scipy \
matplotlib \
scikit-learn \
PyMySQL
git clone https://github.com/Itseez/opencv.git /tmp/opencv && \
cd /tmp/opencv && \
git checkout 3.1.0
git clone https://github.com/Itseez/opencv_contrib.git /tmp/opencv_contrib && \
cd /tmp/opencv_contrib && \
git checkout 3.1.0
cd /tmp/opencv && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D PYTHON2_EXECUTABLE=/usr/bin/python \
-D PYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON \
.. && \
make -j2 && \
make install