Permalink
Browse files

Fix imports according to Travis check

  • Loading branch information...
zuphilip committed Jul 16, 2017
1 parent 8d378ab commit bf47c269a8dc60c302be8e753d1f11eb4ee53246
Showing with 3 additions and 2 deletions.
  1. +2 −1 ocropus-dewarp
  2. +1 −1 ocropus-linegen
View
@@ -7,6 +7,7 @@ import argparse
import sys
import numpy as np
from scipy.misc import imsave
import ocrolib
from ocrolib import lineest
@@ -45,7 +46,7 @@ for fname in inputs:
line = ocrolib.read_image_gray(fname)
lnorm.measure(np.amax(line)-line)
line = lnorm.normalize(line,cval=np.amax(line))
scipy.misc.imsave(base+".dew.png",line)
imsave(base+".dew.png",line)
except Exception as e:
print("ERROR", e)
continue
View
@@ -127,7 +127,7 @@ def rgeometry(image,eps=0.03,delta=0.3):
m = np.array([[1+eps*np.random.randn(),0.0],[eps*np.random.randn(),1.0+eps*np.random.randn()]])
w,h = image.shape
c = np.array([w/2.0,h/2])
d = c-dot(m,c)+np.array([np.random.randn()*delta,np.random.randn()*delta])
d = c-np.dot(m,c)+np.array([np.random.randn()*delta,np.random.randn()*delta])
return interpolation.affine_transform(image,m,offset=d,order=1,mode='constant',cval=image[0,0])

0 comments on commit bf47c26

Please sign in to comment.