![]() D OPENCV_EXTRA_MODULES_PATH=././opencv_contrib/modules \ D OPENCV_PYTHON3_INSTALL_PATH=$cwd/OpenCV-$cvVersion-p圓/lib/python3.5/site-packages \ D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-"$cvVersion" \ Now, we will compile the binaries of OpenCV by using the cmake command: $ cmake -D CMAKE_BUILD_TYPE=RELEASE \ ![]() Now again we will navigate to the opencv directory, will make a directory of “build” and also navigate to it using the command: $ cd opencv & mkdir build & cd build Similarly, to the OpenCV, we will check the version of OpenCV contribution using the command: $ cd opencv_contrib & git checkout $cvVersion & cd Step 3: Compile the installation files of OpenCV We will clone the git repository of OpenCV from the GitHub and also OpenCV contribution by using the command: $ git clone & git clone Step 2: Confirm the version of OpenCv and OpenCv_contribĪfter cloning both the OpenCV and OpenCV contribution, we will navigate to the OpenCV directory and check the version of OpenCV that is cloned from GitHub: $ cd opencv & git checkout $cvVersion & cd We will follow the below-mentioned steps to install OpenCV on Ubuntu. ![]() ![]() To confirm the installation of OpenCV by the above-executed command, we will display its version: $ python3 -c "import cv2 print(cv2._version_)"Īnd to uninstall the package of OpenCV, we will use the command: $ sudo apt purge python3-opencv -y Method 2: How to install OpenCV on Ubuntu 22.04 using the Github ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |