Ask Your Question

rafaveguim's profile - activity

2020-08-16 13:15:22 -0600 received badge  Student (source)
2020-08-14 20:37:20 -0600 received badge  Supporter (source)
2020-08-14 20:37:13 -0600 marked best answer cv.findContours is connecting unconnected regions

Original image:

image description

Code:

contours, hierarchy = cv.findContours(blobs, cv.RETR_EXTERNAL, cv.CHAIN_APPROX_SIMPLE)
cv.drawContours(blobs, contours, -1, (0,255,0), 2)

Result:

image description

Why unconnected regions become part of the same contour, as in the example above? Is this the expected behaviour? What can I do to obtain separate contours for these regions?

2020-08-14 20:37:13 -0600 received badge  Scholar (source)
2020-08-13 00:38:02 -0600 asked a question cv.findContours is connecting unconnected regions

cv.findContours is connecting unconnected regions Original image: Code: contours, hierarchy = cv.findContours(blobs,