基于 VS2019 配置 opencv4.x

创建新项目

添加主函数文件


配置






添加环境变量

测试

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main()
{
    Mat img = imread("C:\\Users\\Pictures\\test.jpg");
    if (img.empty())
    {
        printf("Could not find the image!\n");
        return -1;
    }

    imshow("ImputImage", img);

    waitKey(0);
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/wbyixx/p/12238317.html