Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I draw only external contour?

Trying to extract the edge of Object(Example I have taken is Ginger here)

Image 1

image description

I did blurring and the adaptive threshold to get this image below

Image 2

image description

Then I did Canny Edge Extraction

Image 3

image description

As I am interested in the edge of the object I need to use cv2.RETR_EXTERNAL inside cv2.findContours

But External is not actually giving me the external contour here. I don't know what is going wrong here. May while going from Image 2 to Image 3 I might be losing the external edge as well.

Is there any other way in which I can extract the edge from Image 2?