Fix: Line.glyphs should be a cached property.

This commit is contained in:
Andrey Golovizin 2014-08-30 20:52:25 +02:00
parent 5f1273fd18
commit 05f7eb4585

View file

@ -174,7 +174,7 @@ class Line(PageObject):
bottom = np.argmin(gradient) + skip bottom = np.argmin(gradient) + skip
return self.y + bottom return self.y + bottom
@property @cached_property
@collect_iterable @collect_iterable
def glyphs(self): def glyphs(self):
labels, max_label = ndimage.label(self.image.bitmap, CONNECTIVITY8) labels, max_label = ndimage.label(self.image.bitmap, CONNECTIVITY8)