Tweak baseline detection: decrease detection height.
This commit is contained in:
parent
a089846a31
commit
f7a7fca3ad
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ class Line(PageObject):
|
||||||
@cached_property
|
@cached_property
|
||||||
def baseline(self):
|
def baseline(self):
|
||||||
"""Detect baseline height, relative to the top."""
|
"""Detect baseline height, relative to the top."""
|
||||||
skip = self.height // 2
|
skip = self.height * 2 // 3
|
||||||
bitmap = self.image.bitmap[skip:, :]
|
bitmap = self.image.bitmap[skip:, :]
|
||||||
bitmap = grey_closing(bitmap, (0, 4), mode='constant')
|
bitmap = grey_closing(bitmap, (0, 4), mode='constant')
|
||||||
histogram = bitmap.sum(axis=1)
|
histogram = bitmap.sum(axis=1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue