Installing OpenCV 2.4.8

The following post will help you download and install OpenCV 2.4.8 on Ubuntu14.04/13.10 without any difficulty or much indulgence , except for a few times when it asks for your password.

Just copy the following code and paste it in an editor(e.g. gedit) of your choice and save it under the name

version="$(wget -q -O - | egrep -m1 -o '\"[0-9](\.[0-9])+' | cut -c2-)"
echo "Installing OpenCV" $version
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get -qq remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils ffmpeg
echo "Downloading OpenCV" $version
wget -O OpenCV-$$version/opencv-"$version".zip/download
echo "Installing OpenCV" $version
unzip OpenCV-$
cd opencv-$version
mkdir build
cd build
make -j2
sudo make install
sudo sh -c 'echo "/usr/local/lib" > /etc/'
sudo ldconfig
echo "OpenCV" $version "ready to be used"

Now using your terminal go to the directory where you have saved
and type:

chmod +x

If nothing goes wrong OpenCV is ready to be used!

OpenCV with Python

I have started to learn Open-CV with Python. As I progress , I will keep on posting regularly stuff that I encounter along the way and try to solve and post about any general and specific problems faced.

I am working on Ubuntu 14.04 Trusty(beta release) and Open-CV 2.4.8