Fix off by one error in column identification

pull/153/head
Frh 2020-04-29 09:45:55 -07:00
parent 21dc6a46a0
commit e31e978ebe
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ def find_columns_coordinates(tls, min_gap=1.0):
# Splits: | | | | # Splits: | | | |
cols_anchors = list(map( cols_anchors = list(map(
lambda idx: (cols_bounds[idx-1][1] + cols_bounds[idx][0]) / 2.0, lambda idx: (cols_bounds[idx-1][1] + cols_bounds[idx][0]) / 2.0,
range(1, len(cols_bounds)-1) range(1, len(cols_bounds))
)) ))
cols_anchors.insert(0, cols_bounds[0][0]) cols_anchors.insert(0, cols_bounds[0][0])
cols_anchors.append(cols_bounds[-1][1]) cols_anchors.append(cols_bounds[-1][1])