Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cvGetSubRect( ) taking an integer not rectangle

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.