Trace0719 2023-11-07 19:46 采纳率: 33.3%
浏览 9

c++,opencv

我配置完成测试时出现了截图所示问题,有没有人可以帮我看看怎么解决

img

  • 写回答

2条回答

  • Helloorld_11 2023-11-14 10:57
    关注

    1、首先不要用中文;
    2、检查一哈src是否为空,也就是读取图片是否失败

    
     cv::Mat img = cv::imread("your_image_path.jpg");  
      
        if (img.empty()) {  
            std::cout << "Failed to read the image" << std::endl;  
        } else {  
            std::cout << "Image read successfully" << std::endl;  
        }  
    
    评论

报告相同问题?

问题事件

  • 创建了问题 11月7日