Installing OpenCV on ubuntu

Lets get it started,..

Step 1.  Please install file dependencies required from OpenCV, just run the following commands  see below :

sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev 
pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev 
libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev
libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev
libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev
libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip

Step2. Download Open Cv 3.0 from official opencv, for ubuntu just copy and paste command below :

mkdir opencv    //this command for create directory
cd opencv       // go to directory opencv after create
wget -O   // this command for download repo using wget
unzip    /// exstrack file if you don't have unzip just type apt-get install zip

step3. : Install OpenCV

cd opencv-3.0.0-alpha
mkdir build
cd build
make -j $(nproc)
sudo make install

step4. :Finishing installation

How to get OpenCV working properly on your computer, we need to tell Ubuntu:

sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/'
sudo ldconfig

step5. :Testing

For testing opencv running as well on your machine type python  an then type import cv2

see Fig. Below :

source :



Be the first to comment

Leave a Reply

Your email address will not be published.