Skip to content

Commit 6f8a612

Browse files
author
Robert Sachunsky
committed
ocrolib.morph: fix select_regions dtype for just 1 label
1 parent 1a33f94 commit 6f8a612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocrd_cis/ocropy/ocrolib/morph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def select_regions(binary,f,min=0,nbest=100000):
293293
if binary.max() == 1:
294294
labels,_ = label(binary)
295295
else:
296-
labels = binary
296+
labels = binary.astype(uint8)
297297
objects = find_objects(labels)
298298
scores = [f(o) for o in objects]
299299
best = argsort(scores)

0 commit comments

Comments
 (0)