I have a
cv::Mat image;
object, which I loaded an image to from a file, it reads it correctly and all.
Now I have written a functio
if(!image.empty()) { //your_code } else std::cout<<"Emty "
check the matrix before you convert.