mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-10 04:39:54 +02:00
fix special case where num_col_classifier was unbound
This commit is contained in:
parent
5af0c5df9e
commit
ef3ccd0d5f
1 changed files with 1 additions and 1 deletions
|
@ -2154,6 +2154,7 @@ class eynollah:
|
||||||
img_only_regions_with_sep = img_only_regions_with_sep.astype(np.uint8)
|
img_only_regions_with_sep = img_only_regions_with_sep.astype(np.uint8)
|
||||||
img_only_regions = cv2.erode(img_only_regions_with_sep[:, :], self.kernel, iterations=6)
|
img_only_regions = cv2.erode(img_only_regions_with_sep[:, :], self.kernel, iterations=6)
|
||||||
|
|
||||||
|
num_col_classifier = None
|
||||||
try:
|
try:
|
||||||
num_col, peaks_neg_fin = find_num_col(img_only_regions, multiplier=6.0)
|
num_col, peaks_neg_fin = find_num_col(img_only_regions, multiplier=6.0)
|
||||||
if not num_column_is_classified:
|
if not num_column_is_classified:
|
||||||
|
@ -2161,7 +2162,6 @@ class eynollah:
|
||||||
except:
|
except:
|
||||||
num_col = None
|
num_col = None
|
||||||
peaks_neg_fin = []
|
peaks_neg_fin = []
|
||||||
num_col_classifier = None
|
|
||||||
return num_col, num_col_classifier, img_only_regions, page_coord, image_page, mask_images, mask_lines
|
return num_col, num_col_classifier, img_only_regions, page_coord, image_page, mask_images, mask_lines
|
||||||
|
|
||||||
def run_enhancement(self):
|
def run_enhancement(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue