Ask Your Question

Revision history [back]

Probably easiest way is to find the contours of the image and keep only the one that has specific size, eccentricity etc by looking at the contour moments. Then plot the target contour in a new image.

Have a look here: http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html