top of page
Search

Raspbian/Ubuntu - Opencv installation

  • RaviKumar Uthirapathy
  • Jul 5, 2020
  • 1 min read

Updated: Apr 26, 2021

There are two ways to install opencv on ubuntu

  1. Direct method(opencv Package )

  2. install from source

Building the OpenCV library from source is the recommended way of installing OpenCV. The following steps should follow for installation.

Step 1.

sudo apt install build-essential cmake git pkg-config libgtk-3-dev \ libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \ libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \ gfortran openexr libatlas-base-dev python3-dev python3-numpy \ libtbb2 libtbb-dev libdc1394-22-dev


Step2.

git clone https://github.com/opencv/opencv.gitgit clone https://github.com/opencv/opencv_contrib.git


Step3.

mkdir ~/opencv_build && cd ~/opencv_build

cd ~/opencv_build/opencv

mkdir build && cd build


Step4.

sudo cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_GENERATE_PKGCONFIG=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON ..


Step5.

sudo make -j4

sudo make install


step6; To check installed version

pkg-config --modversion opencv4


Thats all , Before installation of opencv python3 environment must be installed.


 
 
 

Recent Posts

See All
Facial Recognition in Live camera

FACIAL RECOGNITION USING PYTHON AND OPENCV WITH LIVE CAMERA FEED In this article, I will explain the how facial recognition system...

 
 
 
Locked home monitoring system

LOCKED HOME MONITORING SYSTEM Our neighboring state has implemented the locked home monitoring system in past few years. It was...

 
 
 
Solar powered 4G IP Camera

Now a day, The CCTV cameras are essential for surveillance and monitoring of places. But many of our CCTV systems installed at public...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by VOIP Server. Proudly created with Wix.com

bottom of page