opencv 4.5.5 imread 失败(报错)的处理方式

1.opencv_world455.lib、opencv_world455d.lib 为Release版本lib,添加到Debug下后读取会报错!!
(opencv\build\x64\vc15\lib目录下;若参考网上添加到Debug | x64下需要修改为Release对应)

2.检查目录文件是否正确

    Mat img = imread("C:\\test.png", 1); 

    if (img.empty())
    {
        printf("can't read image");
        return -1;
    }

    imshow("IMAGE", img);
    waitKey(0);

你可能感兴趣的:(opencv,opencv,计算机视觉,visual,studio)