Skip to content

Instantly share code, notes, and snippets.

@brunoocasali
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunoocasali/653f0f207278d49c0536 to your computer and use it in GitHub Desktop.
Save brunoocasali/653f0f207278d49c0536 to your computer and use it in GitHub Desktop.
Installing OpenCV at Linux

OpenCV at Linux - How to install?

First of all you'll need to install this:

[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

After this, download the 100MB+ source from GitHub:

cd ~/<my_working _directory>
git clone https://github.com/Itseez/opencv.git

Now enter in directory downloaded (this will be the directory, that you will install)

cd opencv/
mkdir release
cd release/

And compile sources:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

Enter in source, and... :

make              # and go get some coffee :P
sudo make install # another coffee :P

reference - docs

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