Installing OpenCV 2.0 on Ubuntu 9.10 Karmic Koala

November 8th, 2009 by alex

OpenCV is a widely used computer vision library for research and development. I’ve tried using instructions for installing it from the official manual, but it failed miserably. It seems that 2.0 code is incompatible with the latest incarnation of ffmpeg. Couple minutes in googling and I had it working.

UPDATE: The following process describes building the latest stable version from the sources. There is a binary version now in a third-party repository that you can install with apt-get.

Here is what needs to be done if you want to build one from sources:

  1. Get all the prerequisites:
    sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg62-dev libtiff4-dev
    sudo apt-get build-dep libswscale-dev swig
  2. Get OpenCV 2.0, and unpack it somewhere
  3. Fix ffmpeg links. Make sure you are root (sudo -s) and do the following:
    mkdir /usr/include/ffmpeg
    ln -s /usr/include/libavcodec/avcodec.h /usr/include/ffmpeg/avcodec.h
    ln -s /usr/include/libavformat/avformat.h /usr/include/ffmpeg/avformat.h
    ln -s /usr/include/libavformat/avio.h /usr/include/ffmpeg/avio.h
    ln -s /usr/include/libavutil/avutil.h /usr/include/ffmpeg/avutil.h
  4. Configure OpenCV. In the folder you’ve unpacked it to run:
    ./configure --prefix=/usr/local/opencv --enable-apps --enable-shared --enable-swscale --enable-gpl --with-swig
    sudo ln -s /usr/include/libswscale/swscale.h /usr/include/ffmpeg/swscale.h
  5. Make and install it
    make
    sudo make install
    You could also test it by running make test
  6. Configure your system to look for opencv libraries
    echo /usr/local/opencv/lib > /etc/ld.so.conf.d/opencv.confReload the libraries and make sure opencv shows up now
    ldconfig -v | grep opencvYou may get warnings on unaccessible lib paths, that is ok. You are looking for a line that says “/usr/local/opencv/lib”
  7. Set-up pkg-config
    echo 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opencv/lib/pkgconfig' >> /etc/bash.bashrc
    echo 'export PYTHONPATH=/usr/local/opencv/lib/python2.6/site-packages/opencv' >> /etc/bash.bashrc
    Restart your terminal to get the new paths
  8. Test by building samples
    cd ~/Programs/OpenCV-2.0.0/samples/c
    . build_all.sh

You’re done.

Tagged with: , , .

