当前位置:网站首页>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!!!!!!
边栏推荐
- SQL lab 1~10 summary (subsequent continuous update)
- SQL lab 11~20 summary (subsequent continuous update) contains the solution that Firefox can't catch local packages after 18 levels
- 平安证券手机行开户安全吗?
- EPP+DIS学习之路(2)——Blink!闪烁!
- Realize all, race, allsettled and any of the simple version of promise by yourself
- [Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
- 2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
- 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)
- "Series after reading" my God! It's so simple to understand throttling and anti shake~
- ps链接图层的使用方法和快捷键,ps图层链接怎么做的
猜你喜欢

Idea 2021 Chinese garbled code

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

【PyTorch实战】用RNN写诗

Multi row and multi column flex layout

How to use PS link layer and shortcut keys, and how to do PS layer link

跨域问题解决方案
![[statistical learning method] learning notes - support vector machine (I)](/img/3f/56db88d717d7cd6624b3d0867146e9.png)
[statistical learning method] learning notes - support vector machine (I)

MPLS experiment

idm服务器响应显示您没有权限下载解决教程

"Series after reading" my God! It's so simple to understand throttling and anti shake~
随机推荐
What is an esp/msr partition and how to create an esp/msr partition
leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
Static vxlan configuration
Dialogue with Wang Wenyu, co-founder of ppio: integrate edge computing resources and explore more audio and video service scenarios
Tutorial on principles and applications of database system (009) -- conceptual model and data model
EPP+DIS学习之路(2)——Blink!闪烁!
Multi row and multi column flex layout
Cryptography series: detailed explanation of online certificate status protocol OCSP
Unity map auto match material tool map auto add to shader tool shader match map tool map made by substance painter auto match shader tool
[statistical learning method] learning notes - support vector machine (I)
leetcode刷题:二叉树20(二叉搜索树中的搜索)
The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
About sqli lab less-15 using or instead of and parsing
[statistical learning methods] learning notes - Chapter 5: Decision Tree
Completion report of communication software development and Application
IPv6 experiment
Object. Simple implementation of assign()
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
The IDM server response shows that you do not have permission to download the solution tutorial
sql-lab (54-65)