Skip to content

OpenCV install guide

Tomek Roszczynialski edited this page May 5, 2017 · 6 revisions

pyimage search, offical docs

  1. cd git
  2. git clone https://github.com/Itseez/opencv.git
  3. sudo apt-get install build-essential (already installed)
  4. sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  5. sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev libv4l-dev [optional]
  6. sudo apt-get install libatlas-base-dev 6a. sudo apt update && sudo apt install ffmpeg libav-tools x264 x265
  7. git checkout 2.4.11, mkdir build && cd build

8a. Ubuntu without ffmpeg

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_FFMPEG=OFF ..

  1. Rasbpian with ffmpeg

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON ..

  1. make 3 hours

  2. sudo make install

  3. sudo ldconfig

Clone this wiki locally