在 Ubuntu 20.04 上安装 OpenCV 可以通过以下步骤进行:
- 安装必要的工具:
sudo apt update
sudo aptinstall build-essential cmake git pkg-config
sudo apt install libjpeg-dev libtiff-dev libjasper-dev libpng-dev
sudo apt install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt install libxvidcore-dev libx264-dev
sudo apt install libgtk-3-dev
sudo apt install libatlas-base-dev gfortran