markup: reduce blur before shape finding
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user