Installing OpenCV 3.0.0 alpha in Ubuntu

This post is intended to aid linux enthusiasts to install the latest OpenCV version 3.0.0 on their computer. The method is tested in Ubuntu 12.04 desktop and can also be applied to Mint and Debian users. Eventhough the method mentioned below will overwrite any existing OpenCV installation on your system, it is advised to remove any previous installation.



OpenCV in Beagleboard, Embedded Linux


Open a terminal and type the following to update the source list. And install some packages required.

sudo apt-get update
sudo apt-get upgrade
apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev default-jdk ant libvtk5-qt4-dev

For downloading the source use the following command

cd ~

Download the file Opencv Version 3.0-Alpha for Linux/Mac from 
Decompress the file obtained above using the below command.

Now all we need is to build the OpenCV for your system. For this use the following commands

cd opencv-3.0.0-alpha
mkdir build && cd build

Configure with additional options


Note: Above command should not return any error. If returned with error try disabling some options eg: BUILD_EXAMPLES=OFF

If user need to work with Microsoft Kinect sensor then OpenNI should be installed(please follow our previous post for this) and should configure cmake with the following command

ccmake ..

should configure openni by changing WITH_OPENNI=ON and configure with the correct path to openni. Usually it should be /usr/include/ni
Then configure and generate the cmake file.

sudo make

Finally install the build files to your system.

sudo make install

For testing the installation try to compile and run a program as in our previous post.

2 thoughts on “Installing OpenCV 3.0.0 alpha in Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s