Permalink
Browse files

also works with out pylab

  • Loading branch information...
Jesper Zedlitz
Jesper Zedlitz committed Oct 16, 2017
1 parent 20159d8 commit c74d2be3f41aa7d997122b10d5d55c25622dfd41
Showing with 5 additions and 3 deletions.
  1. +5 −3 ocropus-gpageseg
View
@@ -13,8 +13,6 @@
from __future__ import print_function
from pylab import find
import argparse
import glob
import os
@@ -108,7 +106,11 @@ parser.add_argument('files',nargs='+')
args = parser.parse_args()
args.files = ocrolib.glob_all(args.files)
def find(condition):
"Return the indices where ravel(condition) is true"
res, = np.nonzero(np.ravel(condition))
return res
def norm_max(v):
return v/np.amax(v)

0 comments on commit c74d2be

Please sign in to comment.