Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if you're only intereste in the position of the object, you could just dilate it, until the gaps go away:

dilate(img,img,getStructuringElement(MORPH_ELLIPSE,Size(6,6)));

image description

if you're only intereste interested in the position of the object, you could just dilate it, until the gaps go away:

dilate(img,img,getStructuringElement(MORPH_ELLIPSE,Size(6,6)));

image description

if you're only interested in the position of the object, you could dilate it, until the gaps go away:away (before applying findContours):

dilate(img,img,getStructuringElement(MORPH_ELLIPSE,Size(6,6)));

image description