Skip to content

Commit 529f7f5

Browse files
author
Robert Sachunsky
committed
compute_hlines/compute_separators_morph: early length filt by opening must be softer than final criterion
1 parent 47a5adf commit 529f7f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocrd_cis/ocropy/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def compute_hlines(binary, scale,
546546
DSAVE('hlines1_h-closed', horiz+0.6*binary)
547547
# 2- open horizontally to remove everything
548548
# that is horizontally non-contiguous:
549-
opened = morph.rb_opening(horiz, (1,hlminwidth*scale))
549+
opened = morph.rb_opening(horiz, (1, hlminwidth*scale//2))
550550
DSAVE('hlines2_h-opened', opened+0.6*binary)
551551
# 3- reconstruct the losses up to a certain distance
552552
# to avoid creeping into overlapping glyphs but still
@@ -615,7 +615,7 @@ def compute_separators_morph(binary, scale,
615615
DSAVE('colseps1_v-closed', vert+0.6*binary)
616616
# 2- open vertically to remove everything that
617617
# is vertically non-contiguous:
618-
opened = morph.rb_opening(vert, (csminheight*scale,1))
618+
opened = morph.rb_opening(vert, (csminheight*scale//2, 1))
619619
DSAVE('colseps2_v-opened', opened+0.6*binary)
620620
# 3- reconstruct the losses up to a certain distance
621621
# to avoid creeping into overlapping glyphs but still

0 commit comments

Comments
 (0)