tags:

views:

90

answers:

2

How does OpenCV handle Regions of Interest (ROI)?

Say I set a region of interest using cvSetImageROI(). Is that ROI stored with the IplImage structure?

If so, when I pass the image to functions such as cvSmooth() or cvFindContours(), will those functions operate on the whole image or just the ROI ?

cvFindContours() seems to provide an offset value to compensate for using ROIs (see documentation), but its not clear to me if cvFindContours() is aware of the ROI or if one provides the ROI manually.

I am using OpenCV 1.1 with Intel's performance primitives installed.

+1  A: 

The ROI is stored within the IplImage structure, most functions in the documentation will adhere to any ROI and only perform their operation on that region.

Ian Wetherbee
+1  A: 

The ROI is stored in the IplImage structure. And every function adheres to the ROI. If you find a function that works on the pixels beyond the ROI, you can report it as a bug.

Also, you do not have ROI in matrices.

Utkarsh Sinha