OpenCV安装要点

OpenCV安装要点
1、设置系统和用户环境变量PATH指向opencv\build\x86\vc10\bin或者opencv\build\x64\vc10\bin
2、新建用户环境变量OpenCV指向opencv\build
3、配置VS2010(2.4.9版本)

  可执行文件目录
  C:\Program Files (x86)\opencv\build\x86\vc10\bin* 或者
  C:\Program Files (x86)\opencv\build\x64\vc10\bin

  设定相关的INCLUDE:
  C:\Program Files (x86)\opencv\build\include
  C:\Program Files (x86)\opencv\build\include\opencv
  C:\Program Files (x86)\opencv\build\include\opencv2

  设定相关的LIB目录
  C:\Program Files (x86)\opencv\build\x86\vc10\lib* 或者
  C:\Program Files (x86)\opencv\build\x64\vc10\lib

设定连接附加输入(我认为可以做成#paragma comment( lib, "" )的方式,直接拷贝下面的代码到.h文件即可链接相关库
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#ifdef _DEBUG

#pragma comment( lib, "opencv_calib3d249d.lib" )
#pragma comment( lib, "opencv_contrib249d.lib" )
#pragma comment( lib, "opencv_core249d.lib" )
#pragma comment( lib, "opencv_features2d249d.lib" )
#pragma comment( lib, "opencv_flann249d.lib" )
#pragma comment( lib, "opencv_gpu249d.lib" )
#pragma comment( lib, "opencv_highgui249d.lib" )
#pragma comment( lib, "opencv_imgproc249d.lib" )
#pragma comment( lib, "opencv_legacy249d.lib" )
#pragma comment( lib, "opencv_ml249d.lib" )
#pragma comment( lib, "opencv_nonfree249d.lib" )
#pragma comment( lib, "opencv_objdetect249d.lib" )
#pragma comment( lib, "opencv_ocl249d.lib" )
#pragma comment( lib, "opencv_photo249d.lib" )
#pragma comment( lib, "opencv_stitching249d.lib" )
#pragma comment( lib, "opencv_superres249d.lib" )
#pragma comment( lib, "opencv_ts249d.lib" )
#pragma comment( lib, "opencv_video249d.lib" )
#pragma comment( lib, "opencv_videostab249d.lib" )

#else

#pragma comment( lib, "opencv_calib3d249.lib" )
#pragma comment( lib, "opencv_contrib249.lib" )
#pragma comment( lib, "opencv_core249.lib" )
#pragma comment( lib, "opencv_features2d249.lib" )
#pragma comment( lib, "opencv_flann249.lib" )
#pragma comment( lib, "opencv_gpu249.lib" )
#pragma comment( lib, "opencv_highgui249.lib" )
#pragma comment( lib, "opencv_imgproc249.lib" )
#pragma comment( lib, "opencv_legacy249.lib" )
#pragma comment( lib, "opencv_ml249.lib" )
#pragma comment( lib, "opencv_nonfree249.lib" )
#pragma comment( lib, "opencv_objdetect249.lib" )
#pragma comment( lib, "opencv_ocl249.lib" )
#pragma comment( lib, "opencv_photo249.lib" )
#pragma comment( lib, "opencv_stitching249.lib" )
#pragma comment( lib, "opencv_superres249.lib" )
#pragma comment( lib, "opencv_ts249.lib" )
#pragma comment( lib, "opencv_video249.lib" )
#pragma comment( lib, "opencv_videostab249.lib" )

#endif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

OpenCV安装要点

时间: 2024-10-11 13:09:05

OpenCV安装要点的相关文章

OpenCV安装和测试

参考链接:http://blog.csdn.net/bruce_zeng/article/details/7961153 OpenCv下载链接:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/ 下载的是 OpenCV-2.2.0-win32-vs2010.exe,傻瓜式安装.安装过程中勾选"Add OpenCV to system PATH for all users"选项.或者安装完后自己添加环境变

OPenCv学习一:opencv安装与环境配置

参考自:http://blog.csdn.net/poem_qianmo/article/details/19809337 一.            所需工具与准备工作 1.OpenCV版本:3.00 下载地址: http://www.opencv.org.cn/index.php/Download 2.编译环境:VS2010 3.安装OpenCV,本文安装路径为:D:\professional\OpenCV 二.            环境变量配置: 在开始菜单找到计算机,右键“属性”. 点

day1 Opencv安装

1.环境 win7 64 python3.5 2.openCV安装 以管理员身份运行cmd pip install --upgrade setuptools pip install numpy Matplotlib pip install opencv-python

opencv安装-ubuntu18.04

opencv安装 opencv安装报错: In file included from /usr/include/host_config.h:50:0, from /usr/include/cuda_runtime.h:78, from <command-line>:0: /usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not

Python版本OpenCV安装配置及简单实例

# 2018-06-03 # 1. Python下载:https://www.python.org/downloads/ 选择对应平台对应版本的的Python进行安装. 2. Python版OpenCV安装: 如果Python环境已在电脑中全局配置,则可以直接用 pip 包管理工具进行安装,打开cmd直接输入: pip3 install opencv-python 如果没有配置Python环境或者Python是隔离的,可以到相应文件夹下调用pip工具,如下图: 3. 简单实例,通过Python的

openCV安装配置及图像腐蚀实验(VS2017)

1.在openCV官网(https://opencv.org/)上下载了4.2.0版本,存放在了D盘(记清地址,后续会用到),解压缩后显示一个文件夹如下: 2. 接下来配置环境变量:电脑(Win10)--->属性--->高级系统设置--->环境变量--->Path中添加openCV的bin路径: 我添加的路径图中红框所示,bin路径就是在刚才安装的openCV目录下,具体如下:A.opencv文件夹下打开build文件夹:B.build文件夹里有一个bin文件,不是我们所需要的,应

Ubuntu16.04安装tensorflow+安装opencv+安装openslide+安装搜狗输入法

Ubuntu16.04在cuda以及cudnn安装好之后,安装tensorflow,tensorflow以及opencv可以到网上下载对应的安装包并且直接在安装包所在的路径下直接通过pip与conda进行安装,如下图所示: 前提是要下载好安装包.安装好tensorflow之后还需要进行在~/.bashrc文件中添加系统路径,如下图所示 Openslide是医学图像一个重要的库,这里给出三条命令进行安装 sudo apt-get install openslide-tools sudo apt-g

pycharm 和 Anaconda 下的 opencv 安装

学习真的切忌三天打鱼两天晒网!! 一开始python下的opencv已经都弄好了,中间电脑坏了一次,好久没有接触这个,就全部都忘完了.深感惋惜. 今天又从新安装了一下opencv.在anaconda下的安装非常的方便,只要把opencv下的一个cv2.pyd文件复制到anaconda下就可以了.具体操作是: 先找到你的opencv路径下的cv2.pyd,------------------D:\Program Files\opencv\build\python\2.7\x64 将cv2.pyd复

opencv安装及学习资料

第一次装时win7+VS2010+opencv3.0,结果不成功,原因解压出来的没有vc10,可能新版本不在支持vc的旧版本了.所以换了VS2013+opencv3.0,比较经典的安装时VS2010+opencv2.4.9,新版本有很多函数或地址改动了,3.0有时视屏可能会出错. 以下是我VS2013+opencv3.0的安装过程: 下面开始介绍如何配置,我用的系统是win8.1 64位系统,vs用的是vs3013 ultimate,先到官网下载opencv 我用的的版本是最新的版本3.0 AL