I want to convert CvMat to cv::Mat. When I google I got to know cvarrToMat() can be used for this. Below is pseudo code that is creating run time error.
Note : I’m using Opencv 4.4 version .
CvMat m ; // suppose these all variables are initialized.
cv::Mat n ;
cv::Mat p;
cv::Mat q;
n = cvarrToMat(&m); // I want to replace m value of type CvMat to Mat.
q += p.t()*n; // getting error in this line.
This run time error is belonging to operator in mat.inl.hpp.
I go through almost all available solution that is discussed regarding this on the forums . Please help me to fix this.