欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Opencv3.4:显示一张图片

程序员文章站 2022-03-25 22:26:56
Github https://github.com/gongluck/Opencv3.4 study.git ......

Github

https://github.com/gongluck/Opencv3.4-study.git

#include "opencv2/opencv.hpp"
using namespace cv;
#pragma comment(lib, "opencv_core340d.lib")
#pragma comment(lib, "opencv_imgcodecs340d.lib")
#pragma comment(lib, "opencv_highgui340d.lib")

int main()
{
    Mat image = imread("test.png");
    namedWindow("window");
    imshow("window", image);
    waitKey(0);
    system("pause");
    return 0;
}