cvGetSubRect( ) taking an integer not rectangle

asked 2015-09-01 18:55:40 -0600

darenw gravatar image

I'm fixing some source code using old OpenCV, converting it to use the current cv::Mat and all the good things in 3.0. The deprecated CvMat is all over the place. I know what cvGetSubRect() does, and how to rewrite it using the overloaded operator () in cv::Mat. But the following has me stumped:

CvMat M = cvMat(ew, ew, CV_32FC1,  pSomeFloatData);
CvMat G = cvGetSubRect(&M, 1);

What the heck does cvGetSubRect() taking an image and an integer do? Browsing the OpenCV documentation, and Googling, turned up nothing like this. This is from code which compiles and runs.

edit retag flag offensive close merge delete

Comments

what was the last version, above code ran successfully on ?

i checked way back to 2.4.2, and could not find any overload or such, that would allow above to compile.

berak gravatar imageberak ( 2015-09-02 00:42:52 -0600 )edit