First, download the latest version of Open-CV from here : http://sourceforge.net/projects/opencvlibrary/files/latest/download
Now install the dependencies:
sudo apt-get install build-essential
sudo apt-get install cmake
Use Synaptic Package Manager to install these packages:
Python,Python-dev, Numpy, libavcodec-dev, libavformat-dev, libswscale-dev
Optional packages: libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev,lib1394 2.x
Now extract the opencv zip file and go to the extracted directory.
Next create a build directory and go into that:
mkdir build cd build
Next execute :
cmake ../ sudo make sudo make install
If everything is done correctly Open-CV is installed and ready to work with.