Skip to content

Instantly share code, notes, and snippets.

@mvdpoel
Forked from jonatw/install_opencv_debian.sh
Last active August 29, 2015 14:07
Show Gist options
  • Save mvdpoel/c805faaccd0a01424319 to your computer and use it in GitHub Desktop.
Save mvdpoel/c805faaccd0a01424319 to your computer and use it in GitHub Desktop.
#install esseintal packages for opencv
sudo apt-get install -y build-essential cmake pkg-config libgtk2.0-dev libgtk2.0 zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libjasper-dev libavcodec-dev swig
#install xserver and x11 util for remote X environment usage (optional)
# xserver-xorg-core xserver-xorg x11-xserver-utils
#download opencv and decompress it
## please use wget to download it on sourceforge
cd ~
wget http://softlayer-ams.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.9/opencv-2.4.9.zip
unzip opencv-2.4.9.zip
cd opencv-2.4.9/
mkdir release
cd release/
#build and install
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
make install
# re-load ldconfig
ldconfig -v
#check opencv version
pkg-config --modversion opencv
#after install opencv you can execute opencv_test_core to make a simple test
cd ~/opencv-2.4.9/release/bin
./opencv_test_core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment