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

二、国内外知名精华资源

三、人工智能论文合集

四、人工智能行业报告

学好人工智能,要多看书,多动手,多实践,要想提高自己的水平,一定要学会沉下心来慢慢的系统学习,最终才能有所收获。
点击下方名片,扫码免费下载文中资料。
边栏推荐
- How to choose a securities company when opening an account with a compass? Which is safer
- Understand (DI) dependency injection in PHP
- ICML 2022 | 字节跳动 AI Lab 提出多模态模型:X-VLM,学习视觉和语言的多粒度对齐...
- Create SQLite table with shell script and add SQL statement -- General
- 腾讯开源项目「应龙」成Apache顶级项目:前身长期服务微信支付,能hold住百万亿级数据流处理...
- Huawei failed to appeal and was prohibited from selling 5g equipment in Sweden; Apple regained the first place in the world in terms of market value; DeNO completes round a financing of USD 21million
- Jilin University 22 spring March "official document writing" assignment assessment-00034
- Do you really need automated testing?
- Copilot免费时代结束!正式版67元/月,学生党和热门开源项目维护者可白嫖
- Maybe it's the wrong reason
猜你喜欢

Internet Explorer died, and netizens started to build a true tombstone

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

后台页制作01《ivx低代码签到系统制作》

TC object structure and abbreviation

中国天眼发现地外文明可疑信号,马斯克称星舰7月开始轨道试飞,网信办:APP不得强制要求用户同意处理个人信息,今日更多大新闻在此...

ICML 2022 | ByteDance AI Lab proposes a multimodal model: x-vlm, learning multi granularity alignment of vision and language

Collaboration + Security + storage, cloud box helps Shenzhen edetai restructure its data center

AI writes its own code to let agents evolve! The big model of openai has the flavor of "human thought"

Maintenant, les oreilles vont entrer dans le métacosme.

The era of copilot free is over! The official version is 67 yuan / month, and the student party and the defenders of popular open source projects can prostitute for nothing
随机推荐
亚马逊在中国的另一面
Create SQLite table with shell script and add SQL statement -- General
Now, the ear is going into the metauniverse
Comprehensive operation of financial risk management X of Dongcai
Two common OEE monitoring methods for equipment utilization
Preparedstatement principle of preventing SQL injection
Teach you how to install win11 system in winpe
Does it count as staying up late to sleep at 2:00 and get up at 10:00? Unless you can do it every day
Deveco studio 3.0 editor configuration tips
墨天轮访谈 | IvorySQL王志斌—IvorySQL,一个基于PostgreSQL的兼容Oracle的开源数据库
Jilin University 22 spring March "official document writing" assignment assessment-00029
Peking University has a new president! Gongqihuang, academician of the Chinese Academy of Sciences, took over and was admitted to the Physics Department of Peking University at the age of 15
扎克伯格最新VR原型机来了,要让人混淆虚拟与现实的那种
Wuenda, the new course of machine learning is coming again! Free auditing, Xiaobai friendly
Is it safe to open an account on your mobile phone?
多睡觉,能减肥,芝加哥大学最新研究:每天多睡1小时,等于少吃一根炸鸡腿...
OpenSUSE installation pit log
Tencent's open source project "Yinglong" has become a top-level project of Apache: the former long-term service wechat payment can hold a million billion level of data stream processing
太极图形60行代码实现经典论文,0.7秒搞定泊松盘采样,比Numpy实现快100倍
Nacos practice record