applied black
This commit is contained in:
parent
295666c28f
commit
87cecadb44
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user