1,安装依赖:
sudo dnf install gcc gcc-c++ ncurses-devel cmake
sudo dnf install gtk2 gtk2-devel gtk2-devel-docs
sudo dnf install libgnome-devel gnome-devel-docs
sudo dnf install zlib glib atk pango gdk-pixbuf2 gdk-pixbuf2-devel
sudo dnf install gtk+ gtk2-devel pkgconfig python-devel python-numpydoc
sudo dnf install libavc1394 libavc1394-devel libdc1394 libdc1394-devel jasper-devel
sudo dnf install ffmpeg ffmpeg-devel openjpeg-devel libjpeg-devel libpng-devel libtiff-devel
2,下载opencv3.4.1安装包:
官网下载巨慢,附一个自己上传的链接传送门
3,安装opencv3.4.1
tar -xzvf OpenCV3.4.1.tar.gz
cd opencv-3.4.1/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -DINSTALL_CREATE_DISTRIB=ON -DWITH_LIBV4L=ON ..
make -j8
make install
来源:CSDN
作者:sac761
链接:https://blog.csdn.net/sac761/article/details/103726065