Install OpenCV 2.3.1 in Ubuntu 12.04

OpenCV 2.3.1 is now the last version in repositories so you just need to run:

sudo apt-get install libopencv-*

And to have Python support:

sudo apt-get install python-opencv
sudo apt-get install python-numpy

Anyway, I recommend compiling it from the sources to configure it for your computer and to learn how CMake works. Have a look at my previous post Install OpenCV 2.3.1a in Ubuntu 11.10. That guide works perfectly fine for Ubuntu 12.04.

Source: Jayrambhia

You might also like

Install OpenCV 2.3.1a in Ubuntu 11.10
If you want to install OpenCV 2.1 you can just use apt-get to do the work: sudo apt-get install libcv-dev...

Install OpenCV 2.3.1a in Ubuntu 11.10
If you want to install OpenCV 2.1 you can just use apt-get to do the work: sudo apt-get install libcv-dev...

Install OpenCV 2.3.1a in Ubuntu 11.10
If you want to install OpenCV 2.1 you can just use apt-get to do the work: sudo apt-get install libcv-dev...

Use OpenCV in Eclipse CDT
Install OpenCV (see previous posts for Ubuntu 10.10, Ubuntu 11.10, Ubuntu 12.04 and OpenCV 2.4 in Ubuntu...

  1. Thanks for the pingback. šŸ™‚

  2. Thanks to you, now I now how to install OpenCV 2.3.1 faster if I don’t need an special configuration of it šŸ˜‰

  3. Podrias ayudarme con este problema:

    libopencv-highgui-dev : Depende: libgtk2.0-dev pero no va a instalarse
    E: No se pudieron corregir los problemas, usted ha retenido paquetes rotos.

    He intentado instalar por separado el paquete libgtk2.0-dev pero faltan otros y asi sucesivamente…

    • Los problemas de dependencias la verdad que son lo peor. Igual podrĆ­as probar a forzar la instalaciĆ³n de los paquetes que te dan el problema. apt-get tiene una opciĆ³n para eso pero ahora no recuerdo como era.

  4. Hello,

    How can i instal OpenCV (C++) and configure it with Cmike or Code blocks (i work under Ubuntu 12.04)

    Thanks

    • The installation process if you are using Ubuntu 12.04 is just as I described (have a look here: “Install OpenCV 2.3.1a in Ubuntu 11.10“). I don’t have any idea how to configure it with Code Blocks (I never heard about Cmike, may be you made a typo there and wanted to say Cmake…), but it should be just configure where the lib files are (probably in /usr/local/lib), where the include files are (probably /usr/local/include) and the library names to use on linking process. This may be useful for you: Use OpenCV in Eclipse CDT.

  5. Thank you very much dude =)

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.