Skip to content

Commit

Permalink
xywh_from_points: return int not float
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Apr 25, 2018
1 parent dcaf580 commit 0a108a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def xywh_from_points(points):
"""
Constructs an dict representing a rectangle with keys x, y, w, h
"""
[tl, tr, br] = [[float(p) for p in pair.split(',')] for pair in points.split(' ')[:3]]
[tl, tr, br] = [[int(p) for p in pair.split(',')] for pair in points.split(' ')[:3]]
return {
'x': tl[0],
'y': tl[1],
Expand Down

0 comments on commit 0a108a3

Please sign in to comment.