OpenCV 判断Mat是否为空

if(img.empty())return -1; //是否加载成功
if(!img.data)return -1;//判断是否有数据
原文地址:https://www.cnblogs.com/ybqjymy/p/13650597.html