Python opencv, get ROI Mat (cropping)
Please refer to this function..
def getROImat(inMat, x1, y1, x2, y2):
# Crop image
imCrop = inMat[int(y1):int(y2), int(x1):int(x2)]
return imCrop
The study blog from marearts.com
Computer Vision & Machine Learning Research Laboratory