Skip to content

Instantly share code, notes, and snippets.

@hirbod
Forked from jonatw/install_opencv_debian.sh
Last active August 29, 2015 14:06
Show Gist options
  • Save hirbod/40dbd7f9afca2d474839 to your computer and use it in GitHub Desktop.
Save hirbod/40dbd7f9afca2d474839 to your computer and use it in GitHub Desktop.
#install esseintal packages for opencv
apt-get -y install build-essential
apt-get -y install cmake
apt-get -y install pkg-config
apt-get -y install libgtk2.0-dev libgtk2.0
apt-get -y install zlib1g-dev
apt-get -y install libpng-dev
apt-get -y install libjpeg-dev
apt-get -y install libtiff-dev
apt-get -y install libjasper-dev
apt-get -y install libavcodec-dev
apt-get -y install swig
#install xserver and x11 util for remote X environment usage (optional)
apt-get -y install xserver-xorg-core xserver x11-xserver-utils
#download opencv and decompress it
## please use wget to download it on sourceforge
cd ~
tar -zxvf opencv-2.4.5.tar.gz
cd opencv-2.4.5/
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.5/release/bin
./opencv_test_core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment