Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Confuse with the ROI rect parameter

Hi Everyone, Im confused here... I wanted to select the ROI half of the bottom or the image 1024x 576.

The parameter for rect (x,y,h,w) ... OK h and w and I understand. But what about x and y?? int main(int argc, char** argv) { Rect rectangle (50,30,100,512); image=imread("c:\a.jpg",1); // fill it however you want to Mat im_roi = image(rectangle); imshow("ROI",im_roi); }

If I had processed the ROI after the correct process, how can I draw back the result and put it back on the original image? Do I need to redo the rect roi again for both?

Thanks a lot

Zamani