Skip to content

Instantly share code, notes, and snippets.

@rvighne
Created January 31, 2017 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvighne/a85d8a0b3907783ed4705513bbffc5c2 to your computer and use it in GitHub Desktop.
Save rvighne/a85d8a0b3907783ed4705513bbffc5c2 to your computer and use it in GitHub Desktop.
Instructions to download, build, and install OpenCV. For C/C++ development. Compiles with V4L libraries (suitable for most cameras).
# Make sure everything is up to date (optional)
sudo apt-get update
sudo apt-get dist-upgrade -y
# Prerequisites
sudo apt-get install build-essential git cmake make pkg-config v4l-utils libv4l-0 libv4l-dev -y
# Download OpenCV
git clone https://github.com/opencv/opencv.git
# Configure build
cd opencv
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_python3=OFF -DWITH_LIBV4L=ON
# Build and install to /usr/local
make -j8
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment