Online Course – OpenCV Python Tutorial For Beginners. At the end of this course, you will have a firm grasp of Computer Vision techniques using OpenCV libraries. This course will be your gateway to the world of data science.
In this post we will see How to install OpenCV in Ubuntu.
OpenCV is an image processing library created by Intel and later supported by Willow Garage and now maintained by Itseez. OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. OpenCV is Available on Mac, Windows, Linux (Terminal environment).
Step 1 – Updating Ubuntu
$ sudo apt-get update $ sudo apt-get upgrade
Step 2 – Install dependencies
$ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev $ sudo apt-get install python3.5-dev python3-numpy libtbb2 libtbb-dev $ sudo apt-get install libjpeg-dev libpng-dev libtiff5-dev libjasper-dev libdc1394-22-dev libeigen3-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev sphinx-common libtbb-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenexr-dev libgstreamer-plugins-base1.0-dev libavutil-dev libavfilter-dev libavresample-dev
Step 3 – Get OpenCV
$ sudo -s $ cd /opt /opt$ git clone https://github.com/Itseez/opencv.git /opt$ git clone https://github.com/Itseez/opencv_contrib.git
Step 4 – build and install OpenCV
/opt$ cd opencv /opt/opencv$ mkdir release /opt/opencv$ cd release /opt/opencv/release$ cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=OFF -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib/modules /opt/opencv/ /opt/opencv/release$ make -j4 /opt/opencv/release$ make install /opt/opencv/release$ ldconfig /opt/opencv/release$ exit /opt/opencv/release$ cd ~
Now to check if OpenCV is installed on a machine, run the following commands
$ pkg-config --modversion opencv 3.2.x
We will get the opencv version installed
in this case it’s 3.2.x
Video instruction – How to Install OpenCV in Ubuntu 18.04 LTS
Thank you for the very informative tips and knowledge. I started my learning carrier from this site and now i own http://www.softolite.com. I’ve learnt a lot from this site and i can proudly say here.