Skip to content

Commit 073d4ca

Browse files
author
Robert Sachunsky
committed
h/v-lines: increase final dilation along major axis
1 parent c2e6b26 commit 073d4ca

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
@@ -561,7 +561,7 @@ def compute_hlines(binary, scale,
561561
DSAVE('hlines5_selected', horiz+0.6*binary)
562562
# 6- dilate vertically a little
563563
# to get a smooth contour without gaps
564-
horiz = morph.r_dilation(horiz, (d0,d1))
564+
horiz = morph.r_dilation(horiz, (d0,odd(scale)))
565565
DSAVE('hlines6_v-dilated', horiz+0.6*binary)
566566
return horiz > 0
567567

@@ -630,7 +630,7 @@ def compute_separators_morph(binary, scale,
630630
DSAVE('colseps5_selected', vert+0.6*binary)
631631
# 6- dilate horizontally a little
632632
# to get a smooth contour without gaps
633-
vert = morph.r_dilation(vert, (d0,d1))
633+
vert = morph.r_dilation(vert, (odd(scale),d1))
634634
DSAVE('colseps6_h-dilated', vert+0.6*binary)
635635
return vert > 0
636636

0 commit comments

Comments
 (0)