From 87cecadb440b9437aca1b968b5a4e92c6023c24f Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Sun, 6 Feb 2022 21:27:39 +0100 Subject: [PATCH] applied black --- vidocp/table_parsing.py | 2 -- vidocp/utils/draw.py | 1 - 2 files changed, 3 deletions(-) diff --git a/vidocp/table_parsing.py b/vidocp/table_parsing.py index 85989e7..580b2f3 100644 --- a/vidocp/table_parsing.py +++ b/vidocp/table_parsing.py @@ -75,7 +75,6 @@ def has_table_shape(rects): def parse_table(image: np.array): - def is_large_enough(stat): x1, y1, w, h, area = stat return area > 3000 @@ -84,7 +83,6 @@ def parse_table(image: np.array): th1, img_bin = cv2.threshold(gray_scale, 150, 255, cv2.THRESH_BINARY) img_bin = ~img_bin - img_bin = isolate_vertical_and_horizontal_components(img_bin) img_bin_final = add_external_contours(img_bin, img_bin) diff --git a/vidocp/utils/draw.py b/vidocp/utils/draw.py index 13e6a73..7b23f0d 100644 --- a/vidocp/utils/draw.py +++ b/vidocp/utils/draw.py @@ -14,7 +14,6 @@ def draw_contours(image, contours): def draw_rectangles(image, rectangles, color=None, annotate=False): - def annotate_rect(x, y, w, h): cv2.putText(image, "+", (x + (w // 2) - 12, y + (h // 2) + 9), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)