Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我检查空图像,它在使用 imread 读取二进制图像时返回 true
original_img = imread("E:/Newfolder/ER41615-12.TIF", CV_LOAD_IMAGE_ANYCOLOR );
从文档
函数 imread 从指定文件加载图像并返回。如果无法读取图像(由于缺少文件、权限不正确、格式不受支持或无效),该函数将返回一个空矩阵( Mat::data==NULL )。
Mat::empty() 将返回 true。