def fill(image, kernel=(2, 2)): ''' fill gaps in shapes structure. ''' return cv.morphologyEx(image, cv.MORPH_CLOSE, kernel)