当前位置:网站首页>opencv怎么安装?opencv下载安装教程
opencv怎么安装?opencv下载安装教程
2022-06-25 03:44:00 【程序媛珂珂】
OpenCV是一个基于BSD许可(开源)发行的跨平台计算机视觉库,可以运行在Linux、Windows、Android和Mac OS操作系统上。下面就介绍OpenCV的下载和安装方法。
opencv怎么安装?
软件准备
步骤1:在官网上下载OpenCV的安装包,由于服务器在国外,也可通过网友分享的云盘链接下载

步骤2:打开安装包,选择一个路径后点击“Extract”

步骤3:Visual Studio 2017直接在微软官网下载免费社区版即可。
OpenCV的环境配置
步骤1:点击“此电脑”,右键选择“属性”

步骤2:点击“高级系统设置”

步骤3:选择“环境变量”

步骤4:选中“Path”点击“编辑”

步骤5:点击“编辑文本”

步骤6:在最后面添加“C:\opencv\build\x64\vc14\bin;”点击“确定”,然后注销计算机后才能生效

Visual Studio上的配置
步骤1:首先新建一个“Windows控制台应用程序”的项目

步骤2:找到“视图”->“其他窗口”->“属性管理器”

步骤3:选中“Debug | x64”下的“Microsoft.Cpp.x64.user ”,右键点击“属性”

步骤4:点击“VC++”,选中“包含目录”点击三角形图标,找到“编辑”

步骤5:添加以下路径(具体根据自己的安装位置而定):
C:\opencv\build\include\opencv2
C:\opencv\build\include\opencv
C:\opencv\build\include
然后点击“确定”

步骤6:点击“VC++”,选中“库目录”点击三角形图标,找到“编辑”

步骤7:添加以下路径(具体根据自己的安装位置而定):
C:\opencv\build\x64\vc14\lib
然后点击“确定”

步骤8:找到“链接器”->“输入”下的“附加依赖项” 点击“编辑”

步骤9:添加以下信息:
opencv_world340.lib
opencv_world340d.lib
然后点击“确定”

步骤10:找到“链接器”->“常规”下的“附加库目录”,点击编辑、

步骤11:添加以下路径(具体根据自己的安装位置而定):
C:\opencv\build\x64\vc14\lib
然后点击“确定”

步骤12:下面给出一段代码测试配置是否成功:
#include
#include
#include
using namespace cv;
int main()
{
// 读入一张图片(游戏原画)
Mat img = imread("pic.jpg");
// 创建一个名为 "游戏原画"窗口
namedWindow("游戏原画");
// 在窗口中显示游戏原画
imshow("游戏原画", img);
// 等待6000 ms后窗口自动关闭
waitKey(6000);
}

最后免费分享一些我整理的人工智能学习资料给大家,包括一些AI常用框架实战视频、图像识别、OpenCV、NLQ、机器学习、pytorch、计算机视觉、深度学习与神经网络等视频、课件源码、国内外知名精华资源、AI热门论文、行业报告等。
为了更好的系统学习AI,推荐大家收藏一份。
下面是部分截图,文末附免费下载方式。
一、人工智能课程及项目

二、国内外知名精华资源

三、人工智能论文合集

四、人工智能行业报告

学好人工智能,要多看书,多动手,多实践,要想提高自己的水平,一定要学会沉下心来慢慢的系统学习,最终才能有所收获。
点击下方名片,扫码免费下载文中资料。
边栏推荐
- 俄罗斯AIRI研究院等 | SEMA:利用深度迁移学习进行抗原B细胞构象表征预测
- Teach you how to install win11 system in winpe
- Comprehensive operation of financial risk management X of Dongcai
- Apple's legendary design team disbanded after jobs refused to obey cook
- 【Harmony OS】【ARK UI】ETS 上下文基本操作
- Jilin University 22 spring March "technical economics" assignment assessment-00073
- AI越进化越跟人类大脑像!Meta找到了机器的“前额叶皮层”,AI学者和神经科学家都惊了...
- Is it safe to open an account with flush securities?
- Solution to the problem that Linux crontab timed operation Oracle does not execute (crontab environment variable problem)
- The more AI evolves, the more it resembles the human brain! Meta found the "prefrontal cortex" of the machine. AI scholars and neuroscientists were surprised
猜你喜欢

【Harmony OS】【ARK UI】ETS 上下文基本操作

China's SkyEye found suspicious signals of extraterrestrial civilization. Musk said that the Starship began its orbital test flight in July. Netinfo office: app should not force users to agree to proc

孙武玩《魔兽》?有图有真相

香蕉为什么能做随机数生成器?因为,它是水果界的“辐射之王”

Two common OEE monitoring methods for equipment utilization

The release function completed 02 "IVX low code sign in system production"

2022-06-21-Flink-49(一. SQL手册)

2点睡10点起不算熬夜?除非你每天都能执行

Tensorflow, danger! Google itself is the one who abandoned it

MySQL根据表前缀批量修改、删除表
随机推荐
Redis related-01
Rebeco: using machine learning to predict stock crash risk
How to choose a securities company when opening an account with a compass? Which is safer
论一个优秀红队人员的自我修养
Apple's legendary design team disbanded after jobs refused to obey cook
Deveco studio 3.0 editor configuration tips
Preparedstatement principle of preventing SQL injection
Is it safe to open an account on your mobile phone?
现在,耳朵也要进入元宇宙了
js工具函数,自己封装一个节流函数
TensorFlow,危!抛弃者正是谷歌自己
Jilin University 22 spring March "career design" assignment assessment-00072
X86 CPU, critical! The latest vulnerability has caused heated discussion. Hackers can remotely steal keys. Intel "all processors" are affected
马斯克:推特要学习微信,让10亿人「活在上面」成为超级APP
windows 2003 64位系统php运行报错:1% 不是有效的 win32 应用程序
Void* pointer
Demonstration of combination of dream CAD cloud map and GIS
現在,耳朵也要進入元宇宙了
Lu Qi invests in quantum computing for the first time
你真的需要自动化测试吗?