Installation in Linux -- opencv

方法一:sudo apt-get install opencv
方法二:可能需要的关联包
1.CMake 2.6 or higher;
Git;
GTK+2.x or higher, including headers (libgtk2.0-dev);
pkg-config;
Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy);
ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev;
[optional] libdc1394 2.x;
[optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev.

  1. 获取最新源码
    cd ~/
    git clone https://github.com/Itseez/opencv.git
  2. 编译源码
    cd ~/opencv
    mkdir release
    cd release
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
    make
    sudo make install

你可能感兴趣的:(Installation in Linux -- opencv)