diff --git a/pixelocr/page.py b/pixelocr/page.py index c6a8aea..4ee5270 100644 --- a/pixelocr/page.py +++ b/pixelocr/page.py @@ -104,7 +104,7 @@ class Line(PageObject): @cached_property def baseline(self): """Detect baseline height, relative to the top.""" - bitmap = self.image.bitmap.astype(np.float) + bitmap = self.image.bitmap histogram = bitmap.sum(axis=1) gradient = list(filters.correlate1d(histogram, [-1, 1], axis=0, mode='constant')) gradient[0] = histogram[0]