I have a rectangle that I want to extract the ellipse form of it from a given image. My code looks like:
RotatedRect ellipse ;
ellipse.center = p;
ellipse.angle = 0;
ellipse.size = cvSize2D32f((float)rect.width, (float)rect.height);
ellipse( image_colored, minEllipse, CV_RGB(255,255,255), 2, 8 );
The input of this code are: an image (image_colored) and CvRect (rect). The last line of code, draws a white ellipse inside the "image_colored", but I am looking to extract the generated ellipse in an other image or just color the rest of the image in black.
Any help, will be highly appreciated. Thank you.