opencv3.4.1+ubuntu18.04+anaconda 源码编译
作者:互联网
sudo apt-get install -y \
libglew-dev \
libtiff5-dev \
zlib1g-dev \
libjpeg-dev \
libpng-dev \
libjasper-dev \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libpostproc-dev \
libswscale-dev \
libeigen3-dev \
libtbb-dev \
libgtk2.0-dev \
cmake \
pkg-config
安装libjasper-dev依赖包出现如下错误
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt install libjasper1 libjasper-dev
cmake -D WITH_TBB=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D CMAKE_INSTALL_PREFIX=./install \
-D WITH_V4L=ON \
-D WITH_OPENGL=ON \
-D WITH_VTK=ON \
-D WITH_GTK=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D WITH_IPP=OFF \
-D WITH_CUDA=OFF \
-D BUILD_opencv_cudacodec=OFF \
-D PYTHON_DEFAULT_EXECUTABLE=/home/gris/anaconda3/envs/tf/bin/python3 \
-D BUILD_opencv_python3=ON \
-D BUILD_opencv_python2=OFF \
-D PYTHON3_PACKAGES_PATH=/home/gris/anaconda3/envs/tf/lib/python3.7/site-packages/ \
-D PYTHON3_EXCUTABLE=/home/gris/anaconda3/envs/tf/bin/python3.7m \
-D PYTHON3_INCLUDE_DIR=/home/gris/anaconda3/envs/tf/include/python3.7m \
-D PYTHON3_LIBRARY=/home/gris/anaconda3/envs/tf/lib/libpython3.7m.so.1.0 \
-D PYTHON_NUMPY_PATH=/home/gris/anaconda3/envs/tf/lib/python3.7/site-packages/ \
-D BUILD_EXAMPLES=ON \
-D BUILD_LIBPROTOBUF_FROM_SOURCES=ON \
-D BUILD_opencv_hdf=OFF \
..
标签:gris,envs,dev,源码,BUILD,home,tf,opencv3.4,ubuntu18.04 来源: https://www.cnblogs.com/gris/p/11875863.html