I am performing adaptive thresholding on an image to find an object\'s borders. However, on some points of the object, the adaptive threshold has gaps and spills over into other