Table of Contents
1 申明
2 相关框架的安装
2.1 准备工作
2.2 numpy
2.3 sklearn
2.4 TensorFlow
2.5 opencv
2.6 caffe2(纯cpu版)
2.7 caffe(重头戏)
2.7.1 现有的相关配置(因机而异)
2.7.2 需要的配置(基于现有配置和其相互关联)
2.7.3 安装NVIDIA GPU驱动
2.7.4 安装CUDA
2.7.5 配置cuDNN
2.7.6 安装并配置Caffe
3 小结 && 常见问题 && 参考网址
3.1 内存不足
3.2 循环登录
3.3 两个变量的替换
3.3.1 CV_LOAD_IMAGE_COLOR
3.3.2 CV_LOAD_IMAGE_GRAYSCALE
3.4 nvcc fatal : Unknown option ‘fPIC’
3.5 gflags安装的动态链接库没有设置成fPIC
3.6 不同gcc版本的下载和切换
3.6.1 安装gcc
3.6.2 切换gcc
3.7 the ISO C++ 2011错误
3.8 CUDA driver version is insufficient for CUDA runtime version
3.9 Linux下系统自带python和Anaconda切换
3.10 安装opencv的借鉴原文
3.11 安装CUDA、cuDNN的借鉴原文
3.12 安装caffe的借鉴原文
3.13 安装NVIDIA的借鉴原文
3.14 python2 手动安装更新pip
3.15 Python- 解决PIP下载安装速度慢
3.16 关于在ubuntu平台下使用apt-get命令下载速度太慢的问题解决
3.17 Downloading ippicv_linux_20151201.tgz...超时
3.18 Downloading vgg_generated_120.i ... 超时
3.19 Cmake编译opencv源码错误
3.20 git clone速度太慢解决方案
3.21 ImportError:No module named skimage.io
3.23 import caffe失败 No module named caffe
3.24 caffe2安装教程的借鉴原文
ubuntu16.04(建议装双系统,不建议虚拟机,因虚拟机无法更改主机显卡驱动,影响caffe的安装),其上已自带python2.7和python3.5
下面安装中的pip默认是对python2.7的安装,若欲安装在python3.5上,将pip换成pip3即可
注释:opencv和caffe无论python2还是python3都可以import。
所需文件绝大部分均可百度云上获取。
百度云地址:
链接:https://pan.baidu.com/s/1MjiFqAgeNNIyCAg5DqDUqA
提取码:w816
注释:linux安装多用sudo,可以少很多麻烦事……
sudo apt-get update
sudo pip install --upgrade pip
pip升级了,但是新的pip版本在install其他包的时候,会有
from pip import main ImportError: cannot import name 'main'
一类的错误,解决方案是:
pip文件在目录下,cd进去
sudo gedit /usr/bin/pip
进行以下修改——
把下面这行
from pip import main
改成
from pip._internal import main
再装个git,方便下东西
sudo apt-get install git
再装一个CMake,后面用得到
sudo apt install cmake
提示:在安装大型AI框架的时候最好先安装numpy,因为不少框架都依赖它。
一行代码安装:
sudo pip install numpy
又是一行代码安装
sudo pip install sklearn
为了更快乐的生活(画图),可以顺便把matplotlib也装上的
sudo pip install matplotlib
或者
sudo apt-get install python-matplotlib
还是一行代码的事
sudo pip install tensorflow
GPU好的小伙伴可以安装其gpu版本
sudo pip install tensorflow-gpu
剩下这几个框架是重头戏了,开始详细讲解安装过程。
1 简便安装
pip install opencv-python
pip install opencv-contrib-python
2 源码安装
先构建工具
sudo apt-get install build-essential
然后是必须包
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
下面这些包是可选的(韩信点兵,多多益善)
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev
然后下载opencv和opencv的contrib库(保存在~目录)(opencv2)
git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git
或者(推荐opencv3)
wget https://github.com/opencv/opencv_contrib/archive/3.2.0.zip
wget https://github.com/opencv/opencv/archive/3.2.0.zip
接着进入~/opencv目录
cd opencv
创建release文件夹并进入其
mkdir release && cd release
然后使用cmake,根据我们的配置对opencv进行编译,如下
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ~/opencv/
可以看到,结尾的~/opencv_contrib/modules和~/opencv/应该是git下载下来的opencv_contrib和opencv的对应位置,如果不同应对应修改。特别的,其中的“-D CUDA_GENERATION=Kepler”可以解决编译 opencv 的错误:Unsupported gpu architecture 'compute_20'
这需要等待一小会儿……
然后在~/opencv/release目录下
sudo make
等待编译。(不要小看这个make,可能需要一个多小时都不一定,这取决于您的计算机的处理能力)
等不及的可以使用多线程,再其后加上“-jX”(用X个线程)或“-j”(用所有线程),例如
sudo make -j4
最好根据自己的内存来,不然后报内存溢出错误(欲速则不达)。个人建议,一个线程赋予2g的内存量比较稳妥。我是一根8g的内存条,所以用的4个线程。
中间可能会报错
Unable to import the yaml module
解决方案:
sudo pip install pyyaml
再重新make等待至100%,然后安装
sudo make install
最后检查版本(是个X.X.X就说明没问题)
pkg-config --modversion opencv
先安装依赖项:
$ sudo apt-get update
$ sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libgoogle-glog-dev \
libgtest-dev \
libiomp-dev \
libleveldb-dev \
liblmdb-dev \
libopencv-dev \
libopenmpi-dev \
libsnappy-dev \
libprotobuf-dev \
openmpi-bin \
openmpi-doc \
protobuf-compiler \
python-dev \
python-pip
$ sudo pip install \
future \
numpy \
protobuf
$ sudo apt-get install -y --no-install-recommends libgflags-dev
然后下载pytorch(caffe现已整合在其中)
git clone --recursive https://github.com/pytorch/pytorch.git && cd pytorch
更新一波submodule
git submodule update --init
进入pytorch文件夹
cd pytorch
创建build文件夹并进入
mkdir build && cd build
然后编译安装(又是一个多小时……)
cmake ..
中间可能会报错
Unable to import the `typing` module
解决方案
sudo pip install typing
然后回去重复执行cmake,再等到100%,最后安装
sudo make install
然后验证一波安装
python2 -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
结果是Success就对了
python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
结果是0,那是因为这是cpu版本的不是gpu版本的所以能跑就无所谓了。
最后再完善一下环境变量,sudo打开bashrc
sudo gedit ~/.bashrc
任意空行处添加:
export PYTHONPATH=/usr/local:$PYTHONPATH
export PYTHONPATH=~/pytorch/build:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
注意其中的PYTHONPATH=~/pytorch/build如果和你的pytorch目录不同的话,要对应修改。
然后使其生效即可
source ~/.bashrc
最后的快乐生活如下
zjhao666@ubuntu:~$ python2
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import sklearn
>>> import tensorflow as tf
>>> import cv2
>>> import caffe2
>>>
到此则证明以上框架已经全部正确安装完毕
Ubuntu 16.04 x64操作系统, GPU:GM620(集成显卡),MX150(独立显卡)。值得注意的是,这里我选择了集成显卡(应该是错误的),但根据后文来看,CUDA读取的实际是独立显卡,但巧合的是GM620的配置对于MX150同样适用(不影响后文的应用展示)。
之前安装的OpenCV 3.2.0
NVIDIA 显卡驱动(需正确适应GPU)
CUDA 9.0(较为稳定的版本)
cnDNN v7.4.2 (符合CUDA 9.0,但不是唯一)
所以,接下来的工作是
有个暴力安装版本的,愿意等的也可以,这个成功率极高。
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-390 #此处数字要对应上面查询到的版本号
sudo apt-get install mesa-common-dev
sudo reboot
或者更暴力的
sudo ubuntu-drivers autoinstall
安装完显卡驱动后,系统需要重启加载驱动,注意如果按照上述流程进行驱动安装的同学,那在重启系统时,会出现一个蓝色背景的界面 perform mok management , 本人在这一步选择了 continue reboot, 导致新安装的 N 卡驱动没有加载,正确的做法如下:
1. 当进入蓝色背景的界面perform mok management 后,选择 enroll mok ,
2. 进入enroll mok 界面,选择 continue ,
3. 进入enroll the key 界面,选择 yes ,
4. 接下来输入你在安装驱动时输入的密码,
5. 之后会跳到蓝色背景的界面perform mok management 选择第一个 reboot这样,重启后N卡驱动就加载了,恭喜你,Ubuntu 18.04LST 安装成功。
不愿意等的,可以走下面。
首先,去https://www.geforce.cn/drivers(推荐,因网站反应速度较快),或NVIDIA官网http://www.nvidia.com/Download/index.aspx?lang=en-us,查看适合自己显卡的驱动并下载。
如下图所示
点击“开始搜索”,结果如下
推荐第一个,因此我们下载“NVIDIA-Linux-x86_64-390.87”,点击下载图标即可进入下载界面,进行下载。
得到的文件为“NVIDIA-Linux-x86_64-390.87.run”。
首先删除掉电脑上可能存在的其他NVIDIA驱动。
进入文本模式,按键:
CTRL+ALT+F1
接着执行删除操作
sudo apt-get remove nvidia-*
sudo apt-get autoremove
然后通过run文件删除NVIDIA驱动
sudo nvidia-uninstall
接着,重新安装驱动。
进入NVIDIA-Linux-x86_64-390.87.run所在的文件目录,
sudo service lightdm stop
sudo chmod a+x ./NVIDIA-Linux-x86_64-390.87.run
sudo ./NVIDIA-Linux-x86_64-390.87.run -no-x-check -no-nouveau-check -no-opengl-files
参数说明:
-no-x-check安装驱动时关闭x服务;
-no-nouveau-check 安装驱动时禁用Nouveau
-no-opengl-files 安装时只装驱动文件,不安装Opengl
然后重启lightdm
sudo service lightdm restart
这样就实现了NVIDIA GPU驱动的安装,且不会出现循环登录的问题。
重新启动电脑后,登录账号进入推行界面后,输入
sudo nvidia-smi
若如下图所示
则说明NVIDIA已经正常安装。
1 下载CUDA
登录官网 https://developer.nvidia.com/cuda-90-download-archive (CUDA9.0)下载。特别地,要注意CUDA和NVIDIA显卡驱动的适配性。
现在的情况是:
鉴于我们之前下载了NVIDIA-Linux-x86_64-390.87,点击我们配置的对应图标,所以这里我们选择CUDA9.0(进入的也正是9.0的官网)的对应版本进行下载。
2 运行安装程序
进入cuda_9.0.176_384.81_linux.run所在的目录后(我就在~下),
执行以下命令
sudo chmod 777 cuda_9.0.176_384.81_linux.run
sudo ./cuda_9.0.176_384.81_linux.run
注意:执行后会有一系列提示让你确认,但是注意,有个让你选择是否安装nvidia384驱动时,一定要选择否:Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.**? 因为前面我们已经安装了更加新的nvidia384,所以这里不要选择安装。其余的都直接默认或者选择是即可。
3 环境变量设置
打开~/.bashrc文件
sudo gedit ~/.bashrc
将以下内容写入到~/.bashrc尾部:
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
4 测试CUDA是否安装成功
执行以下命令
cd /usr/local/cuda-9.0/samples/1_Utilities/deviceQuery
sudo make
sudo ./deviceQuery
如果显示一些关于GPU的信息,则说明安装成功。如下图所示:
cuDNN是GPU加速计算深层神经网络的库。
1 首先去官网下载cuDNN
cuDNN官网 https://developer.nvidia.com/rdp/cudnn-download,需要注册一个账号才能下载(免费的)。下载cuDNN时也一定要注意与CUDA版本的适配性。
cuDNN在持续更新中,只要对应(我们这里是CUDA9.0)就好了,因此不一定要最新的。我在这里选择的版本是cudnn-9.0-linux-x64-v7.4.2.24.solitairetheme8,即7.4.2版本,不是最新的,但同样可用。
2 进入cuDNN目录后进行解压
sudo tar -xzvf cudnn-9.0-linux-x64-v7.4.2.24.solitairetheme8
得到cuda文件夹
3 进入解压后的文件夹下的include目录
cd cuda/include
sudo cp cudnn.h /usr/local/cuda/include
4 进入lib64目录下,对动态文件进行复制和软链接
cd ..
cd lib64
sudo cp lib* /usr/local/cuda/lib64/
cd /usr/local/cuda/lib64/
sudo rm -rf libcudnn.so libcudnn.so.7
sudo ln -s libcudnn.so.7.4.2 libcudnn.so.7
sudo ln -s libcudnn.so.7 libcudnn.so
1 安装相关依赖
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
2 下载Caffe
git命令行下载
git clone https://github.com/BVLC/caffe.git
或在git网站 https://github.com/BVLC/caffe 上,下载zip后用unzip命令解压。
unzip caffe-master.zip
sudo mv caffe-master caffe
cd caffe
3 修改Makefile.config
因为make指令只能make Makefile.config文件,而Makefile.config.example是caffe给出的makefile例子。因此,首先将Makefile.config.example的内容复制到Makefile.config:
sudo cpMakefile.config.example Makefile.config
打开Makefile.config文件
sudo gedit Makefile.config
并根据个人情况,这里以我为例,作如下修改:
(1)使用了cudnn,则将
#USE_CUDNN:= 1
修改成:
USE_CUDNN:= 1
(2)使用了opencv,且版本是3的,则将
# USE_OPENCV := 0
改成
USE_OPENCV := 1
,并把
# OPENCV_VERSION:= 3
改成
OPENCV_VERSION:= 3
(3)要使用python来编写layer,则将
# WITH_PYTHON_LAYER:= 1
改为
WITH_PYTHON_LAYER := 1
(4)重要的一项,将
#Whatever else you find you need goes here.
下面的
INCLUDE_DIRS:= $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS:= $(PYTHON_LIB) /usr/local/lib /usr/lib
INCLUDE_DIRS:= $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS:= $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
这是因为Ubuntu16.04的文件包含位置发生了变化,尤其是需要用到的hdf5的位置,所以需要更改这一路径。
4 修改Makefile文件
打开Makefile文件,做如下修改,将:
NVCCFLAGS +=-ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
改为
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
特别提醒, -Xcompiler前有一个空格,不少博客没有该空格会导致后期的错误。
5 编译
make all -j4
同前文一样,一个线程给2g内存比较稳妥。否则中途很可能会报错退出,欲速则不达。
6 测试
sudo make runtest
正确结果如下
到此,caffe框架已被正确安装。
有一个奇怪的bug,当我同时make opencv和caffe两个框架的时候,出现了部分字段如下
c : internal compiler error: 段错误 (program cc1plus) Please submit a full
的bug,查看原因是因为内存不足,所以请分开安装,等待编译和安装的时候可以干其他事情。
安装显卡驱动失败后,导致Ubuntu处于循环登录状态,解决方案可参考:
http://www.cnblogs.com/talugirl/p/5870875.html
或
https://blog.csdn.net/emiedon/article/details/79589526
提示:这两者都失败也不妨多百度或者谷歌,重装系统代价太大了。
来自以下两个编译时的错误
make error:/caffe2/caffe2/image/image_input_op.h:277:20: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope #755
将 CV_LOAD_IMAGE_COLOR 替换为 cv::IMREAD_COLOR 或 IMREAD_COLOR
参考网址
https://github.com/facebookarchive/caffe2/issues/755
Traceback (most recent call last):
File "/Users/n1/Desktop/FaceDetection/face.py", line 8, in
gray = imread(fname, CV_LOAD_IMAGE_GRAYSCALE )
NameError: name 'CV_LOAD_IMAGE_GRAYSCALE' is not defined
将 CV_LOAD_IMAGE_GRAYSCALE 替换为 cv::ImreadModes::IMREAD_GRAYSCALE
参考网址
https://stackoverflow.com/questions/27424285/cv-load-image-grayscale-is-not-definedpy
这两个问题应该是opencv2和3的版本差异导致的。
其实之前我提到过,是-Xcompiler之前少了一个空格,即
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX)-Xcompiler -fPIC $(COMMON_FLAGS)
正确应为
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
参考网址
https://blog.csdn.net/u013524303/article/details/81609643
编译过程中在make的时候出现下面的错误。
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: 无法添加符号: 错误的值
参考网址
https://blog.csdn.net/xiaolangwj/article/details/79100667
因为有的软件版本需要高版本或者低版本的gcc或者g++,以支持正常的编译,所以
参考网址
https://blog.csdn.net/weixin_35762621/article/details/80336291
参考网址
https://blog.csdn.net/lyy14011305/article/details/63685779?utm_source=blogxgwz3
#error This file requires compiler and library support for the ISO C++ 2011
参考网址
https://blog.csdn.net/jay463261929/article/details/59591104
参考网址
https://blog.csdn.net/nijun1992/article/details/80446226
参考网址
https://blog.csdn.net/zhangxinyu11021130/article/details/64125058
参考网址
http://embedonix.com/articles/image-processing/installing-opencv-3-1-0-on-ubuntu/
参考网址
https://blog.csdn.net/u010801439/article/details/80483036
参考网址
https://blog.csdn.net/yggaoeecs/article/details/79163789
https://blog.csdn.net/qq_35451572/article/details/79743476
参考网址
https://blog.csdn.net/linhai1028/article/details/79445722
参考网址
https://blog.csdn.net/qiang12qiang12/article/details/76216399
要才能下的资源,开头的百度云网盘里也有的。
参考网址
https://blog.csdn.net/qq_16481211/article/details/81081996
参考网址
https://www.cnblogs.com/tademeng/p/7451125.html
方法参考网址
https://blog.csdn.net/fjx812/article/details/54946021
ippicv_linux_20151201.tgz免费下载地址
参考网址
https://github.com/opencv/opencv_3rdparty/blob/ippicv/master_20151201/ippicv/ippicv_linux_20151201.tgz
方法
openc3.2进行cmake时需要下载的文件。 下载vgg_generated_120.i放在opencv_contrib/modules/xfeatures2d/cmake/.download/e8d0dcd54d1bcfdc29203d011a797179。
下载地址
见开头的百度云盘(csdn上c币太贵了)。
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev
linked by target "opencv_test_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev/test
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_test_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_perf_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_test_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_perf_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_test_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_test_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_perf_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_test_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_test_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_perf_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_test_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_perf_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_test_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_perf_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_test_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_perf_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_perf_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_test_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_test_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_perf_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_perf_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_test_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_test_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_test_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_perf_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_perf_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_test_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_test_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_perf_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_test_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts
linked by target "opencv_test_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_perf_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_test_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_perf_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_test_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_perf_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_test_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_perf_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_perf_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_test_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_test_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_perf_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_perf_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_test_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_test_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_perf_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_test_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_perf_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab
linked by target "opencv_traincascade" in directory D:/Cproject/opencv/opencv/sources/apps/traincascade
linked by target "opencv_createsamples" in directory D:/Cproject/opencv/opencv/sources/apps/createsamples
linked by target "opencv_annotation" in directory D:/Cproject/opencv/opencv/sources/apps/annotation
linked by target "opencv_visualisation" in directory D:/Cproject/opencv/opencv/sources/apps/visualisation
linked by target "opencv_version" in directory D:/Cproject/opencv/opencv/sources/apps/version
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev
linked by target "opencv_test_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev/test
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_test_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_perf_core" in directory D:/Cproject/opencv/opencv/sources/modules/core
linked by target "opencv_test_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_perf_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_test_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_test_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_perf_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc
linked by target "opencv_test_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml
linked by target "opencv_test_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_perf_video" in directory D:/Cproject/opencv/opencv/sources/modules/video
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_test_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_perf_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_test_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_perf_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_test_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_perf_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc
linked by target "opencv_perf_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_test_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_test_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_perf_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs
linked by target "opencv_perf_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_test_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo
linked by target "opencv_test_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape
linked by target "opencv_test_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_perf_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_perf_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_test_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_test_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui
linked by target "opencv_perf_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_test_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts
linked by target "opencv_test_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_perf_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_test_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_perf_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_test_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_perf_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_test_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_perf_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_perf_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_test_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_test_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_perf_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow
linked by target "opencv_perf_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_test_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo
linked by target "opencv_test_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_perf_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_test_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_perf_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab
linked by target "opencv_traincascade" in directory D:/Cproject/opencv/opencv/sources/apps/traincascade
linked by target "opencv_createsamples" in directory D:/Cproject/opencv/opencv/sources/apps/createsamples
linked by target "opencv_annotation" in directory D:/Cproject/opencv/opencv/sources/apps/annotation
linked by target "opencv_visualisation" in directory D:/Cproject/opencv/opencv/sources/apps/visualisation
linked by target "opencv_version" in directory D:/Cproject/opencv/opencv/sources/apps/version
参考网址
https://blog.csdn.net/u014613745/article/details/78310916
参考网址
https://blog.csdn.net/hzwwpgmwy/article/details/79043251
参考网址
https://blog.csdn.net/m0_37407756/article/details/70789271 (错误5)
参考网址
https://blog.csdn.net/dc1994dc/article/details/79162886
https://blog.csdn.net/sinat_23619409/article/details/85047788
参考网址
https://blog.csdn.net/a8039974/article/details/79708457
参考网址
https://blog.csdn.net/lemonaha/article/details/71436327