mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-10-06 22:50:14 +02:00
simplify
This commit is contained in:
parent
c0137c29ad
commit
f857ee7b51
2 changed files with 4 additions and 21 deletions
|
@ -3182,26 +3182,9 @@ class Eynollah:
|
|||
num_col = num_col + 1
|
||||
if not num_column_is_classified:
|
||||
num_col_classifier = num_col + 1
|
||||
if self.num_col_upper and self.num_col_lower:
|
||||
if self.num_col_upper == self.num_col_lower:
|
||||
num_col_classifier = self.num_col_upper
|
||||
else:
|
||||
if num_col_classifier < self.num_col_lower:
|
||||
num_col_classifier = self.num_col_lower
|
||||
if num_col_classifier > self.num_col_upper:
|
||||
num_col_classifier = self.num_col_upper
|
||||
|
||||
elif self.num_col_lower and not self.num_col_upper:
|
||||
if num_col_classifier < self.num_col_lower:
|
||||
num_col_classifier = self.num_col_lower
|
||||
|
||||
elif self.num_col_upper and not self.num_col_lower:
|
||||
if num_col_classifier > self.num_col_upper:
|
||||
num_col_classifier = self.num_col_upper
|
||||
|
||||
else:
|
||||
pass
|
||||
|
||||
num_col_classifier = min(self.num_col_upper or num_col_classifier,
|
||||
max(self.num_col_lower or num_col_classifier,
|
||||
num_col_classifier))
|
||||
except Exception as why:
|
||||
self.logger.error(why)
|
||||
num_col = None
|
||||
|
|
|
@ -1675,9 +1675,9 @@ def return_boxes_of_images_by_order_of_reading_new(
|
|||
peaks_neg_fin=[]
|
||||
num_col = 0
|
||||
try:
|
||||
peaks_neg_fin_org=np.copy(peaks_neg_fin)
|
||||
if (len(peaks_neg_fin)+1)<num_col_classifier or num_col_classifier==6:
|
||||
#print('burda')
|
||||
peaks_neg_fin_org = np.copy(peaks_neg_fin)
|
||||
if len(peaks_neg_fin)==0:
|
||||
num_col, peaks_neg_fin = find_num_col(
|
||||
regions_without_separators[splitter_y_new[i]:splitter_y_new[i+1], :],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue