vendredi 29 novembre 2019

How to return an empty cvMat in a function for c++?

now I have a function:

cv::Mat func(int number){

cv::Mat img; ... if(number>=0)return img; else if(number<0) return xxx;

}

Here, when number<0 I want to return an empty cvMat, but return NULL; or return; are incorrect. So how to how to return an empty cvMat in a function?

Anyone can give some advises?

Aucun commentaire:

Enregistrer un commentaire