Change default value for iterations
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user