![]() While installing a packaged version from the Ubuntu repositories is easier, building OpenCV from source gives you more flexibility, and it should be your first choice when installing OpenCV. The method you choose depends on your needs and preferences. We have shown you two different ways to install OpenCV on an Ubuntu 20.04 and Ubuntu 21.04 server. How to install and configure Java on Ubuntu 20.04 Conclusion ![]() Once done, you should see something like below:ĥ) Install OpenCV by typing: sudo make installĦ) To check if OpenCV has been installed successfully, enter the following command and you will see the OpenCV version: pkg-config -modversion opencv4 4.2.0 python3 -c "import cv2 print(cv2._version_)" 4.2.0-dev The Compilation process may take a few minutes or more, depending on your system configuration. If you don’t know the number of cores on your processor, you can find it by typing the command nproc. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process. For those of you who didn’t know, CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. When the CMake build system is complete, you should see something like below:Ĥ) Start the compilation process: make -j2Ĭhange the flag -jaccording to your processor. In this tutorial, we will show you how to install CMake on Ubuntu 20.04 LTS. D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ Set up an OpenCV build with CMake: cmake -D CMAKE_BUILD_TYPE=RELEASE \ If you want to install an older version of OpenCV, do so cdto the directory opencvand opencv_contriband run git checkout ģ) Once the download is complete, create a temporary build directory, and go to it: cd ~/opencv_build/opencv mkdir build
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |