1 | initial version |
mser = cv2.MSER(1, 0, 94400, 0.05, 0.02, 200, 1.01, 0.003, 5)
regions = mser.detect(gray, None)
hulls = [cv2.convexHull(p.reshape(-1, 1, 2)) for p in regions]
cv2.polylines(vis, hulls, 1, (0, 255, 0))
cv2.putText(vis, str(change), (20, 20), cv2.FONT_HERSHEY_SIMPLEX, 2, (255, 0, 0))
This worked perfectly fine for me.