
If you want to build the libraries statically you only have to include the -D BUILD_SHARED_LIBS=OFF $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_C_COMPILER=/usr/bin/gcc-6 -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D WITH_TBB=ON -D WITH_CUDA=ON -D BUILD_opencv_cudacodec=OFF -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_PYTHON3_INSTALL_PATH=~/.virtualenvs/cv/lib/python3.8/site-packages -D OPENCV_EXTRA_MODULES_PATH=~/downloads/opencv/opencv_contrib-4.5.2/modules -D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python -D BUILD_EXAMPLES=ON -D BUILD_SHARED_LIBS=OFF. D OPENCV_EXTRA_MODULES_PATH=~/Downloads/opencv_contrib-4.5.2/modules \ D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \ D OPENCV_PYTHON3_INSTALL_PATH=~/.virtualenvs/cv/lib/python3.8/site-packages \ $ source /usr/local/bin/virtualenvwrapper.sh $ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
UPDATE CMAKE UBUNTU 20.04 INSTALL
$ sudo pip install virtualenv virtualenvwrapper $ echo "Create a virtual environtment for the python binding module (OPTIONAL)"

We will now proceed with the installation (see the Qt flag that is disabled to do not have conflicts with Qt5.0). $ sudo apt-get install libgphoto2-dev libeigen3-dev libhdf5-dev doxygen $ sudo apt-get install libgoogle-glog-dev libgflags-dev Optional libraries: $ sudo apt-get install libprotobuf-dev protobuf-compiler Optimization libraries for OpenCV $ sudo apt-get install libatlas-base-dev gfortran Parallelism library C++ for CPU $ sudo apt-get install libtbb-dev Python libraries for python3: $ sudo apt-get install python3-dev python3-pip GTK lib for the graphical user functionalites coming from OpenCV highghui module $ sudo apt-get install libgtk-3-dev OpenCore - Adaptive Multi Rate Narrow Band (AMRNB) and Wide Band (AMRWB) speech codec $ sudo apt install libopencore-amrnb-dev libopencore-amrwb-devĬameras programming interface libs $ sudo apt-get install libdc1394-22 libdc1394-22-dev libxine2-dev libv4l-dev v4l-utils $ sudo apt install libfaac-dev libmp3lame-dev libvorbis-dev

$ sudo apt install libxvidcore-dev x264 libx264-dev libfaac-dev libmp3lame-dev libtheora-dev $ sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev $ sudo apt install libavcodec-dev libavformat-dev libswscale-dev libavresample-dev Video/Audio Libs - FFMPEG, GSTREAMER, x264 and so on. Image I/O libs $ sudo apt install libjpeg-dev libpng-dev libtiff-dev Generic tools: $ sudo apt install build-essential cmake pkg-config unzip yasm git checkinstall
UPDATE CMAKE UBUNTU 20.04 HOW TO
How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 20.04įirst of all install update and upgrade your system: $ sudo apt update
