Skip to content

Instantly share code, notes, and snippets.

@jonatw
Last active September 1, 2016 04:58
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save jonatw/5524844 to your computer and use it in GitHub Desktop.
Save jonatw/5524844 to your computer and use it in GitHub Desktop.
install opencv on debian, tested on raspberry pi (debian wheezy)it takes "long time" for compiling opencv library. please be patient.Reference: http://opencv.willowgarage.com/wiki/InstallGuide_Linux
#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
@damonmaria
Copy link

Essential is spelt wrong the first 2 times so the package isn't found.

install esseintal packages for opencv

apt-get install build-essentail

@TelmoM
Copy link

TelmoM commented Aug 14, 2013

You should use -y option like: apt-get -y install ...
This way theres no need to make the confirms manually.

@jonatw
Copy link
Author

jonatw commented Feb 27, 2014

@damonmaria fixed, thanks for your help.
@TelmoM , thanks for your advise, i put -y into the scripts

@izzy9
Copy link

izzy9 commented May 31, 2014

Is it really working on raspberry pi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment