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

This entry was posted in HowTo, OpenCV, Ubuntu and tagged , , , , , , , . Bookmark the permalink.

3 Responses to HowTo: Install OpenCV in Ubuntu Karmic (9.10)

  1. Arkapravo says:

    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

  2. Alex says:

    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!

  3. Arkapravo says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>