From 691fd8e3118c8962570b0c43fecbde6c4aab8762 Mon Sep 17 00:00:00 2001 From: paigenwilliams <31543226+paigenwilliams@users.noreply.github.com> Date: Sun, 21 Oct 2018 16:41:34 -0500 Subject: [PATCH] Added value for kernel --- target_finder/preprocessing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/target_finder/preprocessing.py b/target_finder/preprocessing.py index 370ffe9..ba0f6de 100644 --- a/target_finder/preprocessing.py +++ b/target_finder/preprocessing.py @@ -31,6 +31,7 @@ def find_blobs(image, min_width=20, max_width=100, limit=100, padding=20): # Find the edges in the image. cv_image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) edges = cv2.Canny(cv_image, 200, 500) + kernel = np.ones((3, 3), np.uint8) edges = cv2.dilate(edges, kernel, 1) edges = cv2.erode(edges, kernel, 1)