当前位置:网站首页>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!!!!!!
边栏推荐
- Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being
- leetcode刷题:二叉树23(二叉搜索树中的众数)
- Learning and using vscode
- Vxlan static centralized gateway
- NGUI-UILabel
- On valuation model (II): PE index II - PE band
- Tutorial on principles and applications of database system (009) -- conceptual model and data model
- EPP+DIS学习之路(2)——Blink!闪烁!
- 2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
- College entrance examination composition, high-frequency mention of science and Technology
猜你喜欢

Completion report of communication software development and Application

leetcode刷题:二叉树19(合并二叉树)
![[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer](/img/5f/75549fc328d7ac51f8b97eef2c059d.png)
[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer

Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being

Sign up now | oar hacker marathon phase III midsummer debut, waiting for you to challenge

Airserver automatically receives multi screen projection or cross device projection

SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)

Tutorial on the principle and application of database system (011) -- relational database

Vxlan 静态集中网关

Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model
随机推荐
2022聚合工艺考试题模拟考试题库及在线模拟考试
ps链接图层的使用方法和快捷键,ps图层链接怎么做的
Realize a simple version of array by yourself from
BGP actual network configuration
DOM parsing XML error: content is not allowed in Prolog
数据库系统原理与应用教程(010)—— 概念模型与数据模型练习题
RHSA first day operation
Static vxlan configuration
H3C HCl MPLS layer 2 dedicated line experiment
Cryptography series: detailed explanation of online certificate status protocol OCSP
College entrance examination composition, high-frequency mention of science and Technology
SQL lab 1~10 summary (subsequent continuous update)
Tutorial on the principle and application of database system (008) -- exercises on database related concepts
Learning and using vscode
The road to success in R & D efficiency of 1000 person Internet companies
什么是ESP/MSR 分区,如何建立ESP/MSR 分区
leetcode刷题:二叉树27(删除二叉搜索树中的节点)
Error in compiling libssl
About sqli lab less-15 using or instead of and parsing
数据库系统原理与应用教程(007)—— 数据库相关概念