Skip to content

Commit d23990d

Browse files
authored
Merge pull request #7 from p0wdrdotcom/master
Update to opencv 3.2 and speed up the build
2 parents 0809412 + b4f7fd0 commit d23990d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: build.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ mkdir -p lambda-package/cv2 build/numpy
99
pip install --install-option="--prefix=$PWD/build/numpy" numpy
1010
cp -rf build/numpy/lib64/python2.7/site-packages/numpy lambda-package
1111

12-
# Build OpenCV 3.1
12+
# Build OpenCV 3.2
1313
(
1414
NUMPY=$PWD/lambda-package/numpy/core/include
1515
cd build
1616
git clone https://github.com/Itseez/opencv.git
1717
cd opencv
18-
git checkout 3.1.0
18+
git checkout 3.2.0
1919
cmake \
2020
-D CMAKE_BUILD_TYPE=RELEASE \
2121
-D WITH_TBB=ON \
@@ -28,12 +28,14 @@ cp -rf build/numpy/lib64/python2.7/site-packages/numpy lambda-package
2828
-D ENABLE_POPCNT=ON \
2929
-D ENABLE_FAST_MATH=ON \
3030
-D BUILD_EXAMPLES=OFF \
31+
-D BUILD_TESTS=OFF \
32+
-D BUILD_PERF_TESTS=OFF \
3133
-D PYTHON2_NUMPY_INCLUDE_DIRS="$NUMPY" \
3234
.
33-
make
35+
make -j`cat /proc/cpuinfo | grep MHz | wc -l`
3436
)
3537
cp build/opencv/lib/cv2.so lambda-package/cv2/__init__.so
36-
cp -L build/opencv/lib/*.so.3.1 lambda-package/cv2
38+
cp -L build/opencv/lib/*.so.3.2 lambda-package/cv2
3739
strip --strip-all lambda-package/cv2/*
3840
chrpath -r '$ORIGIN' lambda-package/cv2/__init__.so
3941
touch lambda-package/cv2/__init__.py

0 commit comments

Comments
 (0)