mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-10-15 19:09:58 +02:00
textline_contours_postprocessing: do not catch arbitrary exceptions
This commit is contained in:
parent
fe603188f4
commit
6e57ab3741
1 changed files with 33 additions and 35 deletions
|
@ -1344,7 +1344,7 @@ def textline_contours_postprocessing(textline_mask, slope,
|
|||
textline_mask = cv2.morphologyEx(textline_mask, cv2.MORPH_CLOSE, kernel)
|
||||
textline_mask = cv2.erode(textline_mask, kernel, iterations=2)
|
||||
# textline_mask = cv2.erode(textline_mask, kernel, iterations=1)
|
||||
try:
|
||||
|
||||
x_help = 30
|
||||
y_help = 2
|
||||
|
||||
|
@ -1387,8 +1387,6 @@ def textline_contours_postprocessing(textline_mask, slope,
|
|||
else:
|
||||
_, contours_rotated_clean = separate_lines(
|
||||
dst, contours_text_rot[ind_big_con], slope, x_help, y_help)
|
||||
except:
|
||||
contours_rotated_clean = []
|
||||
|
||||
return contours_rotated_clean
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue