ew but pretty close

master
Bel LaPointe 2023-02-19 08:49:40 -07:00
parent 0c1fee915a
commit e92189d06c
1 changed files with 3 additions and 1 deletions

View File

@ -47,8 +47,10 @@ def v_split(page):
x = sum(x_clusters) / len(x_clusters) x = sum(x_clusters) / len(x_clusters)
result = [page.within_bbox((0, 0, x, page.height)), page.within_bbox((x, 0, page.width, page.height))] result = [page.within_bbox((0, 0, x, page.height)), page.within_bbox((x, 0, page.width, page.height))]
if DEBUG: if DEBUG:
i = 0
for page in result: for page in result:
debug_show(debug_im(page)) debug_show(debug_im(page), name=f'v-split-postsplit-{page.page_number}_{i}')
i += 1
return result return result
def cluster(page): def cluster(page):