Skip to content

Commit

Permalink
Extend segmentation check for uint64 as well
Browse files Browse the repository at this point in the history
This solves #77.
  • Loading branch information
zuphilip committed Dec 25, 2017
1 parent 8cfce57 commit 9bcfc04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrolib/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def PATCH(a):

@makeargcheck("expected a segmentation image")
def SEGMENTATION(a):
return isinstance(a,numpy.ndarray) and a.ndim==2 and a.dtype in ['int32','int64']
return isinstance(a,numpy.ndarray) and a.ndim==2 and a.dtype in int_dtypes
@makeargcheck("expected a segmentation with white background")
def WHITESEG(a):
return numpy.amax(a)==0xffffff
Expand Down

0 comments on commit 9bcfc04

Please sign in to comment.