Last active
June 4, 2016 15:16
-
-
Save pmbaumgartner/f13407b5875c5330ae3ce2e2c264fa2e to your computer and use it in GitHub Desktop.
opencv setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JOBS=`lscpu | awk ' /CPU\(s\):/ {print $2}' | head -n1` # Sets the amount of jobs when compiling to the detected amount of cores | |
echo "Now downloading OpenCV from github..." | |
git clone https://github.com/Itseez/opencv.git | |
git clone https://github.com/Itseez/opencv_contrib.git | |
cd opencv | |
mkdir build | |
cd build | |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules .. | |
echo "Done, now compiling. This might take very long..." | |
make -j $JOBS | |
sudo make install | |
# https://www.raspberrypi.org/forums/viewtopic.php?t=78804&p=560523 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment