当前位置:网站首页>win10+opencv3.2+vs2015配置
win10+opencv3.2+vs2015配置
2022-07-29 05:19:00 【科学财子】
先前查了一些关于win10+opencv3.0(2.xx)+vs配置的文章,准备以此为样本来配置一下新的vs2015+opencv3.2+win10,但结果都失败了,最终自己的一些摸索,终于得到了正确的配置方法(此次最新版本的配置方法简单了许多)。
第一步还是系统环境变量配置。系统环境中,在点击编辑,然后新建一个系统变量。而这个环境变量的值就是你的opencv解压放置的文件中的cv14.bin的路径。比如我吧opencv解压的文件的文件放在d盘一个opencv文件中,所有就有环境变量的值为:D:\opencv\opencv\build\x64\vc14\bin。
第二步:系统环境变量配置好了,就直接在vs2015中再进行配置,不需要重启电脑(本人亲测)。vc++,win32控制台程序,可以选择空项目(也可以不选)。然后再视图中找到属性管理器,展开其中内容,在debug|X64选项中右击(或者双击),然后选择添加新项目属性表,之后就自己命名(opencv官网上命名为opencv_debug与opencv_release,在此与其保持一致,你也可以命名别的名字)
在通用属性--->vc++目录--->包含目录,编辑,填写包含opencv文件中的include文件及include文件下的opencv,opencv2文件的路径(直接点击后面的“···”,就可以直接浏览)
之后在库目录中添加一个opencv文件中的build--->X64--->vc14--->lib的路径就可以了
第三步:在本属性表的链接器中选择输入项,添加依赖项,手工输入opencv_world320d.lib就可以了。
本步切记不要在链接器常规中的添加附加库目录添加东西,否则将报错——无法打开opencv_world320.lib。(但有些博文上提到3.0以前的好像可以在链接器——》常规中添加某些东西,在3.2似乎不行,添加之后运行直接报错,本人亲测)
关于配置就差不多了,后面就随便找个网上的程序测试一下就可以了。这简单附一个(改一下imaread中的图片地址):
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
Mat image = imread("E:\\picture\\27b58PICm6Q_1024.jpg");
namedWindow("测试图片");
imshow("测试", image);
waitKey(6000);
return 0;
}
如果你配置中遇到什么问题,可以留言给我哦,我也想多学习一下哦
边栏推荐
- [untitled]
- 如何 Pr 一个开源composer项目
- WIN10 编译ffmpeg(包含ffplay)
- DAY4:MySQL 数据库的建立及简单实用
- [C language series] - storage of deep anatomical data in memory (I) opening of summer vacation
- [electronic circuit] how to select ADC chip
- 365 day challenge leetcode1000 question - day 036 binary tree pruning + subarray and sorted interval sum + delete the shortest subarray to order the remaining arrays
- Question swiping Madness - leetcode's sword finger offer58 - ii Detailed explanation of left rotation string
- 【无标题】
- HCIA-R&S自用笔记(26)PPP
猜你喜欢
![[C language series] - string + partial escape character explanation + annotation tips](/img/75/698ba0672af9d6118ee7e2fdf6daae.png)
[C language series] - string + partial escape character explanation + annotation tips
![[C language series] - a recursive topic](/img/a2/9d65728e672ab16c4fc0d427c241c4.png)
[C language series] - a recursive topic

Playwright实战案例之爬取js加密数据

实现table某个单元格背景色设置

Hcia-r & s self use notes (26) PPP

微信小程序-屏幕高度

Wechat applet - component parameter transmission, state management

JDBC连接数据库详细步骤

QFrame类学习笔记

Laravel Swagger添加访问密码
随机推荐
JS simple code determines whether the device that opens the page is the PC end of the computer, the H5 end of the mobile phone, or the wechat end
大部分PHP程序员,都搞不懂如何安全代码部署
[C language series] - constants and variables that confuse students
TXT 纯文本操作
【TypeScript】深入学习TypeScript对象类型
uniapp之常用提示弹框
Record the SQL injection vulnerability of XX company
农村品牌建设给年轻人的一些机会
Win10 搭建MSYS2环境
Flask 报错 RuntimeError: The session is unavailable because no secret key was set.
Thinkphp6管道模式Pipeline使用
Masscan tutorial
解决表单校验提示信息不消失问题以及赋值不生效问题
用sql-client.sh生成的job在cancle过后 如何实现断点续传?
uniapp组件之倒计时(如阅读协议倒计时、完成学习倒计时)
Basic concepts of MySQL + database system structure + extended application + basic command learning
[untitled]
Thrift安装手册
AR虚拟增强与现实
相对定位和绝对定位