diff --git a/hazenlib/tools.py b/hazenlib/tools.py index 64e6cc02..15e9aaa9 100644 --- a/hazenlib/tools.py +++ b/hazenlib/tools.py @@ -66,7 +66,7 @@ def find_contours(self): # convert the resized image to grayscale, blur it slightly, and threshold it self.blurred = cv.GaussianBlur(self.arr.copy(), (5, 5), 0) # magic numbers - optimal_threshold = filters.threshold_li(self.blurred, initial_guess=np.quantile(self.blurred, 0.25)) + optimal_threshold = filters.threshold_li(self.blurred, initial_guess=np.quantile(self.blurred, 0.50)) self.thresh = np.where(self.blurred > optimal_threshold, 255, 0).astype(np.uint8) # have to convert type for find contours