Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROI functions in c and c++

I have the following c code implementation and i want to port to c++ i want to use equivalent to cvSetImageROI ,cvResetImageROI

cvSetImageROI(pMainImg,cvROIRect);
        cvMatchTemplate(pMainImg, pTempImg, res, CV_TM_CCOEFF_NORMED );
        cvResetImageROI(pMainImg);

but i did not find the equivalent function in c++ implementation

is that the only way to create new matrix and path the ROI to the original Matrix such as

cv::Mat roiImg;
roiImg = img2(roi);

is there any other way to do my job directly inside the original matrix ?