I am trying to get a region of an image (ROI) using opencv python. The version of opencv used is 2.4.3. However when I try to call the API
cv2.SetImageROI
Okay, On further analysis realized that the cv2 since it has been supporting numpy array structure, there is no longer any need for a API, the entire image can be manipulated in the array itself. eg:
img = cv2.imread('image.png')
img = img[c1:c1+25,r1:r1+25]
Here c1 is the left side column pixel location, and r1 is the corresponding row location. And img now has the image specified within the pixels as the ROI.
EDIT: Very nicely explained here, How to copy a image region using opencv in python?