def getClosingImage(img): kernel = np.ones((35,35),np.uint8) closing = cv2.morphologyEx(img, cv2.MORPH_CLOSE, kernel) return closing