From ceae783af8963f0e0e4e9290821d1921548d93d2 Mon Sep 17 00:00:00 2001 From: deeppomf Date: Fri, 26 Oct 2018 22:55:22 -0400 Subject: [PATCH] fix #18 --- libs/flood_fill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/flood_fill.py b/libs/flood_fill.py index f206bbe..0391202 100644 --- a/libs/flood_fill.py +++ b/libs/flood_fill.py @@ -68,7 +68,7 @@ def expand_bounding(img, region, expand_factor=1.5, min_size = 256, max_size=512 y1_square = 0 x2_square = current_size y2_square = current_size - elif x2_square > (width - 1) and y2_square > (height - 1): + elif x2_square > (width - 1) and y1_square < 0: x1_square = width - current_size - 1 y1_square = 0 x2_square = width - 1