1 | initial version |
First you will need to determine the bounding rectangle for the ellipse. Here is the sample code for it,
Rect patch = your_ellipse.boundingRect();
Secondly to extract the patch you will need to extract the ROI of the patch. Here is the sample code for it,
Mat ROI(image,patch);
Hope it helps.