当前位置:网站首页>visual stdio 2017关于opencv4.1的环境配置
visual stdio 2017关于opencv4.1的环境配置
2022-07-07 10:33:00 【什么时候上岸?】
最近也是在初学opencv,所谓万事开头难,过程中出现了很多的问题,今天在这里记录一下,也希望对后面学习的人有帮助。
首先,在我的visual stdio 右侧有解决方案资源管理器,现在我打开的文件是opencv4。

右击opencv4,选择属性:

在opencv4属性页,我们需要注意以下几点:1.博主是在debug模式下运行的,2,x64代表是54位的系统,3在VC++目录我们要配置包含目录和库目录。
1,包含目录

点击编辑 。
选择文件路径:

选择以下文件路径:
具体操作可以看看以下视频,几分钟就能配置好环境:
【Visual Studio 2022 配置 OpenCV4.5.5-哔哩哔哩】 https://b23.tv/L1X63Uj
示例代码如下:
#include <iostream>
//#include<tupian.h>
#include<opencv2\opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc,char** argv)
{
Mat img;
img = imread("C:\\Users\\guoyongbin123\\Desktop\\C++\\opencv4\\opencv4\\Lena.png");//图片路径
if (img.empty())
{
cout << "请确认图像文件名称是否正确" << endl;
return -1;
}
//Mat img1;
namedWindow("test", WINDOW_FREERATIO);
imshow("test", img);
//demo me;
//me.color_demo(img);
waitKey(0);
return 0;
}
over!!!!!!
边栏推荐
- The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
- 消息队列消息丢失和消息重复发送的处理策略
- leetcode刷题:二叉树19(合并二叉树)
- Financial data acquisition (III) when a crawler encounters a web page that needs to scroll with the mouse wheel to refresh the data (nanny level tutorial)
- [statistical learning method] learning notes - logistic regression and maximum entropy model
- Configure an encrypted web server
- 平安证券手机行开户安全吗?
- Sign up now | oar hacker marathon phase III midsummer debut, waiting for you to challenge
- ps链接图层的使用方法和快捷键,ps图层链接怎么做的
- 爱可可AI前沿推介(7.7)
猜你喜欢

Hi3516 full system type burning tutorial

30. Feed shot named entity recognition with self describing networks reading notes

College entrance examination composition, high-frequency mention of science and Technology
![[pytorch practice] use pytorch to realize image style migration based on neural network](/img/20/8ed7113115709b6169be289b0c280a.png)
[pytorch practice] use pytorch to realize image style migration based on neural network

Static comprehensive experiment

数据库系统原理与应用教程(007)—— 数据库相关概念

Static routing assignment of network reachable and telent connections

leetcode刷题:二叉树20(二叉搜索树中的搜索)

In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)

Configure an encrypted web server
随机推荐
Will the filing free server affect the ranking and weight of the website?
[pytorch practice] write poetry with RNN
MPLS experiment
Epp+dis learning path (1) -- Hello world!
Niuke website
(待会删)yyds,付费搞来的学术资源,请低调使用!
ENSP MPLS layer 3 dedicated line
sql-lab (54-65)
File upload vulnerability - upload labs (1~2)
金融数据获取(三)当爬虫遇上要鼠标滚轮滚动才会刷新数据的网页(保姆级教程)
DOM parsing XML error: content is not allowed in Prolog
免备案服务器会影响网站排名和权重吗?
Inverted index of ES underlying principle
浅谈估值模型 (二): PE指标II——PE Band
SQL Lab (46~53) (continuous update later) order by injection
2022聚合工艺考试题模拟考试题库及在线模拟考试
数据库系统原理与应用教程(011)—— 关系数据库
消息队列消息丢失和消息重复发送的处理策略
Configure an encrypted web server
RHSA first day operation