Change default value for iterations

This commit is contained in:
Vinayak Mehta
2017-04-21 13:20:48 +05:30
parent 4b3e7fb6f6
commit d28e4b8c1e
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ def adaptive_threshold(imagename, invert=False, blocksize=15, c=-2):
return img, threshold
def find_lines(threshold, direction='horizontal', scale=15, iterations=2):
def find_lines(threshold, direction='horizontal', scale=15, iterations=0):
"""Finds horizontal and vertical lines by applying morphological
transformations on an image.
+2 -2
View File
@@ -157,7 +157,7 @@ class Lattice:
iterations : int
Number of iterations for dilation.
(optional, default: 2)
(optional, default: 0)
invert : bool
Whether or not to invert the image. Useful when pdfs have
@@ -192,7 +192,7 @@ class Lattice:
(optional, default: None)
"""
def __init__(self, table_area=None, fill=None, mtol=[2], jtol=[2],
blocksize=15, threshold_constant=-2, scale=15, iterations=2,
blocksize=15, threshold_constant=-2, scale=15, iterations=0,
invert=False, margins=(1.0, 0.5, 0.1), split_text=False,
flag_size=True, shift_text=['l', 't'], debug=None):
+2 -2
View File
@@ -52,7 +52,7 @@ class OCRLattice:
iterations : int
Number of iterations for dilation.
(optional, default: 2)
(optional, default: 0)
debug : string
{'contour', 'line', 'joint', 'table'}
@@ -61,7 +61,7 @@ class OCRLattice:
(optional, default: None)
"""
def __init__(self, table_area=None, mtol=[2], blocksize=15, threshold_constant=-2,
dpi=300, lang="eng", scale=15, iterations=2, debug=None):
dpi=300, lang="eng", scale=15, iterations=0, debug=None):
self.method = 'ocrl'
self.table_area = table_area