get_slopes*curved: fix missing arg

This commit is contained in:
Robert Sachunsky 2026-07-19 16:27:16 +02:00
parent ca341f3edb
commit 147a86ba42

View file

@ -2292,26 +2292,24 @@ class Eynollah:
if not self.curved_line: if not self.curved_line:
self.logger.info("Mode: Light line detection") self.logger.info("Mode: Light line detection")
self.get_slopes_and_deskew_new_light2(textregions, args = (textline_mask_tot_ea_org,
textline_mask_tot_ea_org, textline_confidence,
textline_confidence, slope_deskew)
slope_deskew) self.get_slopes_and_deskew_new_light2(textregions, *args)
self.get_slopes_and_deskew_new_light2(marginals, self.get_slopes_and_deskew_new_light2(marginals, *args)
textline_mask_tot_ea_org,
textline_confidence,
slope_deskew)
textregions = self.filter_small_textlines(textregions) textregions = self.filter_small_textlines(textregions)
else: else:
self.logger.info("Mode: Curved line detection") self.logger.info("Mode: Curved line detection")
textline_mask_tot_ea_erode = cv2.erode(textline_mask_tot_ea_org, kernel=KERNEL, iterations=2) textline_mask_tot_ea_erode = cv2.erode(textline_mask_tot_ea_org, kernel=KERNEL, iterations=2)
self.get_slopes_and_deskew_new_curved(textregions, textline_mask_tot_ea_erode, args = (textline_mask_tot_ea_erode,
num_col_classifier, slope_deskew, textline_confidence,
image['name']) num_col_classifier,
slope_deskew,
image['name'])
self.get_slopes_and_deskew_new_curved(textregions, *args)
small_textlines_to_parent_adherence2(textregions, area_factor, num_col_classifier) small_textlines_to_parent_adherence2(textregions, area_factor, num_col_classifier)
self.get_slopes_and_deskew_new_curved(marginals, textline_mask_tot_ea_erode, self.get_slopes_and_deskew_new_curved(marginals, *args)
num_col_classifier, slope_deskew,
image['name'])
small_textlines_to_parent_adherence2(marginals, area_factor, num_col_classifier) small_textlines_to_parent_adherence2(marginals, area_factor, num_col_classifier)
textregions, textregions_d = self.filter_textregions_without_textlines( textregions, textregions_d = self.filter_textregions_without_textlines(