OpenCV findcontours returns 2 paths for each circle

I am trying to use findcontours () in OpenCV in the image below.

findContours(img, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_NONE, cvPoint(0,0) );

When I make this query: contours.size()it returns 18, so for each circle there are 2 circuits. Circles - how do you see 1-pixel thickness, like 2 contours? This is one for the outside and one for the inside, if so, how can I make this function detect only one path for each circle? I thought the outline was defined as a connected sequence of pixels with a thickness of 1 pixel.

Says there are 18 contours !!

+5
source share
2 answers

, , , , - . , , - , . , , ( )

findContours

, CV_RETR_EXTERNAL CV_RETR_TREE. , ,

+4

, , ...

findContours , , .

- findContoours . , .

0

All Articles