HowTo: Install OpenCV in Ubuntu Karmic (9.10)

Heres how I got OpenCV installed:

First install some needed packages

sudo apt-get install build-essential libgtk2.0-dev

Now you need to grab FFmpeg for the install to work

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

The svn didn’t work for me, probably something to do with the proxy I’m under at Uni so I had to grab the source and compile it:

Download – http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2

(skip the tar step if you svn the package)

tar -jxvf ffmpeg-0.5.tar.bz2

Configure and install ffmpeg

cd ffmpeg

./configure --enable-shared

make

sudo make install

Next grab a copy of OpenCV (I used OpenCV-2.0.0.tar.bz2 in this guide)

Download – http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.0/

tar -jxvf OpenCV-2.0.0.tar.bz2

cd OpenCV-2.0.0

./configure --with-ffmpeg --with-gtk --with-quicktime=false

make

sudo make install

Now you should be setup, try running one of the sample programs to test it:

cd samples/c/

. build_all.sh

./facedetect

8 comments to HowTo: Install OpenCV in Ubuntu Karmic (9.10)

  • Hey Alex

    This works great with Ubuntu 9.04, however ./facedetect doesn’t work with Ubuntu 9.04 installed in Virtual Box. May be some Hardware Abstraction issue of the webcam.

    Thanks again

    Arkapravo

  • Alex

    Hey Arkapravo,

    Sorry I don’t have any experience working with Virtual Box but if you manage to find out how to get it working I’d love to know how you did it!

  • Install Virtual Box , configure Ubuntu 9.04 using an iso image file, install Guest Additions for ‘smooth’ working of the guest OS. Then rest is exactly same as in your website. Just that some of the hardware may not work (issues with hardware abstraction). Then again, it is a very good test, before actually partitioning the HDD to install the OS.

  • shivraj

    please anyone tell me how to install opencv2.2.0 in ubuntu 9.04
    please give information step wise ,i m not familiar with ubuntu and opencv

  • sukhdham

    he it was good i got it worked. Thanks a lot.

  • shole

    OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/kishore/opencv/OpenCV-2.0.0/src/highgui/window.cpp, line 100
    terminate called after throwing an instance of ‘cv::Exception’
    Aborted

    i’m getting this error even after i followed the above give procedure …

  • shole

    and i m using 10.10

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>