From 927ad0dcafb2fa61f2dc2e8ee3f0529a9e194d18 Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Mon, 16 Mar 2020 16:54:48 -0700 Subject: [PATCH] markup: reduce blur before shape finding --- markup/img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markup/img.py b/markup/img.py index 99fefb8..09bb72b 100644 --- a/markup/img.py +++ b/markup/img.py @@ -33,7 +33,7 @@ def find_shapes(image_path): print('unhandled image mode: {}'.format(img.mode)) return None - alpha_layer = alpha_layer.filter(ImageFilter.GaussianBlur(5)) + alpha_layer = alpha_layer.filter(ImageFilter.GaussianBlur(1)) threshold = 5 alpha_layer = alpha_layer.point(lambda p: p > threshold and 255)