Last active
January 21, 2019 18:53
-
-
Save korjaa/d2452810c9c153f4b79396c2c97c20a0 to your computer and use it in GitHub Desktop.
Installing OpenCV to Windows Bash
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
# http://www.harrysmemo.com/post/152444507227/installing-opencv3-on-bash-on-windows | |
sudo apt-get update -y | |
sudo apt-get install -y build-essential cmake | |
sudo apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev | |
sudo apt-get install -y libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev yasm libopencore-amrnb-dev libopencore-amrwb-dev libv4l-dev libxine2-dev | |
sudo apt-get install -y libtbb-dev libeigen3-dev | |
git clone https://github.com/opencv/opencv.git | |
cd opencv | |
mkdir build | |
cd build | |
# Note, no QT enabled compared to official docs | |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_FFMPEG=OFF -D WITH_OPENGL=ON -D BUILD_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON .. | |
make -j4 | |
sudo make install | |
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' | |
sudo ldconfig | |
# Some library workaround | |
sudo apt-get install prelink | |
sudeo execstack -c /usr/local/lib/*opencv*.so* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment