Install OpenCV 2.3.1 and SimpleCV in Ubuntu 12.04 Precise Pangolin, Arch Linux


After screwing up my Ubuntu see previous post and also my Arch Linux, I installed Ubuntu 11.10 and upgraded to 12.04.


 

Ubuntu 12.04 LTS – Precise Pangolin

Install OpenCV 2.3.1

sudo apt-get install libopencv-*
sudo apt-get isntall python-opencv
sudo apt-get install python-numpy

That’s it! OpenCV 2.3.1 is installed completely in Ubuntu 12.04 (Thanks for the package).

Install SimpleCV.

sudo apt-get install python-pygame
sudo apt-get install python-setuptools
sudo apt-get install ipython ipython-notebook # Not a necessity

Download the latest SimpleCV version from GitHub.
Extract it and change the directroy.

sudo python setup.py install

 

Arch Linux

Install OpenCV 2.3.1

pacman -S python2-numpy
pacman -S opencv 2.3.1_a-4

Install SimpleCV.

pacman -S python-pygame
pacman -S python2-setuptools
pacman -S ipython2 # Not a necessity

Download the latest SimpleCV version from GitHub.
Extract it and change the directroy.

sudo python2 setup.py install

 
P.S. GNOME shell 3.4 is quite neat.

43 thoughts on “Install OpenCV 2.3.1 and SimpleCV in Ubuntu 12.04 Precise Pangolin, Arch Linux

  1. Pingback: Install OpenCV 2.3.1 and SimpleCV in Ubuntu 12.04 Precise … | Pici's Ubuntu Blog

  2. dude,
    I’m new to openCV, and I want to use openCV with c++

    so would you show me how to set it up for c++.

    Thanx 🙂

    • If you are using Ubuntu 11.10 or prior. You can use OpenCV 2.1 and 2.3.1. OpenCV 2.3.1 has many new features and is quite fast in comparison to 2.1. But 2.1 has python swig bindings which 2.3.1 does not have since python bindings are written in ctypes.

      For OpenCV 2.1:
      sudo apt-get install libopencv

      For OpenCV 2.3.1: http://www.marcolancini.it/other/opencv_install_231.php . This is the best post I have ever come across. Do as it says and you’re good to go.

      For Ubuntu 12.04 and ArchLinux, I have mentioned how to install OpenCV.

      For further information and documentation go through http://opencv.willowgarage.com/wiki/ . This website has everything that you would need. From setting up OpenCV in Linux/Windows/Mac to Machine Learning and SVM.

      You should also join #opencv channel on freenode IRC if you have any problems.

      • I’m using Ubuntu 12.04
        I installed opencv using the following:
        sudo apt-get install libopencv-*
        and configured it in codeblocks..

        works like charm..
        Thanx !!

        BTW, can u plz tell me the difference between, OpenCV and SimpleCv..

  3. There’s not much difference between OpenCV and SimpleCV. SimpleCV uses OpenCV python library and bunch of other libraries to make it much more simpler than OpenCV. SimpleCV is completely based on Python. SimpleCV is so easy to learn and work with.
    http://simplecv.tumblr.com/post/19307835766/opencv-vs-matlab-vs-simplecv . This post is written by Anthony Oliver, one of the co-founders of SimpleCV. This will explain similarities and differences.
    https://github.com/ingenuitas/SimpleCV/tree/master/SimpleCV/examples You can find some examples worked out using SimpleCV.
    http://examples.simplecv.org/en/latest/index.html This will explain you what I really mean by how easy and user friendly SimpleCV is!

  4. i am new in linux and … could you make a small sample and write the steps for see how i should to start writing my programs in openCv?

  5. Pingback: Beginning OpenCV « Paranoid Android

  6. I’m using OpenCV to handle webcam input for a program I’m writing, but I’m having trouble getting my code to work in 12.04. I installed OpenCV as per the instructions above, which normally work in 10.04 and 11.04, but I think because the 2.3.1 version with CTypes doesn’t have highgui, which is the part of openCV I use to capture input.

    >>> import opencv
    NameError: name ‘opencv’ is not defined.

    I normally use `from opencv import cv, highgui` to import highgui, but none of the following work either.
    from cv2 import highgui
    from cv import highgui

    Any suggestions?

  7. Pingback: Install OpenCV 2.3.1 in Ubuntu 12.04 | Programming and Technology

  8. Pingback: Get data from Mat / cv::Mat in OpenCV « Paranoid Android

  9. Pingback: Get data from Mat / cv::Mat in OpenCV | Paranoid Android

  10. Hello,

    I have an upgraded from ubuntu 11 to ubuntu12 machine.

    For some reason on my machine, your command

    > sudo apt-get install libopencv-*

    creates an error in my apt database and I was unable to install any new software at all! D: The error was about trying to install libraries that were already installed.

    I fixed it by issuing

    > sudo dpkg -r libopencv2.3
    > sudo dpkg -r libopencv2.3-bin

    Thought I would share for others encountering similar issues.

  11. Pingback: Herramientas para procesamiento de Imagen: OpenCV, SimpleCV, PIL | Sitio de Redes e informática

  12. Pingback: Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob « ProgrammaticPonderings

  13. Hey. There is a small error in the code to download and install OpenCV.

    sudo apt-get isntall python-opencv

    You have typed it in as “isntall”. Please check it out and correct the same.

    BTW, thanks a lot for the codes 😀

Leave a comment