Virtual machine Ubuntu installs opencv 4.5.4
Article directory
1. Environment
-
VMware Workstation virtual machine
-
Ubuntu 18.04.5 LTS
2. Prepare
- Replace the source of the system with Tsinghua source
Tsinghua source: ubuntu Tsinghua University open source software mirror station
- In "Software and Updates", turn on "Critical Security Updates" and "Recommended Updates"
Note: This step is to avoid that some packages cannot be installed later.
3. Installation
Installation tutorial: Ubuntu18.04 install opencv4.5
Notice:
- The cmake steps in the tutorial should use the following instructions (there is an extra "-D" in the original text)
cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=Release -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_ENABLE_NONFREE=True ..
- Test after the installation is complete, if the camera cannot be turned on
USB compatibility setting: install opencv on Ubuntu under VMware and capture the camera
Removable Devices Settings: VMware Enables Laptop Webcams
4. Complete
The result after running the test program is as follows: