当前位置:网站首页>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!!!!!!
边栏推荐
- Learning and using vscode
- 【深度学习】图像多标签分类任务,百度PaddleClas
- leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
- 数据库安全的重要性
- GCC compilation error
- Cenos openssh upgrade to version 8.4
- SQL Lab (36~40) includes stack injection, MySQL_ real_ escape_ The difference between string and addslashes (continuous update after)
- 免备案服务器会影响网站排名和权重吗?
- 数据库系统原理与应用教程(008)—— 数据库相关概念练习题
- [pytorch practice] image description -- let neural network read pictures and tell stories
猜你喜欢
SQL lab 26~31 summary (subsequent continuous update) (including parameter pollution explanation)
Routing strategy of multi-point republication [Huawei]
"Series after reading" my God! It's so simple to understand throttling and anti shake~
Vxlan static centralized gateway
Baidu digital person Du Xiaoxiao responded to netizens' shouts online to meet the Shanghai college entrance examination English composition
数据库系统原理与应用教程(011)—— 关系数据库
MPLS experiment
Attack and defense world ----- summary of web knowledge points
leetcode刷题:二叉树26(二叉搜索树中的插入操作)
浅谈估值模型 (二): PE指标II——PE Band
随机推荐
wallys/Qualcomm IPQ8072A networking SBC supports dual 10GbE, WiFi 6
What is an esp/msr partition and how to create an esp/msr partition
@What happens if bean and @component are used on the same class?
Routing strategy of multi-point republication [Huawei]
Vxlan 静态集中网关
Upgrade from a tool to a solution, and the new site with praise points to new value
Airserver automatically receives multi screen projection or cross device projection
In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)
leetcode刷题:二叉树24(二叉树的最近公共祖先)
BGP third experiment report
平安证券手机行开户安全吗?
SQL Lab (32~35) contains the principle understanding and precautions of wide byte injection (continuously updated later)
SQL Lab (46~53) (continuous update later) order by injection
About sqli lab less-15 using or instead of and parsing
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)
Object. Simple implementation of assign()
JS to convert array to tree data
Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model
30. Feed shot named entity recognition with self describing networks reading notes
H3C HCl MPLS layer 2 dedicated line experiment