ew but pretty close
parent
0c1fee915a
commit
e92189d06c
4
main.py
4
main.py
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue