mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-09-04 14:59:58 +02:00
get_marginals: exit early if no peaks found to avoid spurious overlap mask
This commit is contained in:
parent
57821662b9
commit
741aa7867c
1 changed files with 2 additions and 0 deletions
|
@ -94,6 +94,8 @@ def get_marginals(text_with_lines, text_regions, num_col, slope_deskew, light_ve
|
|||
except:
|
||||
point_left=first_nonzero
|
||||
|
||||
if point_left == first_nonzero and point_right == last_nonzero:
|
||||
return text_regions
|
||||
|
||||
|
||||
if point_right>=mask_marginals.shape[1]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue