cvtColor assertion failed ( OpenCV with C++ )

后端 未结 3 500
难免孤独
难免孤独 2021-01-14 00:10

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

3条回答
  •  伪装坚强ぢ
    2021-01-14 00:26

    if(!image.empty()) {
        //your_code
    } else
        std::cout<<"Emty "
    

    check the matrix before you convert.

提交回复
热议问题