Installing OpenCV in Ubuntu 14.10

后端 未结 3 1707
慢半拍i
慢半拍i 2020-12-30 16:26

I\'m trying to install OpenCV in Ubuntu 14.10 according to instruction. I installed all mentioned dependencies, but when I\'m trying to run make I get such erro

相关标签:
3条回答
  • 2020-12-30 17:19

    Unless you have special reasons I would suggest installing the OpenCV that are already in the Ubuntu repository: sudo apt-get install libopencv-dev

    For video codecs I suggest simply trying to install all ffmpeg and gstreamer related codec packages.

    0 讨论(0)
  • 2020-12-30 17:20

    You can try to build without a ffmpeg:

    cmake -DCMAKE_BUILD_TYPE=RELEASE -DWITH_FFMPEG=OFF ..
    make
    sudo make install
    
    0 讨论(0)
  • 2020-12-30 17:23

    Installing OpenCV from the Ubuntu repositories is a good choice for the most cases, but sometimes you need build OpenCV from sources yourself.

    For example, if you need OpenCV's non-free functionality, or want to contribute to this project (you should use the latest version to create pull request), or want to change something (yes, OpenCV can also contain bugs).

    Possible solution is building ffmpeg (it's rather simple) - I really don't understand why Debian/Ubuntu prefers libav without alternative.

    For installing ffmpeg you should download its sources from official site or clone GIT repository (git://source.ffmpeg.org/ffmpeg.git), then enter source directory and run

    ./configure --enable-shared --disable-static
    make
    sudo make install

    you can also add other parameters to configure. You can build static libraries too, but OpenCV can't be built with static ffmpeg libraries (now I don't know why).

    After this you can download OpenCV sources from OpenCV site or clone GitHub repository (OpenCV repository), create build folder and run from it the following:

    cmake PATH_TO_SOURCES -DCMAKE_BUILD_TYPE=Release
    make
    sudo make install

    Of course, PATH_TO_SOURCES must be actual path to your OpenCV sources.

    After these steps you have working latest OpenCV build in your system.

    0 讨论(0)
提交回复
热议问题