kernel size for morphology ex set bit higher, so less non-table structure are detected. Reduced the kernel size of the directional motion blurr and increased the treshold a little bit so narrow cells wont be split up.
Problem with the cell filtering for certain scanned pdfs detected.
This commit is contained in:
parent
723c6606e1
commit
2a68e1b221
@ -43,6 +43,7 @@ def adjacent(a, b):
|
||||
"""
|
||||
|
||||
def adjacent2d(g, h, i, j, k, l):
|
||||
#print(adjacent1d(g, h) and any(k <= p <= l for p in [i, j]))
|
||||
return adjacent1d(g, h) and any(k <= p <= l for p in [i, j])
|
||||
|
||||
if any(x is None for x in (a, b)):
|
||||
@ -78,6 +79,7 @@ def __remove_isolated_unsorted(rectangles):
|
||||
|
||||
def __remove_isolated_sorted(rectangles):
|
||||
def is_connected(left, center, right):
|
||||
# print(left,center,right, list(starmap(adjacent, [(left, center), (center, right)])))
|
||||
return any(starmap(adjacent, [(left, center), (center, right)]))
|
||||
rectangles = list(map(xywh_to_vec_rect, rectangles))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user