当前位置:网站首页>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,推荐大家收藏一份。
下面是部分截图,文末附免费下载方式。
一、人工智能课程及项目

二、国内外知名精华资源

三、人工智能论文合集

四、人工智能行业报告

学好人工智能,要多看书,多动手,多实践,要想提高自己的水平,一定要学会沉下心来慢慢的系统学习,最终才能有所收获。
点击下方名片,扫码免费下载文中资料。
边栏推荐
- Configuration source code
- js工具函数,自己封装一个节流函数
- 扎克伯格最新VR原型机来了,要让人混淆虚拟与现实的那种
- 严重的PHP缺陷可导致QNAP NAS 设备遭RCE攻击
- ZABBIX installation pit avoidance Guide
- ASP. Net conference room booking applet source code booking applet source code
- Maintenant, les oreilles vont entrer dans le métacosme.
- How to play well in the PMP Exam?
- Self cultivation and learning encouragement
- Sorting of poor cattle (winter vacation daily question 40)
猜你喜欢

程序猿职业发展9项必备软技能

谷歌创始人布林二婚破裂:被曝1月已提出与华裔妻子离婚,目前身家6314亿美元...

Self cultivation and learning encouragement

Musk was sued for $258billion in MLM claims. TSMC announced the 2nm process. The Chinese Academy of Sciences found that the lunar soil contained water in the form of hydroxyl. Today, more big news is

Apple's legendary design team disbanded after jobs refused to obey cook

Xidian AI ranked higher than Qingbei in terms of AI majors, and Nantah ranked the first in China in 2022 in terms of soft science majors

TensorFlow,危!抛弃者正是谷歌自己

如何使用IDE自动签名调试鸿蒙应用

Perfect shuffle problem

MySQL根据表前缀批量修改、删除表
随机推荐
陆奇首次出手投资量子计算
【Harmony OS】【ARK UI】ETS 上下文基本操作
威马招股书拆解:电动竞争已结束,智能排位赛刚开始
TensorFlow,危!抛弃者正是谷歌自己
Is it safe to open a stock account on Huatai Securities?
Tai Chi graphics 60 lines of code to achieve classic papers, 0.7 seconds to get Poisson disk sampling, 100 times faster than numpy
Amazon's other side in China
严重的PHP缺陷可导致QNAP NAS 设备遭RCE攻击
AI越进化越跟人类大脑像!Meta找到了机器的“前额叶皮层”,AI学者和神经科学家都惊了...
Jilin University 22 spring March "official document writing" assignment assessment-00084
(超详细onenet TCP协议接入)arduino+esp8266-01s接入物联网平台,上传实时采集数据/TCP透传(以及lua脚本如何获取和编写
Tensorflow, danger! Google itself is the one who abandoned it
OpenSUSE installation pit log
Standing at the center of the storm: how to change the engine of Tencent
The sign in function completes 03 "IVX low code sign in system production"
windows 2003 64位系统php运行报错:1% 不是有效的 win32 应用程序
PHP uses getid3 to obtain the duration of MP3, MP4, WAV and other media files
Jilin University 22 spring March "official document writing" assignment assessment-00029
Copilot免费时代结束!正式版67元/月,学生党和热门开源项目维护者可白嫖
【组队学习】SQL编程语言笔记——Task04