46 Comments

  • ABC says:

    This still gives me the error:

    make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1

  • Shern Shiou says:

    Hi there, thanks for the guide.
    I found 2 confused statement there.
    1. sudo mkdir /usr/include/ffmpegsudo apt-get install libswscale-dev swig
    Can you put a space between ffmpeg and sudo?

    2. sudo ln -s /usr/include/libavformat/avutil.h /usr/include/ffmpeg/avutil.h
    avutil.h resides in libavutil not libavformat.

  • Artur says:

    Thanks!It works for me.

  • Jiang says:

    Met the sample problem! Can’t cmake following the OpenCV instructions as the declaration of “img_convert” has been removed from “avcodec.h”.

    Thank you, Alex!

  • zorooo says:

    hello,

    i think “mkdir /usr/include/ffmpegsudo” should be “mkdir /usr/include/ffmpeg/”.

    thanks a lot for your manual!

    greets zorooo

  • Mario says:

    I got this error on Step 6.. I am kind of new in Linux so I dont know what should I do…

    root@mario-laptop:~/Dokumente/OpenCV-2.0.0# ldconfig -v | grep opencv
    /sbin/ldconfig.real: Can’t stat /lib/i486-linux-gnu: No such file or directory
    /sbin/ldconfig.real: Can’t stat /lib64: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/local/lib/libhighgui.so: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/local/lib/libcxcore.so: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/local/lib/libcv.so: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/local/lib/libcvaux.so: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/local/lib/libml.so: No such file or directory
    /usr/local/opencv/lib:

  • I got some errors too on make:
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual IplImage* CvCapture_FFMPEG::retrieveFrame(int)’:
    highgui/cvcap_ffmpeg.cpp:578: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::writeFrame(const IplImage*)’:
    highgui/cvcap_ffmpeg.cpp:1077: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::open(const char*, int, double, CvSize, bool)’:
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/ffmpeg/avformat.h:873)
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/ffmpeg/avformat.h:873)

    • alex says:

      Looks like your ffmpeg is still incompatible. Did you link it per step 3?

    • Sebastian says:

      Just in case anyone is still stuck on this error: It showed up for me because I did not have the packages libswscale-dev and swig installed. Appearantly there is no package called “build-dep” in as mentioned in the first command so apt-get install just stopped there and did not install the two successive packages.

  • Io-oI says:

    Man, I just installed Ubuntu yesterday so im newbie. I get error when I “sudo make install”.

    The errors are:

    libtool: install: error: cannot install `libcv.la’ to a directory not ending in /usr/local/lib
    make[2]: *** [install-libLTLIBRARIES] Error 1
    make[2]: Leaving directory `/media/42981C43981C37BD/OpenCV-2.0.0/src’
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory `/media/42981C43981C37BD/OpenCV-2.0.0/src’
    make: *** [install-recursive] Error 1

  • Pramod says:

    Evertything went fine until running sudo make install. Though it tells that libraries have been installed, at the end it gives this error message :

    /usr/bin/install -c -m 644 opencv/cv.h opencv/cv.hpp opencv/cvaux.h opencv/cvaux.hpp opencv/cvcompat.h opencv/cvstreams.h opencv/cxmat.hpp opencv/cvtypes.h opencv/cvver.h opencv/cvvidsurv.hpp opencv/cvwimage.h opencv/cxcore.h opencv/cxcore.hpp opencv/cxerror.h opencv/cxflann.h opencv/cxmisc.h opencv/cxoperations.hpp opencv/cxtypes.h opencv/highgui.h opencv/highgui.hpp opencv/ml.h ‘/usr/local/OpenCV-2.0.0/include/opencv’
    /usr/bin/install: `opencv/cv.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cv.h’ are the same file
    /usr/bin/install: `opencv/cv.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cv.hpp’ are the same file
    /usr/bin/install: `opencv/cvaux.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvaux.h’ are the same file
    /usr/bin/install: `opencv/cvaux.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvaux.hpp’ are the same file
    /usr/bin/install: `opencv/cvcompat.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvcompat.h’ are the same file
    /usr/bin/install: `opencv/cvstreams.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvstreams.h’ are the same file
    /usr/bin/install: `opencv/cxmat.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxmat.hpp’ are the same file
    /usr/bin/install: `opencv/cvtypes.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvtypes.h’ are the same file
    /usr/bin/install: `opencv/cvver.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvver.h’ are the same file
    /usr/bin/install: `opencv/cvvidsurv.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvvidsurv.hpp’ are the same file
    /usr/bin/install: `opencv/cvwimage.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cvwimage.h’ are the same file
    /usr/bin/install: `opencv/cxcore.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxcore.h’ are the same file
    /usr/bin/install: `opencv/cxcore.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxcore.hpp’ are the same file
    /usr/bin/install: `opencv/cxerror.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxerror.h’ are the same file
    /usr/bin/install: `opencv/cxflann.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxflann.h’ are the same file
    /usr/bin/install: `opencv/cxmisc.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxmisc.h’ are the same file
    /usr/bin/install: `opencv/cxoperations.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxoperations.hpp’ are the same file
    /usr/bin/install: `opencv/cxtypes.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/cxtypes.h’ are the same file
    /usr/bin/install: `opencv/highgui.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/highgui.h’ are the same file
    /usr/bin/install: `opencv/highgui.hpp’ and `/usr/local/OpenCV-2.0.0/include/opencv/highgui.hpp’ are the same file
    /usr/bin/install: `opencv/ml.h’ and `/usr/local/OpenCV-2.0.0/include/opencv/ml.h’ are the same file
    make[2]: *** [install-pkgincludeHEADERS] Error 1
    make[2]: Leaving directory `/usr/local/OpenCV-2.0.0/include’
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory `/usr/local/OpenCV-2.0.0/include’
    make: *** [install-recursive] Error 1
    root@pramod-laptop:/usr/local/OpenCV-2.0.0# make test
    make: *** No rule to make target `test’. Stop.

    Any hunch as to what the problem could be?

    Regards
    Pramod

  • I’ve made OpenCV 2.0 packages for Ubuntu karmic and uploaded them to a PPA:

    http://gijs.pythonic.nl/blog/2009/dec/11/ubuntu-karmic-packages-opencv-20/

  • eton says:

    I installed but i cant configure it?

    eton@ubuntu:~/OpenCV-2.0.0$ sudo echo /usr/local/opencv/lib > /etc/ld.so.conf.d/opencv.conf
    bash: /etc/ld.so.conf.d/opencv.conf: Permission denied

    what i have to do now?

    • alex says:

      This is a known quirk of sudo – pipe and redirect is not interpreted under sudo command. I.e. you’re essentially running ‘sudo echo blah’ then sending it out to opencv.conf fails because you are doing the redirect as yourself, not super user. To solve it either first run sudo -s, then echo… or run sudo sh -c ‘echo /usr/local/opencv/lib > /etc/ld.so.conf.d/opencv.conf’

  • Sebastian says:

    Does the python interface work for you guys?

    The example gives me the following error message:
    AttributeError: ‘module’ object has no attribute ‘CaptureFromCAM’

    It’s the same when I try all the other methods that are supposed to be found in the module cv.

  • clinton says:

    Thank You for forwarding the Launchpad link to the OpenCV 2.0 for Karmic.

  • Mohamed says:

    I get these errors at make :
    ==============
    In file included from highgui/cvcap_ffmpeg.cpp:97:
    /usr/local/include/libavformat/avformat.h:148: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:227: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:233: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:234: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:278: error: ‘AVPacket’ has not been declared
    In file included from highgui/cvcap_ffmpeg.cpp:97:
    /usr/local/include/libavformat/avformat.h:457: error: ‘AVPacket’ does not name a type
    /usr/local/include/libavformat/avformat.h:581: error: ‘AVPacket’ does not name a type
    /usr/local/include/libavformat/avformat.h:684: error: ‘AVPacket’ does not name a type
    /usr/local/include/libavformat/avformat.h:761: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:773: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:869: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:890: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:1095: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:1112: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:1129: error: ‘AVPacket’ has not been declared
    /usr/local/include/libavformat/avformat.h:1130: error: ‘AVPacket’ has not been declared
    highgui/cvcap_ffmpeg.cpp:335: error: ‘AVPacket’ does not name a type
    highgui/cvcap_ffmpeg.cpp: In member function ‘void CvCapture_FFMPEG::init()’:
    highgui/cvcap_ffmpeg.cpp:361: error: ‘packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual void CvCapture_FFMPEG::close()’:
    highgui/cvcap_ffmpeg.cpp:393: error: ‘packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:394: error: ‘av_free_packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvCapture_FFMPEG::grabFrame()’:
    highgui/cvcap_ffmpeg.cpp:527: error: ‘packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:534: error: ‘packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:535: error: ‘av_free_packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:539: error: ‘packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:541: error: ‘av_free_packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual IplImage* CvCapture_FFMPEG::retrieveFrame(int)’:
    highgui/cvcap_ffmpeg.cpp:578: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’:
    highgui/cvcap_ffmpeg.cpp:979: error: ‘AVPacket’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:979: error: expected ‘;’ before ‘pkt’
    highgui/cvcap_ffmpeg.cpp:980: error: ‘pkt’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:980: error: ‘av_init_packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:982: error: ‘PKT_FLAG_KEY’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:993: error: ‘AVPacket’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:993: error: expected ‘;’ before ‘pkt’
    highgui/cvcap_ffmpeg.cpp:994: error: ‘pkt’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:994: error: ‘av_init_packet’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp:1002: error: ‘PKT_FLAG_KEY’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::writeFrame(const IplImage*)’:
    highgui/cvcap_ffmpeg.cpp:1077: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::open(const char*, int, double, CvSize, bool)’:
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:834)
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:834)
    make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1

    ==============

    • Sam says:

      I get these errors too, does anyone know how to fix it? I’ve spent all day trying to get this to install!

      • alex says:

        Try adding the following to local/include/ffmpeg/avformat.h:
        #define INT64_C
        #define __STDC_CONSTANT_MACROS
        #include
        This a is very ugly, temporary hack just to make it compile.

  • Bayana says:

    1. root@bayana-desktop:/home/bayana/OpenCV-2.0.0# ./configure –prefix=/usr/local/opencv –enable-apps –enable-shared –enable-swscale –enable-gpl –with-swig
    configure: WARNING: unrecognized options: –enable-swscale, –enable-gpl

    2. root@bayana-desktop:/home/bayana/OpenCV-2.0.0# make
    make all-recursive
    make[1]: Entering directory `/home/bayana/OpenCV-2.0.0′
    Making all in 3rdparty
    make[2]: Entering directory `/home/bayana/OpenCV-2.0.0/3rdparty’
    make[2]: Nothing to be done for `all’.
    make[2]: Leaving directory `/home/bayana/OpenCV-2.0.0/3rdparty’
    Making all in src
    make[2]: Entering directory `/home/bayana/OpenCV-2.0.0/src’
    /bin/bash ../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -I../include/opencv -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer -MT lib_highgui_la-cvcap_ffmpeg.lo -MD -MP -MF .deps/lib_highgui_la-cvcap_ffmpeg.Tpo -c -o lib_highgui_la-cvcap_ffmpeg.lo `test -f ‘highgui/cvcap_ffmpeg.cpp’ || echo ‘./’`highgui/cvcap_ffmpeg.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -I../include/opencv -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer -MT lib_highgui_la-cvcap_ffmpeg.lo -MD -MP -MF .deps/lib_highgui_la-cvcap_ffmpeg.Tpo -c highgui/cvcap_ffmpeg.cpp -fPIC -DPIC -o .libs/lib_highgui_la-cvcap_ffmpeg.o
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual IplImage* CvCapture_FFMPEG::retrieveFrame(int)’:
    highgui/cvcap_ffmpeg.cpp:578: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::writeFrame(const IplImage*)’:
    highgui/cvcap_ffmpeg.cpp:1077: error: ‘img_convert’ was not declared in this scope
    highgui/cvcap_ffmpeg.cpp: In member function ‘virtual bool CvVideoWriter_FFMPEG::open(const char*, int, double, CvSize, bool)’:
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/ffmpeg/avformat.h:873)
    highgui/cvcap_ffmpeg.cpp:1213: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/ffmpeg/avformat.h:873)
    make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1
    make[2]: Leaving directory `/home/bayana/OpenCV-2.0.0/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/bayana/OpenCV-2.0.0′
    make: *** [all] Error 2

    Please help me

  • Will Qawasmi says:

    Oh My God.

    I have spent all fucking day trying to get this to work, and I finally found a source that helped me.

    I take my hat off to you… *takes hat off*

    <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3

  • Will Qawasmi says:

    Woops,

    It seems as if I spoke to soon =\

    I am also getting the:

    make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1
    make[2]: Leaving directory `/home/will/OpenCV-2.0.0/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/will/OpenCV-2.0.0′
    make: *** [all] Error 2

    At least this tut got me much farther then I was before… now another problem to deal with…

    • alex says:

      Try this (found on the net, has not tried myself)
      “Add to local/include/ffmpeg/avformat.h:
      #define INT64_C
      #define __STDC_CONSTANT_MACROS
      #include
      This a is very ugly, temporary hack just to make it compile.”

      • Will Qawasmi says:

        Wow it worked! (this time for sure :-)

        Thank You!

        Now I feel embarrassed asking this but, I cannot get Code::Blocks to work with OpenCV… any tips? If not what IDE do you use and how did you configure it?

        Either Way, Thank You for getting me this far!

  • manueldavid says:

    Hello, I try to install OpenCV 2.0 on Ubuntu 9.04..

    I do:

    $./configure
    $make
    $make install

    but just do make install, I get the following:

    ../src/.libs/libhighgui.so: undefined reference to `av_get_bits_per_pixel’
    ../src/.libs/libhighgui.so: undefined reference to `av_pix_fmt_descriptors’
    collect2: ld returned 1 exit status
    make[1]: *** [opencv-haartraining] Error 1

    Help me, please.

    • santosh says:

      Hi manueldavid, I am trying to install opencv in ubuntu 9.10 and having exactly the same problem as you. I would like to know if you have managed to find a solution. I am very new to linux and opencv (installed it a week ago) and do not have a clue what the error message means and where to look for further details.

      thanks,
      Santosh

  • Chris says:

    Alex,

    Are you using the 64-bit AMD install of Ubuntu by chance? I’ve been having many of the same issues getting it to work, and someone mentioned that 64-bit systems have their own set of issues with the install.

    • Alex says:

      It was a 64 bit system. Most of the issues could be solved by updating the dependencies or fixing the source code as above

  • Chris says:

    Alex,

    Your first step still says:

    “sudo apt-get build-dep libswscale-dev swig”

    I think this should be

    “sudo apt-get build-dep python-opencv
    sudo apt-get install libswscale-dev swig”

  • Jesse says:

    I’ve tried installing from the PPA site as well as using your directions and each time I seem to get a different version of the python wrapper – neither match the willowgarage wiki.

    Does anyone know what is up with this?

    Many thanks,

    Jesse

  • sarang says:

    while installing i also got the following problem:
    make[2]: *** [lib_highgui_la-cvcap_ffmpeg.lo] Error 1
    make[2]: Leaving directory `/home/sarang/OpenCV-2.0.0/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/sarang/OpenCV-2.0.0′
    make: *** [all] Error 2

    as you said i did following changes to
    local/include/ffmpeg/avformat.h:
    #define INT64_C
    #define __STDC_CONSTANT_MACROS
    #include

    but still its not working giving the same error.plz help.thnx.

  • Opencv 2.1 packages for ubuntu 9.10 (karmic) and 10.04 (lucid):

    http://gijs.pythonic.nl/blog/2010/apr/7/opencv-21-ubuntu-packages/

  • [...] 也Google过不少资料,包括这篇和这篇(这位同学奇特之处在于其他博文貌似都是某种中东文字写的),不得不说Google在搜索这组关键词(OpenCV 2.0 Ubuntu)上效果相当不好,让我走了不少弯路。 [...]

  • [...] I found a great guide on getting OpenCV to install on Ubuntu Karmic (9.10) –http://ivkin.net/2009/11/installing-opencv-2-0-on-ubuntu-9-10-karmic-koala/ [...]

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Ivkin.Net :: where tech and candy come together