fedora 29 opencv opencv_contrb

dependence

yum install cmake
yum install python-devel numpy
yum install gcc gcc-c++
yum install gtk2-devel
yum install libdc1394-devel

-------------------how to install ffmpeg on fedora--------------------------------------------------------------------------------------------------
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg ffmpeg-devel

来源:https://tecadmin.net/install-ffmpeg-on-fedora/; 
---------------------------------------------------------------------------------------------------------------------------------------------------------------

yum install gstreamer-plugins-base-devel
yum install libpng-devel
yum install libjpeg-turbo-devel
yum install jasper-devel
yum install openexr-devel
yum install libtiff-devel
yum install libwebp-devel
yum install tbb-devel  //if you need TBB ,add  -D WITH_TBB=ON;
yum install eigen3-devel //OpenCV uses another library Eigen for optimized mathematical operations. if you want to use it, don't forget to to add -D WITH_EIGEN=ON;
yum install doxygen  //if you want to build offline documentation that you need not access the internet always if any question,don't forget to add -D BUILD_DOCS=ON;

来源:https://docs.opencv.org/master/dd/dd5/tutorial_py_setup_in_fedora.html;

CMake

cmake 
D CMAKE_BUILD_TYPE=RELEASE  
D CMAKE_INSTALL_PREFIX=/usr/local  
-D WITH_TBB=ON  
-D WITH_V4L=ON   
-D WITH_OPENGL=ON  
-D BUILD_TIFF=ON  
-D OPENCV_EXTRA_MODULES_PATH=/home/li/opencv/opencv_contrib/modules  
-D WITH_EIGEN=ON 
-D BUILD_EXAMPLES=OFF 
-D OPENCV_ENABLE_NONFREE:BOOL=ON ..
-------------then-----------------------------
make -j8
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

转载来源:https://www.jianshu.com/p/5edff54264f9

CMakeLists.txt

cmake_minimum_required(VERSION 2.8)
project(opencv)
FIND_PACKAGE( OpenCV REQUIRED )
aux_source_directory(source DIR_SRCS)
add_executable(test ${DIR_SRCS})
target_link_libraries(test ${OpenCV_LIBS})
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值