OpenCV

Required build dependencies

sudo apt-get install cmake
sudo apt-get install gcc g++

sudo apt-get install python3-dev python3-numpy

sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev

sudo apt-get install libgtk-3-dev

Optional Dependencies

sudo apt-get install libpng-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libopenexr-dev
sudo apt-get install libtiff-dev
sudo apt-get install libwebp-dev

Downloading OpenCV

sudo apt-get install git
git clone https://github.com/opencv/opencv.git

Now open a terminal window and navigate to the downloaded “opencv” folder.

mkdir build
cd build

Configuring and Installing

cmake ../
make
sudo make install

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store