Commit e016e74f authored by Philipp Zumstein's avatar Philipp Zumstein
Browse files

Delete unused function estimate_scale in o-nlbin

This function is now implemented in ocrolib/
and only used in ocropus-gpageseg not in the binarization
parent 682ec64c
......@@ -63,16 +63,6 @@ def check_page(image):
if w>10000: return "line too wide for a page image %s"%(image.shape,)
return None
def estimate_scale(binary):
objects = binary_objects(binary)
bysize = sorted(objects,key=A)
scalemap = zeros(binary.shape)
for o in bysize:
if amax(scalemap[o])>0: continue
scalemap[o] = A(o)**0.5
scale = median(scalemap[(scalemap>3)&(scalemap<100)])
return scale
def estimate_skew_angle(image,angles):
estimates = []
for a in angles:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment