开始学习啦~~
Step 1
Go to https://github.com/opencv/opencv and download the Latest Release.
Step 2
Add bin folder to the Environment Variables path.(编辑系统环境变量)
D:\opencv\build\x64\vc15\bin
Step 3
Create a New Visual Studio project C++ console.
Set the platform target to x64.
Step 4
Add Directories by going to Project-Properties-Configuration Properties. (项目 - 属性 - 配置属性)
VC++目录 - 包含目录 && 库目录
Add build directories D:\opencv\build\include
Add Library directories D:\opencv\build\x64\vc15\lib
链接器 - 输入
Add linker input opencv_world453d.lib
不同版本不一样,数字后面有d的与debug有关,没有d的与release有关。
具体操作可参照 https://www.bilibili.com/video/BV11A411T7rL?t=2
视频相关资源下载 https://www.murtazahassan.com/courses/opencv-cpp-course/
添加自己写的头文件
项目 -> 属性 -> C/C++/常规/附加包含目录 -> 把.h那一级文件放进去即可
若属性中找不到 C/C++,应先写一段简单代码,编译运行后属性中就会出现该栏
无法打开源文件
检查自己的管理器,是否为 x64
- Post title:OpenCV (创建新项目)
- Post author:Eva.Q
- Create time:2021-07-26 13:17:22
- Post link:https://qyy/2021/07/26/OPENCV/OPENCV1-0/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.