zuoyou151

1.创建工程

 Ctrl+Shift+n

2.创建.cpp文件

Ctrl+Shift+a

3.打开属性管理器

视图->其他窗口->属性管理器

Debug64右键 属性

4.添加包含目录

VC++目录->包含目录->编辑

添加路径

 

5.添加库目录

VC++目录->库目录

6.添加附加依赖项

链接器->输入->附加依赖项

opencv_world320d.lib

7.测试

#include<iostream>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>

using namespace cv;
int main() {
    //读入一张图片
    Mat img= imread("D:\\OpenCVT\\1.jpeg");
    //创建一个名为“游戏原画”的窗口
    namedWindow("游戏原画");
    imshow("游戏原画",img);
    //等待6000ms后窗口自动关闭
    waitKey(60000);
}

 

分类:

技术点:

相关文章:

  • 2021-11-25
  • 2021-12-27
  • 2021-12-03
  • 2021-12-03
  • 2021-12-03
  • 2021-08-01
  • 2021-11-19
猜你喜欢
  • 2021-12-03
  • 2021-05-17
  • 2021-12-24
  • 2021-06-13
  • 2021-06-09
相关资源
相似解决方案